]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: sfq: allow divisor to be a parameter
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 20 Jan 2011 00:14:58 +0000 (00:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jan 2011 00:59:16 +0000 (16:59 -0800)
commit218094e828bf981aebe14eacf2bc96dee996521c
tree9c857324cff66804949994cccb6050ef6b6c2aea
parente6d7669ee1dab83d02afa41da2d8b280ef19da3e
net_sched: sfq: allow divisor to be a parameter

SFQ currently uses a 1024 slots hash table, and its internal structure
(sfq_sched_data) allocation needs order-1 page on x86_64

Allow tc command to specify a divisor value (hash table size), between 1
and 65536.
If no value is provided, assume the 1024 default size.

This allows admins to setup smaller (or bigger) SFQ for specific needs.

This also brings back sfq_sched_data allocations to order-0 ones, saving
3KB per SFQ qdisc.

Jesper uses ~55.000 SFQ in one machine, this patch should free 165 MB of
memory.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Jesper Dangaard Brouer <hawk@diku.dk>
CC: Jarek Poplawski <jarkao2@gmail.com>
CC: Jamal Hadi Salim <hadi@cyberus.ca>
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_sfq.c