[NET]: Move Qdisc_class_ops and Qdisc_ops in appropriate sections.
Qdisc_class_ops are const, and Qdisc_ops are mostly read. Using "const" and "__read_mostly" qualifiers helps to reduce false sharing. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
2a8cc6c890
commit
20fea08b5f
@@ -544,7 +544,7 @@ rtattr_failure:
|
||||
return -1;
|
||||
}
|
||||
|
||||
static struct Qdisc_ops tfifo_qdisc_ops = {
|
||||
static struct Qdisc_ops tfifo_qdisc_ops __read_mostly = {
|
||||
.id = "tfifo",
|
||||
.priv_size = sizeof(struct fifo_sched_data),
|
||||
.enqueue = tfifo_enqueue,
|
||||
@@ -705,7 +705,7 @@ static struct tcf_proto **netem_find_tcf(struct Qdisc *sch, unsigned long cl)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct Qdisc_class_ops netem_class_ops = {
|
||||
static const struct Qdisc_class_ops netem_class_ops = {
|
||||
.graft = netem_graft,
|
||||
.leaf = netem_leaf,
|
||||
.get = netem_get,
|
||||
@@ -717,7 +717,7 @@ static struct Qdisc_class_ops netem_class_ops = {
|
||||
.dump = netem_dump_class,
|
||||
};
|
||||
|
||||
static struct Qdisc_ops netem_qdisc_ops = {
|
||||
static struct Qdisc_ops netem_qdisc_ops __read_mostly = {
|
||||
.id = "netem",
|
||||
.cl_ops = &netem_class_ops,
|
||||
.priv_size = sizeof(struct netem_sched_data),
|
||||
|
Reference in New Issue
Block a user