net_sched: reduce fifo qdisc size

Because of various alignements [SLUB / qdisc], we use 512 bytes of
memory for one {p|b}fifo qdisc, instead of 256 bytes on 64bit arches and
192 bytes on 32bit ones.

Move the "u32 limit" inside "struct Qdisc" (no impact on other qdiscs)

Change qdisc_alloc(), first trying a regular allocation before an
oversized one.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2011-03-03 11:10:02 -08:00
committed by David S. Miller
parent c53fa1ed92
commit d276055c4e
3 changed files with 23 additions and 30 deletions

View File

@@ -83,6 +83,7 @@ struct Qdisc {
struct gnet_stats_queue qstats;
struct rcu_head rcu_head;
spinlock_t busylock;
u32 limit;
};
static inline bool qdisc_is_running(const struct Qdisc *qdisc)