Re: [PATCH bpf-next 07/12] bpf: Add a hint to allocated objects.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 23, 2023 at 8:28 PM Hou Tao <houtao@xxxxxxxxxxxxxxx> wrote:
>
> >                */
> > -             obj = __llist_del_first(&c->free_by_rcu_ttrace);
> > +             obj = llist_del_first(&c->free_by_rcu_ttrace);
> According to the comments in llist.h, when there are concurrent
> llist_del_first() and llist_del_all() operations, locking is needed.

Good question.
1. When only one cpu is doing llist_del_first() locking is not needed.
 This is the case here. Only this cpu is doing llist_del_first() from this 'c'.
2. The comments doesn't mention it, but llist_del_first() is ok on
multiple cpus if ABA problem is addressed by other means.

PS
please trim your replies.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux