Commit bba7eb5d authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

hfsc: reduce hfsc_sched to 14 cachelines

hfsc_sched is huge (size: 920, cachelines: 15), but we can get it to 14
cachelines by placing level after filter_cnt (covering 4 byte hole) and
reducing period/nactive/flags to u32 (period is just a counter,
incremented when class becomes active -- 2**32 is plenty for this
purpose, also, long is only 32bit wide on 32bit platforms anyway).

cl_vtperiod is exported to userspace via tc_hfsc_stats, but its period
member is already u32, so no precision is lost there either.

Cc: Michal Soltys <soltys@ziu.info>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a90a6e55
...@@ -115,9 +115,9 @@ struct hfsc_class { ...@@ -115,9 +115,9 @@ struct hfsc_class {
struct gnet_stats_basic_packed bstats; struct gnet_stats_basic_packed bstats;
struct gnet_stats_queue qstats; struct gnet_stats_queue qstats;
struct gnet_stats_rate_est64 rate_est; struct gnet_stats_rate_est64 rate_est;
unsigned int level; /* class level in hierarchy */
struct tcf_proto __rcu *filter_list; /* filter list */ struct tcf_proto __rcu *filter_list; /* filter list */
unsigned int filter_cnt; /* filter count */ unsigned int filter_cnt; /* filter count */
unsigned int level; /* class level in hierarchy */
struct hfsc_sched *sched; /* scheduler data */ struct hfsc_sched *sched; /* scheduler data */
struct hfsc_class *cl_parent; /* parent class */ struct hfsc_class *cl_parent; /* parent class */
...@@ -165,10 +165,10 @@ struct hfsc_class { ...@@ -165,10 +165,10 @@ struct hfsc_class {
struct runtime_sc cl_virtual; /* virtual curve */ struct runtime_sc cl_virtual; /* virtual curve */
struct runtime_sc cl_ulimit; /* upperlimit curve */ struct runtime_sc cl_ulimit; /* upperlimit curve */
unsigned long cl_flags; /* which curves are valid */ u8 cl_flags; /* which curves are valid */
unsigned long cl_vtperiod; /* vt period sequence number */ u32 cl_vtperiod; /* vt period sequence number */
unsigned long cl_parentperiod;/* parent's vt period sequence number*/ u32 cl_parentperiod;/* parent's vt period sequence number*/
unsigned long cl_nactive; /* number of active children */ u32 cl_nactive; /* number of active children */
}; };
struct hfsc_sched { struct hfsc_sched {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment