Re: [PATCH] ARM: Check for is_smp for tlb_ops and cache_ops boardcast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> [101006 15:25]:
> On Wed, Oct 06, 2010 at 07:44:14AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> [101005 15:24]:
> > > On Tue, Oct 05, 2010 at 03:19:52PM -0700, Tony Lindgren wrote:
> > > > * Tony Lindgren <tony@xxxxxxxxxxx> [100907 20:04]:
> > > > > This should not be needed when running on UP systems.
> > > > > 
> > > > > Additionally we will also get an undefined instruction on ARM cores
> > > > > without the extended CPUID registers with CONFIG_SMP_ON_UP.
> > > > > 
> > > > > Also, we can now remove the is_smp() test from mmu.c.
> > > > 
> > > > Just FYI, I've updated this one more time with to use cpus_empty
> > > > instead of !smp_on_up() here as well.
> > > 
> > > What's the rationale?
> > 
> > With CPU hotplug if the other SMP cores are unplugged for PM or
> > other reasons, no need to do the broadcast.
> 
> Yes, but why this expensive test when the smp_on_up() is much cheaper?
> 
> smp_call_function_many() already takes care of the "no other CPUs"
> case, which is used by on_each_cpu_mask() and on_each_cpu(), which
> means these functions won't broadcast the operations to other CPUs
> when they're offline.
> 
> In any case, if you think that we broadcast every operation to all
> CPUs, you're mistaken - TLB and cache ops are broadcast to only
> those CPUs which the thread is running on, or in the case of non-MM
> specific, to all online CPUs.

OK thanks, that's what I was missing.
 
> So the only thing we have to worry about is "is there an ID register
> available" which is covered by the is_smp() test.  Checking the CPU
> mask is far more expensive and imho ends up needlessly adding to the
> complexity.

OK. In that case, the patch to use is the previous one:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6429/1

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux