2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-28 11:52:56 -07:00
|
|
|
|
qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE
Based on DaveM's recent API work on dev_hard_start_xmit(), that allows
sending/processing an entire skb list.
This patch implements qdisc bulk dequeue, by allowing multiple packets
to be dequeued in dequeue_skb().
The optimization principle for this is two fold, (1) to amortize
locking cost and (2) avoid expensive tailptr update for notifying HW.
(1) Several packets are dequeued while holding the qdisc root_lock,
amortizing locking cost over several packet. The dequeued SKB list is
processed under the TXQ lock in dev_hard_start_xmit(), thus also
amortizing the cost of the TXQ lock.
(2) Further more, dev_hard_start_xmit() will utilize the skb->xmit_more
API to delay HW tailptr update, which also reduces the cost per
packet.
One restriction of the new API is that every SKB must belong to the
same TXQ. This patch takes the easy way out, by restricting bulk
dequeue to qdisc's with the TCQ_F_ONETXQUEUE flag, that specifies the
qdisc only have attached a single TXQ.
Some detail about the flow; dev_hard_start_xmit() will process the skb
list, and transmit packets individually towards the driver (see
xmit_one()). In case the driver stops midway in the list, the
remaining skb list is returned by dev_hard_start_xmit(). In
sch_direct_xmit() this returned list is requeued by dev_requeue_skb().
To avoid overshooting the HW limits, which results in requeuing, the
patch limits the amount of bytes dequeued, based on the drivers BQL
limits. In-effect bulking will only happen for BQL enabled drivers.
Small amounts for extra HoL blocking (2x MTU/0.24ms) were
measured at 100Mbit/s, with bulking 8 packets, but the
oscillating nature of the measurement indicate something, like
sched latency might be causing this effect. More comparisons
show, that this oscillation goes away occationally. Thus, we
disregard this artifact completely and remove any "magic" bulking
limit.
For now, as a conservative approach, stop bulking when seeing TSO and
segmented GSO packets. They already benefit from bulking on their own.
A followup patch add this, to allow easier bisect-ability for finding
regressions.
Jointed work with Hannes, Daniel and Florian.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-01 22:35:59 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-22 11:55:50 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2008-07-16 02:15:04 -07:00
|
|
|
|
2008-08-17 21:51:03 -07:00
|
|
|
|
2008-07-16 00:56:32 -07:00
|
|
|
|
|
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2009-02-01 01:12:42 -08:00
|
|
|
|
2011-01-20 05:27:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-11 15:54:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-01 01:12:42 -08:00
|
|
|
|
2014-09-28 11:52:56 -07:00
|
|
|
|
2015-12-01 20:08:51 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-06 08:43:22 -07:00
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
net: reorder struct Qdisc for better SMP performance
dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"
On x86_64 arch, they currently span three cache lines, involving more
cache line ping pongs than necessary, making longer holding of queue spinlock.
We can reduce this to one cache line, by grouping all read-mostly fields
at the beginning of structure. (Or should I say, all highly modified fields
at the end :) )
Before patch :
offsetof(struct Qdisc, state)=0x38
offsetof(struct Qdisc, q)=0x48
offsetof(struct Qdisc, bstats)=0x80
offsetof(struct Qdisc, qstats)=0x90
sizeof(struct Qdisc)=0xc8
After patch :
offsetof(struct Qdisc, state)=0x80
offsetof(struct Qdisc, q)=0x88
offsetof(struct Qdisc, bstats)=0xa0
offsetof(struct Qdisc, qstats)=0xac
sizeof(struct Qdisc)=0xc0
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-20 01:33:32 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-07-18 20:54:17 -07:00
|
|
|
|
|
|
|
|
|
net: reorder struct Qdisc for better SMP performance
dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"
On x86_64 arch, they currently span three cache lines, involving more
cache line ping pongs than necessary, making longer holding of queue spinlock.
We can reduce this to one cache line, by grouping all read-mostly fields
at the beginning of structure. (Or should I say, all highly modified fields
at the end :) )
Before patch :
offsetof(struct Qdisc, state)=0x38
offsetof(struct Qdisc, q)=0x48
offsetof(struct Qdisc, bstats)=0x80
offsetof(struct Qdisc, qstats)=0x90
sizeof(struct Qdisc)=0xc8
After patch :
offsetof(struct Qdisc, state)=0x80
offsetof(struct Qdisc, q)=0x88
offsetof(struct Qdisc, bstats)=0xa0
offsetof(struct Qdisc, qstats)=0xac
sizeof(struct Qdisc)=0xc0
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-20 01:33:32 -07:00
|
|
|
|
|
|
|
|
|
2013-06-06 08:43:22 -07:00
|
|
|
|
2015-01-29 17:30:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: reorder struct Qdisc for better SMP performance
dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"
On x86_64 arch, they currently span three cache lines, involving more
cache line ping pongs than necessary, making longer holding of queue spinlock.
We can reduce this to one cache line, by grouping all read-mostly fields
at the beginning of structure. (Or should I say, all highly modified fields
at the end :) )
Before patch :
offsetof(struct Qdisc, state)=0x38
offsetof(struct Qdisc, q)=0x48
offsetof(struct Qdisc, bstats)=0x80
offsetof(struct Qdisc, qstats)=0x90
sizeof(struct Qdisc)=0xc8
After patch :
offsetof(struct Qdisc, state)=0x80
offsetof(struct Qdisc, q)=0x88
offsetof(struct Qdisc, bstats)=0xa0
offsetof(struct Qdisc, qstats)=0xac
sizeof(struct Qdisc)=0xc0
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-20 01:33:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net_sched: generalize bulk dequeue
When qdisc bulk dequeue was added in linux-3.18 (commit
5772e9a3463b "qdisc: bulk dequeue support for qdiscs
with TCQ_F_ONETXQUEUE"), it was constrained to some
specific qdiscs.
With some extra care, we can extend this to all qdiscs,
so that typical traffic shaping solutions can benefit from
small batches (8 packets in this patch).
For example, HTB is often used on some multi queue device.
And bonding/team are multi queue devices...
Idea is to bulk-dequeue packets mapping to the same transmit queue.
This brings between 35 and 80 % performance increase in HTB setup
under pressure on a bonding setup :
1) NUMA node contention : 610,000 pps -> 1,110,000 pps
2) No node contention : 1,380,000 pps -> 1,930,000 pps
Now we should work to add batches on the enqueue() side ;)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Florian Westphal <fw@strlen.de>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-21 23:16:52 -07:00
|
|
|
|
net: reorder struct Qdisc for better SMP performance
dev_queue_xmit() needs to dirty fields "state", "q", "bstats" and "qstats"
On x86_64 arch, they currently span three cache lines, involving more
cache line ping pongs than necessary, making longer holding of queue spinlock.
We can reduce this to one cache line, by grouping all read-mostly fields
at the beginning of structure. (Or should I say, all highly modified fields
at the end :) )
Before patch :
offsetof(struct Qdisc, state)=0x38
offsetof(struct Qdisc, q)=0x48
offsetof(struct Qdisc, bstats)=0x80
offsetof(struct Qdisc, qstats)=0x90
sizeof(struct Qdisc)=0xc8
After patch :
offsetof(struct Qdisc, state)=0x80
offsetof(struct Qdisc, q)=0x88
offsetof(struct Qdisc, bstats)=0xa0
offsetof(struct Qdisc, qstats)=0xac
sizeof(struct Qdisc)=0xc0
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-20 01:33:32 -07:00
|
|
|
|
2015-01-29 17:30:12 -08:00
|
|
|
|
2016-06-06 09:37:15 -07:00
|
|
|
|
2015-01-29 17:30:12 -08:00
|
|
|
|
net_sched: generalize bulk dequeue
When qdisc bulk dequeue was added in linux-3.18 (commit
5772e9a3463b "qdisc: bulk dequeue support for qdiscs
with TCQ_F_ONETXQUEUE"), it was constrained to some
specific qdiscs.
With some extra care, we can extend this to all qdiscs,
so that typical traffic shaping solutions can benefit from
small batches (8 packets in this patch).
For example, HTB is often used on some multi queue device.
And bonding/team are multi queue devices...
Idea is to bulk-dequeue packets mapping to the same transmit queue.
This brings between 35 and 80 % performance increase in HTB setup
under pressure on a bonding setup :
1) NUMA node contention : 610,000 pps -> 1,110,000 pps
2) No node contention : 1,380,000 pps -> 1,930,000 pps
Now we should work to add batches on the enqueue() side ;)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Florian Westphal <fw@strlen.de>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-21 23:16:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-02 05:09:29 -07:00
|
|
|
|
2013-06-06 08:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-01-20 05:27:16 +00:00
|
|
|
|
2010-06-02 03:23:51 -07:00
|
|
|
|
2016-06-06 09:37:15 -07:00
|
|
|
|
2010-06-02 03:23:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-20 05:27:16 +00:00
|
|
|
|
|
|
|
|
|
2016-06-09 07:45:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-20 05:27:16 +00:00
|
|
|
|
2010-06-02 03:23:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-06 09:37:15 -07:00
|
|
|
|
2011-01-20 05:27:16 +00:00
|
|
|
|
|
|
|
|
|
qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE
Based on DaveM's recent API work on dev_hard_start_xmit(), that allows
sending/processing an entire skb list.
This patch implements qdisc bulk dequeue, by allowing multiple packets
to be dequeued in dequeue_skb().
The optimization principle for this is two fold, (1) to amortize
locking cost and (2) avoid expensive tailptr update for notifying HW.
(1) Several packets are dequeued while holding the qdisc root_lock,
amortizing locking cost over several packet. The dequeued SKB list is
processed under the TXQ lock in dev_hard_start_xmit(), thus also
amortizing the cost of the TXQ lock.
(2) Further more, dev_hard_start_xmit() will utilize the skb->xmit_more
API to delay HW tailptr update, which also reduces the cost per
packet.
One restriction of the new API is that every SKB must belong to the
same TXQ. This patch takes the easy way out, by restricting bulk
dequeue to qdisc's with the TCQ_F_ONETXQUEUE flag, that specifies the
qdisc only have attached a single TXQ.
Some detail about the flow; dev_hard_start_xmit() will process the skb
list, and transmit packets individually towards the driver (see
xmit_one()). In case the driver stops midway in the list, the
remaining skb list is returned by dev_hard_start_xmit(). In
sch_direct_xmit() this returned list is requeued by dev_requeue_skb().
To avoid overshooting the HW limits, which results in requeuing, the
patch limits the amount of bytes dequeued, based on the drivers BQL
limits. In-effect bulking will only happen for BQL enabled drivers.
Small amounts for extra HoL blocking (2x MTU/0.24ms) were
measured at 100Mbit/s, with bulking 8 packets, but the
oscillating nature of the measurement indicate something, like
sched latency might be causing this effect. More comparisons
show, that this oscillation goes away occationally. Thus, we
disregard this artifact completely and remove any "magic" bulking
limit.
For now, as a conservative approach, stop bulking when seeing TSO and
segmented GSO packets. They already benefit from bulking on their own.
A followup patch add this, to allow easier bisect-ability for finding
regressions.
Jointed work with Hannes, Daniel and Florian.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-01 22:35:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-09-15 02:53:07 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-29 17:35:48 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-22 22:11:17 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-12 20:05:27 -07:00
|
|
|
|
2016-06-06 22:50:39 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-11-14 01:44:41 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-10-31 00:43:45 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-22 22:11:17 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-22 22:11:17 -08:00
|
|
|
|
2009-09-06 01:58:51 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2013-12-15 20:15:11 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-07-05 23:25:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-03-06 11:47:59 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-01-14 05:15:39 +00:00
|
|
|
|
2012-05-25 13:42:45 -06:00
|
|
|
|
2008-01-22 22:11:33 -08:00
|
|
|
|
2014-04-25 13:54:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-09 16:14:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-09-12 20:05:27 -07:00
|
|
|
|
|
|
|
|
|
2011-07-05 23:25:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-20 18:07:51 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-05 23:25:42 +00:00
|
|
|
|
2014-09-12 20:05:27 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
|
|
|
|
|
2012-07-20 02:28:49 +00:00
|
|
|
|
2015-09-15 23:05:42 -07:00
|
|
|
|
2014-09-18 08:02:05 -07:00
|
|
|
|
|
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
|
|
|
|
|
2012-02-06 15:14:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-12 06:03:51 +00:00
|
|
|
|
|
|
|
|
|
2012-02-06 15:14:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2009-08-06 01:44:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-17 00:53:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-16 01:42:40 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-16 01:42:40 -07:00
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-08-21 05:11:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-02 23:27:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-16 01:42:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-02 23:27:37 -07:00
|
|
|
|
2008-07-17 00:53:03 -07:00
|
|
|
|
2008-07-16 01:42:40 -07:00
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-08-27 02:25:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-06 09:37:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-08 17:06:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-16 03:12:24 -07:00
|
|
|
|
2008-08-27 02:27:10 -07:00
|
|
|
|
2008-07-16 03:12:24 -07:00
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-16 03:12:24 -07:00
|
|
|
|
2008-08-27 02:27:10 -07:00
|
|
|
|
2008-07-16 03:12:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-07-05 14:14:30 -07:00
|
|
|
|
|
|
|
|
|
2009-09-06 01:58:51 -07:00
|
|
|
|
|
|
|
|
|
2015-08-27 21:21:38 +02:00
|
|
|
|
2013-08-27 16:19:08 -07:00
|
|
|
|
2016-03-02 08:21:43 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-05 14:14:30 -07:00
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2008-07-05 23:21:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-03 03:26:03 +00:00
|
|
|
|
2008-07-05 23:21:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-05 23:21:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hlist: drop the node parameter from iterators
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.
Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.
The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
type T;
expression a,c,d,e;
identifier b;
statement S;
@@
-T b;
<+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
...+>
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 17:06:00 -08:00
|
|
|
|
2008-07-05 23:21:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 23:21:31 -07:00
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-25 14:55:01 -08:00
|
|
|
|
|
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
2013-08-31 10:15:50 -07:00
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
2013-08-31 10:15:50 -07:00
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
|
|
|
|
|
2015-03-06 11:47:59 -08:00
|
|
|
|
2014-09-12 20:05:27 -07:00
|
|
|
|
2015-09-15 23:05:43 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-01-07 15:50:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-01 13:21:57 +00:00
|
|
|
|
|
|
|
|
|
2008-07-08 22:59:10 -07:00
|
|
|
|
2010-07-01 13:21:35 +00:00
|
|
|
|
|
|
|
|
|
2010-07-01 13:21:57 +00:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2010-07-01 13:21:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-08 22:59:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-01 13:21:57 +00:00
|
|
|
|
2008-07-08 22:59:10 -07:00
|
|
|
|
|
|
|
|
|
2008-07-08 23:00:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
|
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
|
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-08 23:00:25 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
|
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2008-07-08 23:00:25 -07:00
|
|
|
|
|
|
|
|
|
2008-07-08 23:01:06 -07:00
|
|
|
|
2011-10-20 17:45:43 -04:00
|
|
|
|
2008-07-08 23:01:06 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
|
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-08 23:01:06 -07:00
|
|
|
|
|
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2008-07-08 23:01:27 -07:00
|
|
|
|
|
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
|
|
|
|
|
2014-09-12 20:04:52 -07:00
|
|
|
|
2008-07-17 00:34:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-08 23:01:27 -07:00
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
2008-07-20 00:08:27 -07:00
|
|
|
|
2008-07-20 00:08:47 -07:00
|
|
|
|
2008-07-20 00:08:27 -07:00
|
|
|
|
|
|
|
|
|
2008-08-04 22:39:11 -07:00
|
|
|
|
2008-08-04 22:31:03 -07:00
|
|
|
|
|
|
|
|
|
2008-08-04 22:39:11 -07:00
|
|
|
|
2008-08-04 22:31:03 -07:00
|
|
|
|
|
|
|
|
|
2008-08-04 22:39:11 -07:00
|
|
|
|
2008-08-04 22:31:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
|
|
|
|
|
2008-07-20 00:08:04 -07:00
|
|
|
|
2008-07-20 18:13:01 -07:00
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-20 18:13:01 -07:00
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
2011-01-20 03:48:19 +00:00
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
2008-07-20 00:08:04 -07:00
|
|
|
|
|
|
|
|
|
2014-09-28 11:52:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
2016-05-13 12:55:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
|
|
|
|
|
2009-08-06 01:44:21 +00:00
|
|
|
|
2016-05-13 12:55:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
|
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
|
|
|
|
|
2014-09-28 11:52:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-09 08:30:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-06 01:44:21 +00:00
|
|
|
|
|
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
|
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
2014-09-28 11:54:24 -07:00
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
|
|
|
|
|
2014-09-28 11:54:24 -07:00
|
|
|
|
2015-07-06 05:18:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-28 11:54:24 -07:00
|
|
|
|
|
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-20 23:31:33 -08:00
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
2011-01-20 23:31:33 -08:00
|
|
|
|
|
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
2011-01-20 23:31:33 -08:00
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
2010-01-24 12:30:59 +00:00
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
2008-10-31 00:44:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
2016-06-03 15:05:57 -07:00
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2016-06-03 15:05:57 -07:00
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2016-06-03 15:05:57 -07:00
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
2016-06-03 15:05:57 -07:00
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
|
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
2008-11-05 16:02:34 -08:00
|
|
|
|
2008-10-31 00:47:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 20:21:50 -07:00
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 20:21:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 20:21:50 -07:00
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-25 14:55:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-25 14:55:01 -08:00
|
|
|
|
2016-02-25 14:55:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 20:21:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
2016-06-21 23:16:49 -07:00
|
|
|
|
2014-09-28 11:53:29 -07:00
|
|
|
|
2005-06-18 22:57:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-12 16:35:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-12 16:36:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-12 16:35:24 +02:00
|
|
|
|
|
|
|
|
|
2010-09-22 20:43:57 +00:00
|
|
|
|
2007-09-12 16:35:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
2013-06-06 13:56:19 -07:00
|
|
|
|
2013-06-02 13:55:05 +00:00
|
|
|
|
|
|
|
|
|
2013-08-14 23:47:11 +02:00
|
|
|
|
2013-06-02 13:55:05 +00:00
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-14 23:47:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
|
|
|
|
|
2013-07-30 22:47:13 -07:00
|
|
|
|
2013-09-19 09:10:03 -07:00
|
|
|
|
|
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
2013-06-02 13:55:05 +00:00
|
|
|
|
|
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
2013-06-02 13:55:05 +00:00
|
|
|
|
2013-09-19 09:10:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-02 13:55:05 +00:00
|
|
|
|
2013-08-14 23:47:11 +02:00
|
|
|
|
2013-02-12 00:12:03 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|