lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <8008933b-4a28-19e5-02db-ef1d07eaf952@redhat.com> Date: Mon, 3 Oct 2022 13:32:49 -0400 From: Waiman Long <longman@...hat.com> To: Tejun Heo <tj@...nel.org> Cc: Jens Axboe <axboe@...nel.dk>, cgroups@...r.kernel.org, linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, Ming Lei <ming.lei@...hat.com>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Andrew Morton <akpm@...ux-foundation.org>, Michal Koutný <mkoutny@...e.com> Subject: Re: [PATCH v7 1/3] llist: Add a lock-less list variant terminated by a sentinel node On 10/3/22 12:57, Tejun Heo wrote: > On Mon, Oct 03, 2022 at 12:55:24PM -0400, Waiman Long wrote: >> That was my original plan. However, after looking at some existing users of >> lockless list, they have coded in the dependency on the fact that a lockless >> list is empty if it is NULL. I guess I can make this true also for the new >> lockless list with sentinel at the expense of a bit more overhead in the >> entry insertion path and deletion path. I will take a further look at that. > There aren't that many users of llist. Maybe it'd be easier / cleaner to > introduce a macro to test whether a llist is empty and replace the NULL > tests? 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? Cheers, Longman
Powered by blists - more mailing lists