lkml.org 
[lkml]   [2013]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] smp.c: Quit unconditionally enabling irqs in on_each_cpu_mask().
From
On Thu, Aug 8, 2013 at 11:27 PM, David Daney <ddaney@caviumnetworks.com> wrote:
>
> On 08/08/2013 12:25 PM, Christoph Lameter wrote:
>>
>> On Thu, 8 Aug 2013, David Daney wrote:
>>
>>> I don't know of any bugs currently caused by this unconditional
>>> local_irq_enable(), but I want to use this function in MIPS/OCTEON
>>> early boot (when we have early_boot_irqs_disabled). This also makes
>>> this function have similar semantics to on_each_cpu() which is good in
>>> itself.
>>
>>
>> smp_call_function_many() wants interrupts enabled.
>
>
> That's what the comments say, but it isn't actually true.
>
> The usage introduced by the patch is no different than the existing usage in on_each_cpu() 30 line up in the file.
>

Regardless of the question of how smp_call_function_many() should be
called, the IRQ disable/enable pair is actually there to make sure the
provided function runs on the current CPU at the same conditions as it
would get called via the IPI.

I would at least consider putting a test there to make sure IRQs
really are disabled when entering the function, otherwise the bugs
stemming from incorrect use can be tricky to catch.

Just my 0.00002 BTC
Gilad



--
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@benyossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
-- Jean-Baptiste Queru


\
 
 \ /
  Last update: 2013-08-09 21:21    [W:0.046 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site