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]
Message-Id: <20100330232221.826fe933.akpm@linux-foundation.org>
Date:	Tue, 30 Mar 2010 23:22:21 -0400
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Borislav Petkov <bp@...64.org>
Cc:	davej@...hat.com, trenn@...e.de, linux@...inikbrodowski.net,
	mingo@...e.hu, hpa@...or.com, tglx@...utronix.de,
	cpufreq@...r.kernel.org, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [-v2 PATCH 2/6] powernow-k8: Add core performance boost support

On Wed, 31 Mar 2010 08:13:43 +0200 Borislav Petkov <bp@...64.org> wrote:

> > > +static void _cpb_toggle_msrs(bool t)
> > > +{
> > > +	int cpu;
> > > +
> > > +	rdmsr_on_cpus(cpu_online_mask, MSR_K7_HWCR, msrs);
> > > +
> > > +	for_each_cpu(cpu, cpu_online_mask) {
> > > +		struct msr *reg = per_cpu_ptr(msrs, cpu);
> > > +		if (t)
> > > +			reg->l &= ~BIT(25);
> > > +		else
> > > +			reg->l |= BIT(25);
> > > +	}
> > > +	wrmsr_on_cpus(cpu_online_mask, MSR_K7_HWCR, msrs);
> > > +}
> > 
> > What prevents cpu_online_mask from changing while this is happening?
> 
> Frankly, nothing.

Sneak a get_online_cpus()/put_online_cpus() in there?

> And yes, we talked a lot about this internally, since,
> you need this bit cleared on _all_ cores for the processor to boost.
> Now, if you've offlined some of the cores, you won't be able to execute
> any code on them and thus clear this bit.
> 
> However, this interface is there only for benchmarking purposes and
> stuff, i.e. normally, you shouldn't need to touch it _at_ _all_ and
> boosting will work out of the box and without user interaction.
> 
> So, IMHO, hotplug notifiers won't work since you need all cores online
> at that particular moment to enable boosting. It sounds more reasonable
> to me to WARN when a core is missing from the mask that boosting cannot
> be enabled. I'll cook up something later today.
--
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