]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: add empty status flag for NOLOCK qdisc
authorPaolo Abeni <pabeni@redhat.com>
Fri, 22 Mar 2019 15:01:55 +0000 (16:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2019 01:52:36 +0000 (21:52 -0400)
commit09ad2d1f6505a4ecb4a6267da25bebe284017be1
tree19e12fe1c09bd817cae2410b5dd0b68ff6c21e43
parent546376e9a9195f26102d056671bd21eec036331f
net: sched: add empty status flag for NOLOCK qdisc

The queue is marked not empty after acquiring the seqlock,
and it's up to the NOLOCK qdisc clearing such flag on dequeue.
Since the empty status lays on the same cache-line of the
seqlock, it's always hot on cache during the updates.

This makes the empty flag update a little bit loosy. Given
the lack of synchronization between enqueue and dequeue, this
is unavoidable.

v2 -> v3:
 - qdisc_is_empty() has a const argument (Eric)

v1 -> v2:
 - use really an 'empty' flag instead of 'not_empty', as
   suggested by Eric

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/sch_generic.c