From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: paulmck@linux.vnet.ibm.com
Cc: Steven Rostedt <rostedt@goodmis.org>,
Petr Mladek <pmladek@suse.cz>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org, x86@kernel.org,
"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot
Date: Mon, 28 Oct 2013 18:18:08 +0900 [thread overview]
Message-ID: <526E2BD0.3080807@hitachi.com> (raw)
In-Reply-To: <20131020154203.GN4118@linux.vnet.ibm.com>
(2013/10/21 0:42), Paul E. McKenney wrote:
> On Sat, Oct 19, 2013 at 06:02:39PM -0400, Steven Rostedt wrote:
>> On Sat, 19 Oct 2013 14:33:50 -0700
>> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
>>
>>
>>>>> It's used to convert the calls to mcount to nops. But maybe a better
>>>>> thing to do is to check if we only have a single CPU:
>>>>>
>>>>> static void run_sync(void)
>>>>> {
>>>>> if (num_online_cpus() != 1)
>>>>
>>>> Hmm, to be more robust to handle our future "ideal" machines, perhaps
>>>> this should be:
>>>>
>>>> /* Ideally we would like to run on zero CPUS! */
>>>> if (num_online_cpus() < 2)
>>>
>>
>> Bah! And for such a simple computation, I got it wrong.
>>
>>
>> /* Ideally we would like to run on zero CPUS! */
>> if (num_online_cpus > 1)
>>
>> But I guess the question comes. If we are running on zero CPUS, should
>> we perform the "on_each_cpu(do_sync_core, NULL, 1);" or not? Same goes
>> with 5i-3 CPUS, or negative number CPUs. If we need to do on_each_cpu(),
>> then I guess the != 1 will suffice.
>
> Makes sense to me! Whoever adds the ability to run on zero, negative,
> or complex numbers of CPUs can adjust on_each_cpu() accordingly.
Thanks for making it clear!
Petr, could you update your patch according to this discussion?
I think temporally enabling irq is not a good idea.
BTW, adding an assertion(BUG_ON(irq_disabled()) at the top of text_poke_bp)
will be good for debugging.
Thanks again!
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
prev parent reply other threads:[~2013-10-28 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 14:27 [PATCH 2/6] x86: allow to call text_poke_bp during boot Petr Mladek
2013-10-19 15:02 ` Masami Hiramatsu
2013-10-19 19:16 ` Steven Rostedt
2013-10-19 19:19 ` Steven Rostedt
2013-10-19 21:33 ` Paul E. McKenney
2013-10-19 21:58 ` Steven Rostedt
2013-10-19 22:02 ` Steven Rostedt
2013-10-20 15:42 ` Paul E. McKenney
2013-10-28 9:18 ` Masami Hiramatsu [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=526E2BD0.3080807@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=fweisbec@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
--cc=x86@kernel.org \
--cc=yrl.pp-manager.tt@hitachi.com \
/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