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: <537A6060.7070406@linux.vnet.ibm.com>
Date:	Tue, 20 May 2014 01:19:52 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Tejun Heo <tj@...nel.org>, akpm@...ux-foundation.org,
	fweisbec@...il.com, paulmck@...ux.vnet.ibm.com,
	peterz@...radead.org, 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 UPDATEDv2 3/3] CPU hotplug, smp: Flush any pending
 IPI callbacks before CPU offline

On 05/19/2014 09:48 PM, Oleg Nesterov wrote:
> On 05/19, Srivatsa S. Bhat wrote:
>>
>> However, an IPI sent much earlier might arrive late on the target CPU
>> (possibly _after_ the CPU has gone offline) due to hardware latencies,
>> and due to this, the smp-call-function callbacks queued on the outgoing
>> CPU might not get noticed (and hence not executed) at all.
> 
> OK, but
> 
>> +void flush_smp_call_function_queue(void)
>> +{
>> +	struct llist_head *head;
>> +	struct llist_node *entry;
>> +	struct call_single_data *csd, *csd_next;
>> +
>> +	WARN_ON(!irqs_disabled());
>> +
>> +	head = &__get_cpu_var(call_single_queue);
>> +
>> +	if (likely(llist_empty(head)))
>> +		return;
>> +
>> +	entry = llist_del_all(head);
>> +	entry = llist_reverse_order(entry);
>> +
>> +	llist_for_each_entry_safe(csd, csd_next, entry, llist) {
>> +		csd->func(csd->info);
>> +		csd_unlock(csd);
>> +	}
>> +}
> 
> why do we need it? Can't multi_cpu_stop() just call
> generic_smp_call_function_single_interrupt() ? This cpu is still online,
> we should not worry about WARN_ON(!cpu_online()) ?
> 

Ah, cool idea! :-) I'll use this method and post an updated patch.

Thank you!
 
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