[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180516.122651.245338197437523495.davem@davemloft.net>
Date: Wed, 16 May 2018 12:26:51 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: pabeni@...hat.com
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, john.fastabend@...il.com
Subject: Re: [PATCH net-next] sched: manipulate __QDISC_STATE_RUNNING in
qdisc_run_* helpers
From: Paolo Abeni <pabeni@...hat.com>
Date: Tue, 15 May 2018 10:50:31 +0200
> Currently NOLOCK qdiscs pay a measurable overhead to atomically
> manipulate the __QDISC_STATE_RUNNING. Such bit is flipped twice per
> packet in the uncontended scenario with packet rate below the
> line rate: on packed dequeue and on the next, failing dequeue attempt.
>
> This changeset moves the bit manipulation into the qdisc_run_{begin,end}
> helpers, so that the bit is now flipped only once per packet, with
> measurable performance improvement in the uncontended scenario.
>
> This also allows simplifying the qdisc teardown code path - since
> qdisc_is_running() is now effective for each qdisc type - and avoid a
> possible race between qdisc_run() and dev_deactivate_many(), as now
> the some_qdisc_is_busy() can properly detect NOLOCK qdiscs being busy
> dequeuing packets.
>
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
Applied, thank you.
Powered by blists - more mailing lists