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] [day] [month] [year] [list]
Message-ID: <6E3BC7F7C9A4BF4286DD4C043110F30B4E0B8CD75A@shsmsx502.ccr.corp.intel.com>
Date:	Sat, 16 Apr 2011 18:27:12 +0800
From:	"Shi, Alex" <alex.shi@...el.com>
To:	Tim Chen <tim.c.chen@...ux.intel.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Nick Piggin <npiggin@...nel.dk>
CC:	Andi Kleen <ak@...ux.intel.com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Li, Shaohua" <shaohua.li@...el.com>
Subject: RE: [PATCH] vfs: Fix RCU path walk failiures due to uninitialized
 nameidata seq number for root directory

This can fix dbenchthreads/aim7 regressions from 39-rc1 kernel, that caused by path_init_rcu/path_init merge. 


Regards! 
Alex  
>-----Original Message-----
>From: Tim Chen [mailto:tim.c.chen@...ux.intel.com]
>Sent: Saturday, April 16, 2011 2:39 AM
>To: Alexander Viro; Nick Piggin
>Cc: Andi Kleen; linux-fsdevel@...r.kernel.org; linux-kernel@...r.kernel.org; Li, Shaohua; Shi, Alex
>Subject: [PATCH] vfs: Fix RCU path walk failiures due to uninitialized nameidata seq number for root directory
>
>During RCU walk in path_lookupat and path_openat, the rcu lookup
>frequently failed because when root directory was looked up, seq number
>was not properly set in nameidata.  We dropped out of RCU walk in
>nameidata_drop_rcu due to mismatch in directory entry's seq number.  We
>reverted to slow path walk that need to take references.
>
>With the following patch, I saw a 50% increase in an exim mail server
>benchmark throughput on a 4-socket Nehalem-EX system.
>
>Thanks.
>
>Tim
>
>Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
>diff --git a/fs/namei.c b/fs/namei.c
>index 3cb616d..e4b27a6 100644
>--- a/fs/namei.c
>+++ b/fs/namei.c
>@@ -697,6 +697,7 @@ static __always_inline void set_root_rcu(struct nameidata *nd)
> 		do {
> 			seq = read_seqcount_begin(&fs->seq);
> 			nd->root = fs->root;
>+			nd->seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
> 		} while (read_seqcount_retry(&fs->seq, seq));
> 	}
> }
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ