projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72145a6
)
net: minor optimization in qdisc_qstats_cpu_drop()
author
Eric Dumazet
<edumazet@google.com>
Wed, 24 Aug 2016 17:23:34 +0000
(10:23 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 25 Aug 2016 23:45:29 +0000
(16:45 -0700)
per_cpu_inc() is faster (at least on x86) than per_cpu_ptr(xxx)++;
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
patch
|
blob
|
history
diff --git
a/include/net/sch_generic.h
b/include/net/sch_generic.h
index
0d50177
..
52a2015
100644
(file)
--- a/
include/net/sch_generic.h
+++ b/
include/net/sch_generic.h
@@
-592,7
+592,7
@@
static inline void qdisc_qstats_drop(struct Qdisc *sch)
static inline void qdisc_qstats_cpu_drop(struct Qdisc *sch)
{
-
qstats_drop_inc(this_cpu_ptr(sch->cpu_qstats)
);
+
this_cpu_inc(sch->cpu_qstats->drops
);
}
static inline void qdisc_qstats_overlimit(struct Qdisc *sch)