sched/completion: Document when to use wait_for_completion_io_*()
As discussed in [1], accounting IO is meant for blkio only. Document that so driver authors won't use them for device io. [1] http://thread.gmane.org/gmane.linux.drivers.i2c/20470 Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1415098901-2768-1-git-send-email-wsa@the-dreams.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Родитель
f622b429da
Коммит
a1bd537335
|
@ -148,7 +148,7 @@ EXPORT_SYMBOL(wait_for_completion_timeout);
|
||||||
*
|
*
|
||||||
* This waits to be signaled for completion of a specific task. It is NOT
|
* This waits to be signaled for completion of a specific task. It is NOT
|
||||||
* interruptible and there is no timeout. The caller is accounted as waiting
|
* interruptible and there is no timeout. The caller is accounted as waiting
|
||||||
* for IO.
|
* for IO (which traditionally means blkio only).
|
||||||
*/
|
*/
|
||||||
void __sched wait_for_completion_io(struct completion *x)
|
void __sched wait_for_completion_io(struct completion *x)
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,8 @@ EXPORT_SYMBOL(wait_for_completion_io);
|
||||||
*
|
*
|
||||||
* This waits for either a completion of a specific task to be signaled or for a
|
* This waits for either a completion of a specific task to be signaled or for a
|
||||||
* specified timeout to expire. The timeout is in jiffies. It is not
|
* specified timeout to expire. The timeout is in jiffies. It is not
|
||||||
* interruptible. The caller is accounted as waiting for IO.
|
* interruptible. The caller is accounted as waiting for IO (which traditionally
|
||||||
|
* means blkio only).
|
||||||
*
|
*
|
||||||
* Return: 0 if timed out, and positive (at least 1, or number of jiffies left
|
* Return: 0 if timed out, and positive (at least 1, or number of jiffies left
|
||||||
* till timeout) if completed.
|
* till timeout) if completed.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче