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] [day] [month] [year] [list]
Message-ID: <537B319D.30603@linux.vnet.ibm.com>
Date:	Tue, 20 May 2014 16:12:37 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
	akpm@...ux-foundation.org, fweisbec@...il.com,
	paulmck@...ux.vnet.ibm.com, tglx@...utronix.de, mingo@...nel.org,
	rusty@...tcorp.com.au, hch@...radead.org, mgorman@...e.de,
	riel@...hat.com, bp@...e.de, rostedt@...dmis.org,
	mgalbraith@...e.de, ego@...ux.vnet.ibm.com, rjw@...ysocki.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending
 IPI callbacks before CPU offline

On 05/20/2014 04:08 PM, Srivatsa S. Bhat wrote:
> On 05/20/2014 04:01 PM, Srivatsa S. Bhat wrote:
>> On 05/20/2014 03:55 PM, Peter Zijlstra wrote:
>>> On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote:
>>>>> The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog
>>>>> is wrong or the patch is.
>>>>>
>>>>
>>>> Yes, I know that multi_cpu_stop() isn't exclusive to hotplug. That's why
>>>> I have explicitly referred to CPU hotplug in the comment as well as the
>>>> changelog.
>>>>
>>>> But I totally agree that code-wise this is not the best way to do it since
>>>> this affects (although harmlessly) usecases other than hotplug as well.
>>>>
>>>> Do you have any other suggestions?
>>>
>>> How about making a kernel/smp.c hotplug notifier and stuffing it in the
>>> CPU_DYING list? That's typically after we've already torn down the
>>> interrupts for that cpu, so no chance of any new ones coming in.
>>>
>>> Or is that too late?
>>>
>>
>> No, that should work just fine. Thank you for the suggestion! I'll give
>> it a shot.
>>
> 
> The only problem will be that CPU_DYING notifiers are run after marking
> the CPU offline, and hence the warning will trigger. We can avoid that by
> defining a __generic_smp_call_function_single_interrupt() that doesn't
> check for cpu_online(smp_processor_id) and call this function from the
> hotplug notifier.
> 
> 

(And that's probably something to fix while cleaning up hotplug later:
Why should we mark the CPU offline _before_ running CPU_DYING? It makes
more sense to mark it offline _after_ running CPU_DYING notifiers. I'll
audit that path as well and see what I can find).
 
Regards,
Srivatsa S. Bhat

--
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