Re: [QUESTION] llist: Comment releasing 'must delete' restriction before traversing

From: Huang\, Ying
Date: Wed Aug 01 2018 - 01:43:18 EST


Byungchul Park <byungchul.park@xxxxxxx> writes:

> I think rcu list also works well. But I decided to use llist because
> llist is simpler and has one less pointer.
>
> Just to be sure, let me explain my use case more:
>
> 1. Introduced a global list where single linked list is sufficient.
> 2. All operations I need is to add items and traverse the list.
> 3. Ensure the operations always happen within irq-disabled section.
> 4. I'm considering CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG properly.
> 5. The list can be accessed by every CPU concurrently.
>

Can you provide more information about where is your use case? Is it a
kernel driver? Then it is better to submit the patch together with its
user.

And I have the similar concern as Steven Rostedt. That is, if you are
the only user forever, it's not necessary to change the common code.

Best Regards,
Huang, Ying