[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1fa24b81-9dbc-419c-20e3-910ea548214b@gmail.com>
Date: Thu, 6 Sep 2018 02:29:17 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Vlad Buslov <vladbu@...lanox.com>,
Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net, stephen@...workplumber.org,
paulmck@...ux.vnet.ibm.com, nicolas.dichtel@...nd.com,
leon@...nel.org, gregkh@...uxfoundation.org, mark.rutland@....com,
fw@...len.de, dsahern@...il.com, lucien.xin@...il.com,
jakub.kicinski@...ronome.com, christian.brauner@...ntu.com,
jbenc@...hat.com
Subject: Re: [PATCH net-next 03/13] net: sched: extend Qdisc with rcu
On 09/06/2018 02:23 AM, Vlad Buslov wrote:
>
> On Thu 06 Sep 2018 at 08:39, Kirill Tkhai <ktkhai@...tuozzo.com> wrote:
>> On 06.09.2018 11:30, Eric Dumazet wrote:
>>>
>>>
>>> On 09/06/2018 12:58 AM, Vlad Buslov wrote:
>>>
>>> ...
>>>
>>>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>>>> index 18e22a5a6550..239c73f29471 100644
>>>> --- a/include/net/sch_generic.h
>>>> +++ b/include/net/sch_generic.h
>>>> @@ -90,6 +90,7 @@ struct Qdisc {
>>>> struct gnet_stats_queue __percpu *cpu_qstats;
>>>> int padded;
>>>> refcount_t refcnt;
>>>> + struct rcu_head rcu;
>>>>
>>>> /*
>>>> * For performance sake on SMP, we put highly modified fields at the end
>>>
>>> Probably better to move this at the end of struct Qdisc,
>>> not risking unexpected performance regressions in fast path.
>>
>> Do you mean regressions on UP? On SMP it looks like this field
>> fits in the unused gap created by:
>>
>> struct sk_buff_head gso_skb ____cacheline_aligned_in_smp;
>>
>> Kirill
>
> Hi Eric, Kirill
>
> I intentionally put rcu_head here in order for it not to be in same
> cache line with "highly modified fields" (according to comment).
My personal preference would have been to use the last cache line
for a new 'control path field', and leave holes in the first one
for future needs in fast path.
But this is a minor detail really, either choice is fine.
Powered by blists - more mailing lists