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: <20140519161836.GA30387@redhat.com>
Date:	Mon, 19 May 2014 18:18:36 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.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, 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()) ?

Oleg.

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