lkml.org 
[lkml]   [2014]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2014-05-19 19:01    [W:0.081 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site