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]
Message-ID: <20150715191521.GN3717@linux.vnet.ibm.com>
Date:	Wed, 15 Jul 2015 12:15:21 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Daniel Wagner <daniel.wagner@...-carit.de>,
	Davidlohr Bueso <dave@...olabs.net>,
	Ingo Molnar <mingo@...hat.com>, Tejun Heo <tj@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] rcu: Create rcu_sync infrastructure

On Wed, Jul 15, 2015 at 09:08:15PM +0200, Oleg Nesterov wrote:
> On 07/15, Paul E. McKenney wrote:
> >
> > On Wed, Jul 15, 2015 at 08:15:11PM +0200, Peter Zijlstra wrote:
> > >
> > > No, it makes the read-side primitive contain an unconditional memory
> > > barrier, that forgoes the entire point.
> > >
> > > The writers are stupidly expensive already for they need global
> > > serialization, optimizing them in any way doesn't make sense.
> >
> > That could well be the case, but it would be good to see the numbers.
> 
> Please see the discussion in another "change sb_writers to use
> percpu_rw_semaphore".
> 
> The simple test-case from Dave
> 
> 	#include <fcntl.h>
> 	#include <stdlib.h>
> 	#include <unistd.h>
> 	#include <string.h>
> 	#include <assert.h>
> 
> 	#define BUFLEN 1
> 	#define FILESIZE (1 * 1024 * 1024)
> 
> 	char *testcase_description = "Separate file write";
> 
> 	void testcase(unsigned long long *iterations)
> 	{
> 		char buf[BUFLEN];
> 		char tmpfile[] = "/run/user/1000/willitscale.XXXXXX";
> 		int fd = mkstemp(tmpfile);
> 		unsigned long size = 0;
> 
> 		memset(buf, 0, sizeof(buf));
> 		assert(fd >= 0);
> 		unlink(tmpfile);
> 
> 		while (1) {
> 			int ret = write(fd, buf, BUFLEN);
> 			assert(ret >= 0);
> 			size += ret;
> 			if (size >= FILESIZE) {
> 				size = 0;
> 				lseek(fd, 0, SEEK_SET);
> 			}
> 
> 			(*iterations)++;
> 		}
> 	}
> 
> runs 12% faster if we "simply" remove mb's from sb_start/end_write().
> percpu_rw_semaphore does this too and has the approximately same
> performance, and we can (hopefully) remove this nontrivial, currently
> not 100% correct, and very "special" code in fs/super.c.

OK, if that is the type of workload you are using this stuff for,
you really don't want read-side memory barriers.

							Thanx, Paul

--
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