Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751211AbaLPWzL (ORCPT ); Tue, 16 Dec 2014 17:55:11 -0500 Received: from www.linutronix.de ([62.245.132.108]:52061 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751044AbaLPWzJ (ORCPT ); Tue, 16 Dec 2014 17:55:09 -0500 Date: Tue, 16 Dec 2014 23:54:51 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: Frederic Weisbecker , Preeti U Murthy , Viresh Kumar , Fengguang Wu , Frederic Weisbecker , "Pan, Jacob jun" , LKML , LKP Subject: Re: [nohz] 2a16fc93d2c: kernel lockup on idle injection In-Reply-To: <20141216224903.GS3219@twins.programming.kicks-ass.net> Message-ID: References: <548E8D01.9050707@linux.vnet.ibm.com> <20141215234443.GA23297@lerouge> <548FFD20.1040102@linux.vnet.ibm.com> <20141216142029.GA27375@lerouge> <20141216224903.GS3219@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Dec 2014, Peter Zijlstra wrote: > On Tue, Dec 16, 2014 at 10:21:27PM +0100, Thomas Gleixner wrote: > > /* rq->lock is held for evaluating rq->nr_running */ > > static void sched_ttwu_remote_nohz(struct rq *rq) > > { > > if (nohz_full_disabled()) > > return; > > > > if (rq->nr_running != 2) > > return; > > /* > > * Force smp_send_reschedule(). irq_exit() on the > > * remote cpu will handle the rest. > > */ > > smp_send_reschedule() is magic and does not guarantee irq_{enter,exit}() > being called, although we could audit and fix that. I know. I did not want to do all the work for the nohz folks. Otherwise I would have simply sent a patch. :) > > if (!task_uses_posix_timers(task)) > > clear_bit(NOHZ_POSIXTIMER_NEEDS_TICK, > > this_cpu_ptr(nohz_full_must_tick)); > > else > > set_bit(NOHZ_POSIXTIMER_NEEDS_TICK, > > this_cpu_ptr(nohz_full_must_tick)); > > > > /me hands you a few spare {} :-) Without the proper instruction manual they are pretty useless. > Arguably test state before doing a possibly pointless update? > > > local_irq_disable(); > > tick_full_nohz_update_state(); > > local_irq_enable(); > > } > > But yes, that should work just fine.. So I'm not the only one who thinks that this needs a proper reimplementation :) Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/