From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vlad Buslov <vladbu@mellanox.com>, Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
stephen@networkplumber.org, paulmck@linux.vnet.ibm.com,
nicolas.dichtel@6wind.com, leon@kernel.org,
gregkh@linuxfoundation.org, mark.rutland@arm.com, fw@strlen.de,
dsahern@gmail.com, lucien.xin@gmail.com,
jakub.kicinski@netronome.com, christian.brauner@ubuntu.com,
jbenc@redhat.com
Subject: Re: [PATCH net-next 03/13] net: sched: extend Qdisc with rcu
Date: Thu, 6 Sep 2018 02:29:17 -0700 [thread overview]
Message-ID: <1fa24b81-9dbc-419c-20e3-910ea548214b@gmail.com> (raw)
In-Reply-To: <vbf1sa7x9m9.fsf@reg-r-vrt-018-180.mtr.labs.mlnx>
On 09/06/2018 02:23 AM, Vlad Buslov wrote:
>
> On Thu 06 Sep 2018 at 08:39, Kirill Tkhai <ktkhai@virtuozzo.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.
next prev parent reply other threads:[~2018-09-06 14:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 7:58 [PATCH net-next 00/13] Refactor classifier API to work with Qdisc/blocks without rtnl lock Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 01/13] net: core: netlink: add helper refcount dec and lock function Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 02/13] net: sched: rename qdisc_destroy() to qdisc_put() Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 03/13] net: sched: extend Qdisc with rcu Vlad Buslov
2018-09-06 8:30 ` Eric Dumazet
2018-09-06 8:39 ` Kirill Tkhai
2018-09-06 9:21 ` Eric Dumazet
2018-09-06 9:23 ` Vlad Buslov
2018-09-06 9:29 ` Eric Dumazet [this message]
2018-09-06 7:58 ` [PATCH net-next 04/13] net: sched: add helper function to take reference to Qdisc Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 05/13] net: sched: use Qdisc rcu API instead of relying on rtnl lock Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 06/13] net: sched: change tcf block reference counter type to refcount_t Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 07/13] net: sched: implement functions to put and flush all chains Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 08/13] net: sched: rename tcf_block_get{_ext}() and tcf_block_put{_ext}() Vlad Buslov
2018-09-07 20:09 ` Cong Wang
2018-09-12 8:24 ` Vlad Buslov
2018-09-13 17:21 ` Cong Wang
2018-09-14 10:38 ` Vlad Buslov
2018-09-14 15:24 ` Jiri Pirko
2018-09-06 7:58 ` [PATCH net-next 09/13] net: sched: extend tcf_block with rcu Vlad Buslov
2018-09-07 19:52 ` Cong Wang
2018-09-12 8:25 ` Vlad Buslov
2018-09-06 7:58 ` [PATCH net-next 10/13] net: sched: protect block idr with spinlock Vlad Buslov
2018-09-06 7:59 ` [PATCH net-next 11/13] net: sched: implement tcf_block_get() and tcf_block_put() Vlad Buslov
2018-09-06 7:59 ` [PATCH net-next 12/13] net: sched: use reference counting for tcf blocks on rules update Vlad Buslov
2018-09-06 7:59 ` [PATCH net-next 13/13] net: sched: add flags to Qdisc class ops struct Vlad Buslov
2018-09-07 19:50 ` Cong Wang
2018-09-12 8:25 ` Vlad Buslov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1fa24b81-9dbc-419c-20e3-910ea548214b@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=christian.brauner@ubuntu.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=jakub.kicinski@netronome.com \
--cc=jbenc@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=ktkhai@virtuozzo.com \
--cc=leon@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=stephen@networkplumber.org \
--cc=vladbu@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).