diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-17 00:17:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-18 05:36:13 -0400 |
commit | 9958da0501fced47c1ac5c5a3a7731c87e45472c (patch) | |
tree | 5f865cabb794281244a4df4d604fd6f5ab33f84e /net/core/dev.c | |
parent | 8770acf0494ae06de6abd34f951a436f8f15d1de (diff) |
net: remove time limit in process_backlog()
- There is no point to enforce a time limit in process_backlog(), since
other napi instances dont follow same rule. We can exit after only one
packet processed...
The normal quota of 64 packets per napi instance should be the norm, and
net_rx_action() already has its own time limit.
Note : /proc/net/core/dev_weight can be used to tune this 64 default
value.
- Use DEFINE_PER_CPU_ALIGNED for softnet_data definition.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 7abf9590e3c5..8092f01713fb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -264,7 +264,7 @@ static RAW_NOTIFIER_HEAD(netdev_chain); | |||
264 | * queue in the local softnet handler. | 264 | * queue in the local softnet handler. |
265 | */ | 265 | */ |
266 | 266 | ||
267 | DEFINE_PER_CPU(struct softnet_data, softnet_data); | 267 | DEFINE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); |
268 | EXPORT_PER_CPU_SYMBOL(softnet_data); | 268 | EXPORT_PER_CPU_SYMBOL(softnet_data); |
269 | 269 | ||
270 | #ifdef CONFIG_LOCKDEP | 270 | #ifdef CONFIG_LOCKDEP |
@@ -3232,7 +3232,6 @@ static int process_backlog(struct napi_struct *napi, int quota) | |||
3232 | { | 3232 | { |
3233 | int work = 0; | 3233 | int work = 0; |
3234 | struct softnet_data *queue = &__get_cpu_var(softnet_data); | 3234 | struct softnet_data *queue = &__get_cpu_var(softnet_data); |
3235 | unsigned long start_time = jiffies; | ||
3236 | 3235 | ||
3237 | napi->weight = weight_p; | 3236 | napi->weight = weight_p; |
3238 | do { | 3237 | do { |
@@ -3252,7 +3251,7 @@ static int process_backlog(struct napi_struct *napi, int quota) | |||
3252 | local_irq_enable(); | 3251 | local_irq_enable(); |
3253 | 3252 | ||
3254 | __netif_receive_skb(skb); | 3253 | __netif_receive_skb(skb); |
3255 | } while (++work < quota && jiffies == start_time); | 3254 | } while (++work < quota); |
3256 | 3255 | ||
3257 | return work; | 3256 | return work; |
3258 | } | 3257 | } |