[PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-17 Thread Jason Wang
No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c |5 +++-- 1 files changed, 3

[PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to limit the number of buffers it returns (for mergeable buffer, the quota is simply UIO_MAXIOV, for big

[PATCH 3/3] vhost-net: use lock_sock_fast() in peek_head_len()

2011-01-17 Thread Jason Wang
We can use lock_sock_fast() instead of lock_sock() in order to get speedup in peek_head_len(). Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to limit the number of buffers it

Re: [PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 04:10:59PM +0800, Jason Wang wrote: No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop. Signed-off-by: Jason Wang jasow...@redhat.com

Re: [PATCH 3/3] vhost-net: use lock_sock_fast() in peek_head_len()

2011-01-17 Thread Eric Dumazet
Le lundi 17 janvier 2011 à 16:11 +0800, Jason Wang a écrit : We can use lock_sock_fast() instead of lock_sock() in order to get speedup in peek_head_len(). Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] virtio-net: fix a typo

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 09:14:19AM +0100, Aurelien Jarno wrote: fitler - filter Cc: net...@vger.kernel.org Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Aurelien Jarno aurel...@aurel32.net Acked-by: Michael S. Tsirkin m...@redhat.com obviously. Cc:

Re: [PATCH 3/3] vhost-net: use lock_sock_fast() in peek_head_len()

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 04:11:17PM +0800, Jason Wang wrote: We can use lock_sock_fast() instead of lock_sock() in order to get speedup in peek_head_len(). Signed-off-by: Jason Wang jasow...@redhat.com Queued for 2.6.39, thanks everyone. --- drivers/vhost/net.c |4 ++-- 1 files

Re: Flow Control and Port Mirroring Revisited

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 07:37:30AM +0900, Simon Horman wrote: On Fri, Jan 14, 2011 at 08:54:15AM +0200, Michael S. Tsirkin wrote: On Fri, Jan 14, 2011 at 03:35:28PM +0900, Simon Horman wrote: On Fri, Jan 14, 2011 at 06:58:18AM +0200, Michael S. Tsirkin wrote: On Fri, Jan 14, 2011 at

Re: Flow Control and Port Mirroring Revisited

2011-01-17 Thread Michael S. Tsirkin
On Mon, Jan 17, 2011 at 10:26:25AM +1030, Rusty Russell wrote: On Mon, 17 Jan 2011 09:07:30 am Simon Horman wrote: [snip] I've been away, but what concerns me is that socket buffer limits are bypassed in various configurations, due to skb cloning. We should probably drop such limits

[PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Peter Zijlstra
For future rework of try_to_wake_up() we'd like to push part of that onto the CPU the task is actually going to run on, in order to do so we need a generic callback from the existing scheduler IPI. This patch introduces such a generic callback: scheduler_ipi() and implements it as a NOP. I

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Peter Zijlstra
On Mon, 2011-01-17 at 11:26 +, Russell King - ARM Linux wrote: On Mon, Jan 17, 2011 at 12:07:13PM +0100, Peter Zijlstra wrote: diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 42aa078..c4a570b 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Peter Zijlstra
On Mon, 2011-01-17 at 12:31 +0100, Peter Zijlstra wrote: On Mon, 2011-01-17 at 11:26 +, Russell King - ARM Linux wrote: Maybe remove the comment everything is done on the interrupt return path as with this function call, that is no longer the case. (Removed am33, m32r-ka, m32r,

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Martin Schwidefsky
On Mon, 17 Jan 2011 12:07:13 +0100 Peter Zijlstra pet...@infradead.org wrote: I visited existing smp_send_reschedule() implementations and tried to add a call to scheduler_ipi() in their handler part, but esp. for MIPS I'm not quite sure I actually got all of them. diff --git

Re: [PATCH 13/14] x86/ticketlock: add slowpath logic

2011-01-17 Thread Srivatsa Vaddagiri
On Tue, Nov 16, 2010 at 01:08:44PM -0800, Jeremy Fitzhardinge wrote: From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Maintain a flag in both LSBs of the ticket lock which indicates whether anyone is in the lock slowpath and may need kicking when the current holder unlocks. The

Re: [uclinux-dist-devel] [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Peter Zijlstra
On Mon, 2011-01-17 at 14:49 -0500, Mike Frysinger wrote: On Mon, Jan 17, 2011 at 06:07, Peter Zijlstra wrote: Also, while reading through all this, I noticed the blackfin SMP code looks to be broken, it simply discards any IPI when low on memory. not really. see changelog of commit

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Benjamin Herrenschmidt
On Mon, 2011-01-17 at 12:07 +0100, Peter Zijlstra wrote: For future rework of try_to_wake_up() we'd like to push part of that onto the CPU the task is actually going to run on, in order to do so we need a generic callback from the existing scheduler IPI. This patch introduces such a generic

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Peter Zijlstra
On Tue, 2011-01-18 at 07:31 +1100, Benjamin Herrenschmidt wrote: Beware of false positive, I've used fake reschedule IPIs in the past for other things (like kicking a CPU out of sleep state for unrelated reasons). Nothing that I know that is upstream today but some of that might come back.

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Russell King - ARM Linux
On Mon, Jan 17, 2011 at 12:07:13PM +0100, Peter Zijlstra wrote: diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 42aa078..c4a570b 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -587,6 +587,7 @@ handle_ipi(struct pt_regs *regs) case

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Russell King - ARM Linux
On Mon, Jan 17, 2011 at 12:41:49PM +0100, Peter Zijlstra wrote: === --- linux-2.6.orig/arch/arm/kernel/smp.c +++ linux-2.6/arch/arm/kernel/smp.c @@ -575,10 +575,7 @@ asmlinkage void __exception do_IPI(struc

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Chris Metcalf
On 1/17/2011 6:41 AM, Peter Zijlstra wrote: Index: linux-2.6/arch/tile/kernel/smp.c === --- linux-2.6.orig/arch/tile/kernel/smp.c +++ linux-2.6/arch/tile/kernel/smp.c @@ -184,12 +184,8 @@ void flush_icache_range(unsigned long st

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Jesper Nilsson
On Mon, Jan 17, 2011 at 12:41:49PM +0100, Peter Zijlstra wrote: Index: linux-2.6/arch/cris/arch-v32/kernel/smp.c === --- linux-2.6.orig/arch/cris/arch-v32/kernel/smp.c +++ linux-2.6/arch/cris/arch-v32/kernel/smp.c @@ -340,15

Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread David Daney
On 01/17/2011 03:07 AM, Peter Zijlstra wrote: For future rework of try_to_wake_up() we'd like to push part of that onto the CPU the task is actually going to run on, in order to do so we need a generic callback from the existing scheduler IPI. This patch introduces such a generic callback:

Re: [uclinux-dist-devel] [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()

2011-01-17 Thread Mike Frysinger
On Mon, Jan 17, 2011 at 06:07, Peter Zijlstra wrote: Also, while reading through all this, I noticed the blackfin SMP code looks to be broken, it simply discards any IPI when low on memory. not really. see changelog of commit 73a400646b8e26615f3ef1a0a4bc0cd0d5bd284c. -mike

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily done by adding a quota to the get_rx_bufs() which is used to

Re: [PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:10:59PM +0800, Jason Wang wrote: No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop.

Re: [PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-17 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 12:26:17PM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:10:59PM +0800, Jason Wang wrote: No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Michael S. Tsirkin
On Tue, Jan 18, 2011 at 11:05:33AM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to unify them. This could be easily

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Tue, Jan 18, 2011 at 11:05:33AM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries to