lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 2 Mar 2012 20:24:21 +0300
From:	Sergei Trofimovich <slyich@...il.com>
To:	Jason Wang <jasowang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	Sergei Trofimovich <slyfox@...too.org>,
	Glauber Costa <glommer@...allels.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCHv 2] tcp: properly initialize tcp memory limits part 2
 (fix nfs regression)

> > The change looks like a typo (division flipped to multiplication):
> >> limit = nr_free_buffer_pages() / 8;
> >> limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 10);
> 
> Hi, thanks for the reporting. It's not a typo. It was previously: 
> sysctl_tcp_mem[1] << (PAGE_SHIFT -  7). Looks like we need to do the 
> limit check before shift the value. Please try the following patch, thanks.

Still does not help. I test it by checking sha1sum of a large file over NFS
(small files seem to work simetimes):

    $ strace sha1sum /gentoo/distfiles/gcc-4.6.2.tar.bz2 
    ...
    open("/gentoo/distfiles/gcc-4.6.2.tar.bz2", O_RDONLY
    <HUNG>
After a certain timeout dmesg gets odd spam:
[  314.848094] nfs: server vmhost not responding, still trying
[  314.848134] nfs: server vmhost not responding, still trying
[  314.848145] nfs: server vmhost not responding, still trying
[  314.957047] nfs: server vmhost not responding, still trying
[  314.957066] nfs: server vmhost not responding, still trying
[  314.957075] nfs: server vmhost not responding, still trying
[  314.957085] nfs: server vmhost not responding, still trying
[  314.957100] nfs: server vmhost not responding, still trying
[  314.958023] nfs: server vmhost not responding, still trying
[  314.958035] nfs: server vmhost not responding, still trying
[  314.958044] nfs: server vmhost not responding, still trying
[  314.958054] nfs: server vmhost not responding, still trying

looks like bogus messages. Might be relevant to mishandled timings
somewhere else or a bug in nfs code.

> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 22ef5f9..4035aab 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -3299,8 +3299,8 @@ void __init tcp_init(void)
> 
>          tcp_init_mem(&init_net);
>          /* Set per-socket limits to no more than 1/128 the pressure 
> threshold */
> -       limit = nr_free_buffer_pages() << (PAGE_SHIFT - 10);
> -       limit = max(limit, 128UL);
> +       limit = nr_free_buffer_pages() / 8;
> +       limit = max(limit, 128UL) << (PAGE_SHIFT - 7);
>          max_share = min(4UL*1024*1024, limit);
> 
>          sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
> 
> 
> 


-- 

  Sergei

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ