lkml.org 
[lkml]   [2016]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectcomplete_all and "forever" completions
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 for complete_all() simply sets the counter to be greater
or equal UINT_MAX/2 and do_wait_for_common() happily decreases it on
every call.

Is it simply an artefact of [older] implementation where we do not
expect to make that many calls to wait_for_completion*() so that
completion that is signalled with ocmplete_all() is practically stays
signalled forever? Or do we need something like this in
do_wait_for_common():

if (x->done < UINT_MAX/2)
x->done--;

Thanks.

--
Dmitry

\
 
 \ /
  Last update: 2016-10-26 00:31    [W:0.057 / U:2.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site