From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: Dave Hansen <dave.hansen@intel.com>,
Ingo Molnar <mingo@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: Nadav Amit <namit@vmware.com>, Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH] smp: Fix the comments of smp_call_function_many()
Date: Tue, 14 Dec 2021 15:24:41 +0800 [thread overview]
Message-ID: <2871cf9d-ed8d-975f-ba46-429f8fe8560e@huawei.com> (raw)
In-Reply-To: <4493a665-23f9-0a39-6d9a-ec3bb97e7015@intel.com>
On 2021/12/14 2:05, Dave Hansen wrote:
> On 12/12/21 7:57 PM, Zhen Lei wrote:
>> diff --git a/kernel/smp.c b/kernel/smp.c
>> index 01a7c1706a58b1d..6ec884f41b7506d 100644
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -861,6 +861,13 @@ EXPORT_SYMBOL_GPL(smp_call_function_any);
>> #define SCF_WAIT (1U << 0)
>> #define SCF_RUN_LOCAL (1U << 1)
>>
>> +/**
>> + * smp_call_function_many_cond(): Run a function on a set of CPUs.
>> + * @scf_flags: Bitmask that controls the operation. If %SCF_WAIT is set,
>> + * wait (atomically) until function has completed on other CPUs. If
>> + * %SCF_RUN_LOCAL is set, the function will also be run locally
>> + * if the local CPU is set in the @cpumask.
>> + */
>
> Fixing up the smp_call_function_many() comment is a good idea. But, the
> new smp_call_function_many_cond() comment duplicates these which are
> _just_ above it:
Yes, maybe we just need to list SCF_WAIT and SCF_RUN_LOCAL here.
>
>> /*
>> * Flags to be used as scf_flags argument of smp_call_function_many_cond().
>> *
>> * %SCF_WAIT: Wait until function execution is completed
>> * %SCF_RUN_LOCAL: Run also locally if local cpu is set in cpumask
>> */
>> #define SCF_WAIT (1U << 0)
>> #define SCF_RUN_LOCAL (1U << 1)
>
> Could we comment the bits in one place?
Yes, I think we should delete the line "Flags to be used ..."
> .
>
prev parent reply other threads:[~2021-12-14 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 3:57 Zhen Lei
2021-12-13 18:05 ` Dave Hansen
2021-12-14 7:24 ` Leizhen (ThunderTown) [this message]
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=2871cf9d-ed8d-975f-ba46-429f8fe8560e@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.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®