From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [tip:timers/core] hrtimers: Support resuming with two or more CPUs online (but stopped) Date: Fri, 5 Jul 2013 15:51:57 +0200 (CEST) Message-ID: References: <1372329348-20841-2-git-send-email-david.vrabel@citrix.com> <20130705093003.GA4033@cpv436-motbuntu> <51D69ACF.9020001@citrix.com> <51D6CE19.1050503@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51D6CE19.1050503@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Artem Savkov , LKML , xen-devel@lists.xen.org, john.stultz@linaro.org, "H. Peter Anvin" , Ingo Molnar List-Id: xen-devel@lists.xenproject.org On Fri, 5 Jul 2013, David Vrabel wrote: > On 05/07/13 11:25, Thomas Gleixner wrote: > > On Fri, 5 Jul 2013, David Vrabel wrote: > > > > You failed to CC Artem :( > > > >> On 05/07/13 10:30, Artem Savkov wrote: > >>> This commit brings up a warning about a potential deadlock in > >>> smp_call_function_many() discussed previously: > >>> https://lkml.org/lkml/2013/4/18/546 > >> > >> Can we just avoid the wait in clock_was_set()? Something like this? > >> > >> 8<------------------------------------------------------ > >> hrtimers: do not wait for other CPUs in clock_was_set() > >> > >> Calling on_each_cpu() and waiting in a softirq causes a WARNing about > >> a potential deadlock. > >> > >> Because hrtimers are per-CPU, it is sufficient to ensure that all > >> other CPUs' timers are reprogrammed as soon as possible and before the > >> next softirq on that CPU. There is no need to wait for this to be > >> complete on all CPUs. > > Unfortunately this doesn't look sufficient. on_each_cpu(..., 0) may > still wait for other calls to complete before queuing the calls due to > the use of a single set of per-CPU csd data. Hrmpf. I'll fix it in the non elegant way :( Thanks, tglx