From: Wang Qing <wangqing@vivo.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
linux-kernel@vger.kernel.org
Cc: Wang Qing <wangqing@vivo.com>
Subject: [PATCH] sched: completion: Reinterpret the meaning of completion_done()
Date: Tue, 16 Mar 2021 15:31:20 +0800 [thread overview]
Message-ID: <1615879880-16832-1-git-send-email-wangqing@vivo.com> (raw)
The most intuitive meaning of completion_done() is to see if a completion has
been done, done=0 can only indicate that someone may be waiting.
Signed-off-by: Wang Qing <wangqing@vivo.com>
---
kernel/sched/completion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index a778554f9dad..c8ea7575cc41
--- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c
@@ -304,10 +304,10 @@ bool try_wait_for_completion(struct completion *x)
EXPORT_SYMBOL(try_wait_for_completion);
/**
- * completion_done - Test to see if a completion has any waiters
+ * completion_done - Test to see if a completion has been done
* @x: completion structure
*
- * Return: 0 if there are waiters (wait_for_completion() in progress)
+ * Return: 0 if there may be waiters (wait_for_completion() in progress)
* 1 if there are no waiters.
*
* Note, this will always return true if complete_all() was called on @X.
--
2.27.0
reply other threads:[~2021-03-16 7:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1615879880-16832-1-git-send-email-wangqing@vivo.com \
--to=wangqing@vivo.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®