lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 20 Oct 2013 08:42:03 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Petr Mladek <pmladek@...e.cz>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	x86@...nel.org
Subject: Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

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@...ux.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.

							Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ