Re: complete_all and "forever" completions

2016-10-27 Thread Daniel Wagner
On Wed, Oct 26, 2016 at 09:15:19AM +, Nicholas Mc Guire wrote: > On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > > Or do we need something like this in > > > do_wait_for_common(): > > > > > > if (x->done

Re: complete_all and "forever" completions

2016-10-26 Thread Dmitry Torokhov
On Wed, Oct 26, 2016 at 05:42:13PM +0200, Peter Zijlstra wrote: > On Wed, Oct 26, 2016 at 05:10:01AM -0700, Dmitry Torokhov wrote: > > On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > > > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > > > > Or do we need some

Re: complete_all and "forever" completions

2016-10-26 Thread Dmitry Torokhov
On Wed, Oct 26, 2016 at 05:12:36PM +, Nicholas Mc Guire wrote: > On Wed, Oct 26, 2016 at 05:42:13PM +0200, Peter Zijlstra wrote: > > On Wed, Oct 26, 2016 at 05:10:01AM -0700, Dmitry Torokhov wrote: > > > On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > > > > On Tue, Oct 25, 201

Re: complete_all and "forever" completions

2016-10-26 Thread Nicholas Mc Guire
On Wed, Oct 26, 2016 at 05:42:13PM +0200, Peter Zijlstra wrote: > On Wed, Oct 26, 2016 at 05:10:01AM -0700, Dmitry Torokhov wrote: > > On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > > > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > > > > Or do we need some

Re: complete_all and "forever" completions

2016-10-26 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 05:42:13PM +0200, Peter Zijlstra wrote: > Does something like so work? try_wait_for_completion() would need a similar change. > --- > kernel/sched/completion.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/kernel/sched/completion.c b/ke

Re: complete_all and "forever" completions

2016-10-26 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 05:10:01AM -0700, Dmitry Torokhov wrote: > On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > > Or do we need something like this in > > > do_wait_for_common(): > > > > > > if (x->done

Re: complete_all and "forever" completions

2016-10-26 Thread Dmitry Torokhov
On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > Hi, > > > > Reading Documentation/scheduler/completion.txt, complete_all() is > > Oh, there is documentation? /me goes read. > > > supposed to be usable with "fo

Re: complete_all and "forever" completions

2016-10-26 Thread Nicholas Mc Guire
On Wed, Oct 26, 2016 at 10:45:35AM +0200, Peter Zijlstra wrote: > On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > > Hi, > > > > Reading Documentation/scheduler/completion.txt, complete_all() is > > Oh, there is documentation? /me goes read. > > > supposed to be usable with "fo

Re: complete_all and "forever" completions

2016-10-26 Thread Peter Zijlstra
On Tue, Oct 25, 2016 at 03:30:54PM -0700, Dmitry Torokhov wrote: > Hi, > > Reading Documentation/scheduler/completion.txt, complete_all() is Oh, there is documentation? /me goes read. > supposed to be usable with "forever" completions, i.e. when we have an > action that happens once and stays "d

complete_all and "forever" completions

2016-10-25 Thread Dmitry Torokhov
Hi, Reading Documentation/scheduler/completion.txt, complete_all() is supposed to be usable with "forever" completions, i.e. when we have an action that happens once and stays "done" for the rest of lifetime of an object, no matter how many times we check for "doneness". However the implementation