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:	Tue, 8 Oct 2013 11:59:27 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Ingo Molnar <mingo.kernel.org@...il.com>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/16] sched/wait: Collapse __wait_event macros -v5

On Sat, Oct 05, 2013 at 10:04:16AM +0200, Ingo Molnar wrote:
> 
> * Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > On Fri, Oct 04, 2013 at 10:44:05PM +0200, Peter Zijlstra wrote:
> > > 
> > > slightly related; do we want to do something like the following two
> > > patches?
> > 
> > and
> 
> Yeah, both look good to me - but I'd move them into 
> kernel/sched/completion.c and kernel/sched/wait.c if no-one objects.

Do you also want to suck in semaphore.c mutex.c rwsem.c spinlock.c etc?
Or do you want to create something like kernel/locking/ for all that.

I don't really mind too much either way except that I think that wait.c
and completion.c on their own make for a somewhat random split or
primitives.

> > --- /dev/null
> > +++ b/kernel/completion.c
> > @@ -0,0 +1,287 @@
> > +
> > +#include <linux/sched.h>
> > +#include <linux/completion.h>
> 
> Also, mind adding a small blurb at the top explaining what it's all about? 
> Just one sentence or two.

It got a bit longer:

+/*
+ * Generic wait-for-completion handler;
+ *
+ * It differs from semaphores in that their default case is the opposite,
+ * wait_for_completion default blocks whereas semaphore default non-block. The
+ * interface also makes it easy to 'complete' multiple waiting threads,
+ * something which isn't entirely natural for semaphores.
+ *
+ * But more importantly, the primitive documents the usage. Semaphores would
+ * typically be used for exclusion which gives rise to priority inversion.
+ * Waiting for completion is a typically sync point, but not an exclusion point.
+ */
--
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