[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57B4E9EF.5070400@gmail.com>
Date: Wed, 17 Aug 2016 15:49:19 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: xiyou.wangcong@...il.com, jhs@...atatu.com,
alexei.starovoitov@...il.com, brouer@...hat.com,
john.r.fastabend@...el.com, netdev@...r.kernel.org,
davem@...emloft.net
Subject: Re: [RFC PATCH 01/13] net: sched: allow qdiscs to handle locking
On 16-08-17 03:33 PM, Eric Dumazet wrote:
> On Wed, 2016-08-17 at 12:33 -0700, John Fastabend wrote:
>> This patch adds a flag for queueing disciplines to indicate the stack
>> does not need to use the qdisc lock to protect operations. This can
>> be used to build lockless scheduling algorithms and improving
>> performance.
>>
>> The flag is checked in the tx path and the qdisc lock is only taken
>> if it is not set. For now use a conditional if statement. Later we
>> could be more aggressive if it proves worthwhile and use a static key
>> or wrap this in a likely().
>>
>> Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
>> ---
>> include/net/pkt_sched.h | 4 +++-
>> include/net/sch_generic.h | 1 +
>> net/core/dev.c | 32 ++++++++++++++++++++++++++++----
>> net/sched/sch_generic.c | 26 ++++++++++++++++----------
>> 4 files changed, 48 insertions(+), 15 deletions(-)
>>
>> diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
>> index 7caa99b..69540c6 100644
>> --- a/include/net/pkt_sched.h
>> +++ b/include/net/pkt_sched.h
>> @@ -107,8 +107,10 @@ void __qdisc_run(struct Qdisc *q);
>>
>> static inline void qdisc_run(struct Qdisc *q)
>> {
>> - if (qdisc_run_begin(q))
>> + if (qdisc_run_begin(q)) {
>> __qdisc_run(q);
>> + qdisc_run_end(q);
>> + }
>> }
>
>
> Looks like you could have a separate patch, removing qdisc_run_end()
> call done in __qdisc_run(q) ?
>
> Then the 'allow qdiscs to handle locking'
>
>
Agreed that would clean this up a bit. Will do for next rev.
Powered by blists - more mailing lists