Stephen Hemminger | 1 Feb 06:29
Favicon

Re: virt-manager broken by bind(0) in net-next.

On Fri, 30 Jan 2009 19:41:59 +0100
Eric Dumazet <dada1@...> wrote:

> Stephen Hemminger a écrit :
> > On Fri, 30 Jan 2009 23:53:37 +1100
> > Herbert Xu <herbert@...> wrote:
> > 
> >> Evgeniy Polyakov <zbr@...> wrote:
> >>> So it is not explicit bind call, but port autoselection in the
> >>> connect(). Can you check what errno is returned?
> >>> Did I understand it right, that connect fails, you try different
> >>> address, but then suddenly all those sockets become 'alive'?
> >> Yes, I think a good strace vs. a bad strace would be really helpful
> >> in these cases.
> >>
> >> Thanks,
> > 
> > I have the strace but it comes up no different.
> > What is different is that in the broken case (net-next), I see
> > IPV6 being used:
> > 
> > State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port   
> > ESTAB      23769  0        ::ffff:127.0.0.1:5900      ::ffff:127.0.0.1:55987   
> > ESTAB      0      0               127.0.0.1:55987            127.0.0.1:5900
> > 
> > and in the working case (2.6.29-rc3), IPV4 is being used
> > State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port   
> > ESTAB      0      0               127.0.0.1:58894            127.0.0.1:5901    
> > ESTAB      0      0               127.0.0.1:5901             127.0.0.1:58894 
> > 
(Continue reading)

Stephen Hemminger | 1 Feb 06:58
Favicon

Re: virt-manager broken by bind(0) in net-next.

On Sat, 31 Jan 2009 00:50:08 +0300
Evgeniy Polyakov <zbr@...> wrote:

> On Fri, Jan 30, 2009 at 07:41:59PM +0100, Eric Dumazet
(dada1@...) wrote:
> > Reviewing commit a9d8f9110d7e953c2f2b521087a4179677843c2a
> > 
> > I see use of a hashinfo->bsockets field that :
> > 
> > - lacks proper lock/synchronization
> 
> It should contain rough number of sockets, there is no need to be very
> precise because of this hueristic.
> 
> > - suffers from cache line ping pongs on SMP
> 
> I used free alignment slot so that socket structure would not be
> icreased.
> 
> > Also there might be a problem at line 175
> > 
> > if (sk->sk_reuse && sk->sk_state != TCP_LISTEN && --attempts >= 0) { 
> > 	spin_unlock(&head->lock);
> > 	goto again;
> > 
> > If we entered inet_csk_get_port() with a non null snum, we can "goto again"
> > while it was not expected.
> > 
> > diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> > index df8e72f..752c6b2 100644
(Continue reading)

David Miller | 1 Feb 10:07
Favicon

Re: virt-manager broken by bind(0) in net-next.

From: Stephen Hemminger <shemminger <at> vyatta.com>
Date: Sat, 31 Jan 2009 21:58:50 -0800

> Yes, this fixes the problem, not sure who wants the honors for
> sending a signed off version.

I'll sort it out.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Evgeniy Polyakov | 1 Feb 13:42
Favicon
Gravatar

Re: virt-manager broken by bind(0) in net-next.

Hi Eric.

On Sat, Jan 31, 2009 at 11:17:15AM +0100, Eric Dumazet (dada1 <at> cosmosbay.com) wrote:
> We only need to know if the *fix* is solving Stephen problem
> 
> About performance effects of careful variable placement and percpu counter
> strategy you might consult as an example :
> 
> http://lkml.indiana.edu/hypermail/linux/kernel/0812.1/01624.html

Impressive, but to be 100% fair it is not only because of the cache line
issues :)

> Now, with these patches applied, try to see effect of your new bsockets field
> on a network workload doing lot of socket bind()/unbind() calls...
> 
> With current kernels, you probably wont notice because of inode/dcache hot
> cache lines, but it might change eventually...

David applied the patch which fixed the problem, so we can return to the
cache line issues. What do you think about the last version where
bsockets field was placed at the very end of the structure and with
cacheline_aligned_on_smp attribute?

--

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Evgeniy Polyakov | 1 Feb 13:44
Favicon
Gravatar

Re: virt-manager broken by bind(0) in net-next.

On Sat, Jan 31, 2009 at 09:58:50PM -0800, Stephen Hemminger (shemminger <at> vyatta.com) wrote:
> > I think it should be smallest_size != -1, since we really want to goto
> > to the again label when hueristic is used, which in turn changes
> > smallest_size.
> 
> Yes, this fixes the problem, not sure who wants the honors for sending a signed off
> version.

Thanks for testing Stephen. David applied that version and cut the
Gordian knot :)

--

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Eric Dumazet | 1 Feb 17:12

Re: virt-manager broken by bind(0) in net-next.

Evgeniy Polyakov a écrit :
> Hi Eric.
> 
> On Sat, Jan 31, 2009 at 11:17:15AM +0100, Eric Dumazet (dada1 <at> cosmosbay.com) wrote:
>> We only need to know if the *fix* is solving Stephen problem
>>
>> About performance effects of careful variable placement and percpu counter
>> strategy you might consult as an example :
>>
>> http://lkml.indiana.edu/hypermail/linux/kernel/0812.1/01624.html
> 
> Impressive, but to be 100% fair it is not only because of the cache line
> issues :)
> 
>> Now, with these patches applied, try to see effect of your new bsockets field
>> on a network workload doing lot of socket bind()/unbind() calls...
>>
>> With current kernels, you probably wont notice because of inode/dcache hot
>> cache lines, but it might change eventually...
> 
> David applied the patch which fixed the problem, so we can return to the
> cache line issues. What do you think about the last version where
> bsockets field was placed at the very end of the structure and with
> cacheline_aligned_on_smp attribute?
> 

Yes, at a minimum, move it away from first cache line.

And using atomic_t so that we dont have to discuss about accumulated
errors on SMP on this variable. We will see later if percpu counter
(Continue reading)

Evgeniy Polyakov | 1 Feb 18:40
Favicon
Gravatar

Re: virt-manager broken by bind(0) in net-next.

On Sun, Feb 01, 2009 at 05:12:41PM +0100, Eric Dumazet (dada1 <at> cosmosbay.com) wrote:
> > David applied the patch which fixed the problem, so we can return to the
> > cache line issues. What do you think about the last version where
> > bsockets field was placed at the very end of the structure and with
> > cacheline_aligned_on_smp attribute?
> > 
> 
> Yes, at a minimum, move it away from first cache line.
> 
> And using atomic_t so that we dont have to discuss about accumulated
> errors on SMP on this variable. We will see later if percpu counter
> is wanted or not.
> 
> Thank you
> 
> [PATCH] net: move bsockets outside of read only beginning of struct inet_hashinfo
> 
> And switch bsockets to atomic_t since it might be changed in parallel.
> 
> Signed-off-by: Eric Dumazet <dada1 <at> cosmosbay.com>

Ok, let's do it this way. Ack.
Thank you Eric.

--

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

David Miller | 1 Feb 21:31
Favicon

Re: virt-manager broken by bind(0) in net-next.

From: Evgeniy Polyakov <zbr <at> ioremap.net>
Date: Sun, 1 Feb 2009 20:40:25 +0300

> On Sun, Feb 01, 2009 at 05:12:41PM +0100, Eric Dumazet (dada1 <at> cosmosbay.com) wrote:
> > [PATCH] net: move bsockets outside of read only beginning of struct inet_hashinfo
> > 
> > And switch bsockets to atomic_t since it might be changed in parallel.
> > 
> > Signed-off-by: Eric Dumazet <dada1 <at> cosmosbay.com>
> 
> Ok, let's do it this way. Ack.
> Thank you Eric.

Applied, thanks everyone.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

john.levon | 4 Feb 23:23
Picon

[PATCH] Clean up help message for --livecd

# HG changeset patch
# User john.levon@...
# Date 1233786168 28800
# Node ID b56aabae9044c5390c7d51c0f468302b5bacf376
# Parent  446816fe543fdb43d991d4b8fae0e14a155d1c26
Clean up help message for --livecd

Signed-off-by: John Levon <john.levon@...>

diff --git a/virt-install b/virt-install
--- a/virt-install
+++ b/virt-install
@@ -389,7 +389,7 @@ def parse_args():
     insg.add_option("", "--pxe", action="store_true", dest="pxe",
                     help=_("Boot from the network using the PXE protocol"))
     insg.add_option("", "--livecd", action="store_true", dest="livecd",
-                    help=_("Treat the CDROM media is a LiveCD"))
+                    help=_("Treat the CD-ROM media as a Live CD"))
     insg.add_option("-x", "--extra-args", type="string", dest="extra",
                     default="",
                     help=_("Additional arguments to pass to the kernel "
Atsushi SAKAI | 5 Feb 06:45
Favicon

Question about virt-viewer connection when guest reboots

Hi,

  I have a question about virt-viewer connection when guest reboots.
As you know, when guest reboots, virt-viewer destroyed.

Is there any way to keep virt-viewer running over guest reboots?

Thanks
Atsushi SAKAI

Gmane