Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
- From: Ingo Molnar <mingo@xxxxxxx>
- Date: Mon, 31 Mar 2008 11:48:23 +0200
* Eric Dumazet <dada1@xxxxxxxxxxxxx> wrote:
I noticed some paths in kernel are very stack aggressive, and on i386
with CONFIG_4KSTACKS we were really in a dangerous land, even without
my patch.
What we call 4K stacks is in fact 4K - sizeof(struct task_struct), so
a litle bit more than 2K. [...]
that's just wrong - 4K stacks on x86 are 4K-sizeof(thread_info) - the
task struct is allocated elsewhere. The patch below runs just fine on
4K-stack x86.
Ingo
------------->
Subject: net: loopback speedup
From: Ingo Molnar <mingo@xxxxxxx>
Date: Mon Mar 31 11:23:21 CEST 2008
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
drivers/net/loopback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/net/loopback.c
===================================================================
--- linux.orig/drivers/net/loopback.c
+++ linux/drivers/net/loopback.c
@@ -158,7 +158,7 @@ static int loopback_xmit(struct sk_buff
lb_stats->bytes += skb->len;
lb_stats->packets++;
- netif_rx(skb);
+ netif_receive_skb(skb);
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
- From: David Miller
- Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
- From: Eric Dumazet
- Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
- Prev by Date: Re: [PATCH 08/12] xen: add resend_irq_on_evtchn() definition into events.c.
- Next by Date: Re: [PATCH 12/12] xen: import arch generic part of xencomm.
- Previous by thread: alpha build errors with gcc 4.3
- Next by thread: Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
- Index(es):
Relevant Pages
- [PATCH] latencytop: fix kernel panic and memory leak on proc
... I think this patch is better than old ones. ... And the task struct which
gotten by get_proc_taskis never put. ... This patch changes the private is used to store inode,
... (Linux-Kernel) - [Patch 3/3] prepopulate/cache cleared pages
... This patch adds an entry for a cleared page to the task struct. ... extern
void prepopulate_vma; ... (Linux-Kernel) - Re: [PATCH] latencytop: fix kernel panic and memory leak on proc
... I posted 2 patches to fix kernel panic and memory leak. ... I think this patch
is better than old ones. ... cause NULL pointer dereference. ... And the task
struct which gotten by get_proc_taskis never put. ... (Linux-Kernel) - Re: [PATCH] proc: readdir race fix.
... Hi, Hit OOM-Killer, because of memory leak of task struct. ...
patch is attached. ... (Linux-Kernel) - Re: [RFC] mm: Move common segments checks to separate function
... > to separate helper function generic_segment_checks.WOW my eyes .... ...
I'm realy sorry but this patch is litle bit broken. ... (Linux-Kernel)