You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
net: sched: enable per cpu qstats
After previous patches to simplify qstats the qstats can be made per cpu with a packed union in Qdisc struct. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6401585366
commit
b0ab6f9275
@@ -90,7 +90,10 @@ struct Qdisc {
|
||||
struct gnet_stats_basic_cpu __percpu *cpu_bstats;
|
||||
} __packed;
|
||||
unsigned int __state;
|
||||
struct gnet_stats_queue qstats;
|
||||
union {
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_queue __percpu *cpu_qstats;
|
||||
} __packed;
|
||||
struct rcu_head rcu_head;
|
||||
int padded;
|
||||
atomic_t refcnt;
|
||||
@@ -543,6 +546,13 @@ static inline void qdisc_qstats_drop(struct Qdisc *sch)
|
||||
sch->qstats.drops++;
|
||||
}
|
||||
|
||||
static inline void qdisc_qstats_drop_cpu(struct Qdisc *sch)
|
||||
{
|
||||
struct gnet_stats_queue *qstats = this_cpu_ptr(sch->cpu_qstats);
|
||||
|
||||
qstats->drops++;
|
||||
}
|
||||
|
||||
static inline void qdisc_qstats_overlimit(struct Qdisc *sch)
|
||||
{
|
||||
sch->qstats.overlimits++;
|
||||
|
||||
Reference in New Issue
Block a user