From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9D7CC433F5 for ; Mon, 3 Oct 2022 17:40:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbiJCRkq (ORCPT ); Mon, 3 Oct 2022 13:40:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiJCRkS (ORCPT ); Mon, 3 Oct 2022 13:40:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA84E1EC6D for ; Mon, 3 Oct 2022 10:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664818814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/OvRUrGfw8TOZah0PxNYChSkH0fCR+iXG8NZ//kOXLc=; b=V58lyvI96zF8yZbHfevO5xdQadiZ6Tv80dnXggwV+i94/7YN4ESPagXxhxo630dxvO6yge hDEtrrc/FCCDjOQf/iru3MjUclj+iGzwyXtJlSDTcDVKt995GvDo5oOshF0tRvHGh8+yP9 MBkczh7xzTFGFzlYH+lMqQmSkRDUILc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-CREGx1c3NwWpx7R3TydlWQ-1; Mon, 03 Oct 2022 13:40:06 -0400 X-MC-Unique: CREGx1c3NwWpx7R3TydlWQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1584C80C8C1; Mon, 3 Oct 2022 17:40:06 +0000 (UTC) Received: from [10.18.17.215] (dhcp-17-215.bos.redhat.com [10.18.17.215]) by smtp.corp.redhat.com (Postfix) with ESMTP id B89AA492CA2; Mon, 3 Oct 2022 17:40:05 +0000 (UTC) Message-ID: <87e7cd70-4ab6-f33b-ce26-afe2c7c04faa@redhat.com> Date: Mon, 3 Oct 2022 13:40:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v7 1/3] llist: Add a lock-less list variant terminated by a sentinel node Content-Language: en-US To: Tejun Heo Cc: Jens Axboe , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Ming Lei , Andy Shevchenko , Andrew Morton , =?UTF-8?Q?Michal_Koutn=c3=bd?= References: <20221003154459.207538-1-longman@redhat.com> <20221003154459.207538-2-longman@redhat.com> <006ebc52-ab37-442a-9ba3-e7b8dff53fab@redhat.com> <8008933b-4a28-19e5-02db-ef1d07eaf952@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/3/22 13:36, Tejun Heo wrote: > Hello, > > On Mon, Oct 03, 2022 at 01:32:49PM -0400, Waiman Long wrote: >> What my current thinking is to make llist works with both NULL and sentinel >> terminated lockless list. Users who wish to use the sentinel terminated >> version will have to use special sentinel version of LLIST_HEAD() macro and >> llist_del_all() and __llist_del_all() functions. In this way, I don't need >> to touch an existing users of llist while minimizing code redundancy. What >> do you think? > Wouldn't that be more error-prone in the long term? I'd just bite the bullet > and convert the empty tests. It is a hassle to find them but given that it's > just the head node testing, it hopefully wouldn't be too bad. OK, I will take a further look at what changes will be needed by the existing llist users. Thanks, Longman