[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <vbfk1lhjf2s.fsf@reg-r-vrt-018-180.mtr.labs.mlnx>
Date: Tue, 13 Nov 2018 13:13:19 +0000
From: Vlad Buslov <vladbu@...lanox.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"jhs@...atatu.com" <jhs@...atatu.com>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"ast@...nel.org" <ast@...nel.org>,
"daniel@...earbox.net" <daniel@...earbox.net>
Subject: Re: [PATCH net-next 01/17] net: sched: refactor
mini_qdisc_pair_swap() to use workqueue
On Mon 12 Nov 2018 at 17:28, David Miller <davem@...emloft.net> wrote:
> From: Vlad Buslov <vladbu@...lanox.com>
> Date: Mon, 12 Nov 2018 09:55:30 +0200
>
>> +void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp,
>> + struct tcf_proto *tp_head)
>> +{
>> + xchg(&miniqp->tp_head, tp_head);
>
> If you are not checking the return value of xchg(), then this is
> simply a store with optionally a memory barrier of some sort
> either before or after.
That was my intention. What would be a better way to atomically
reset a pointer? Should I just change this line to explicit
assignment+barrier?
Powered by blists - more mailing lists