From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbbL2Flm (ORCPT ); Tue, 29 Dec 2015 00:41:42 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:55749 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbbL2Fli (ORCPT ); Tue, 29 Dec 2015 00:41:38 -0500 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 29 Dec 2015 14:41:30 +0900 From: Byungchul Park To: Peter Zijlstra Cc: umgwanakikbuti@gmail.com, mingo@elte.hu, ktkhai@parallels.com, rostedt@goodmis.org, tglx@linutronix.de, juri.lelli@gmail.com, pang.xunlei@linaro.org, oleg@redhat.com, wanpeng.li@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/18] sched: balance callbacks v4 Message-ID: <20151229054130.GA3621@X58A-UD3R> References: <20150611124636.448700267@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150611124636.448700267@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2015 at 02:46:36PM +0200, Peter Zijlstra wrote: > Mike stumbled over a cute bug where the RT/DL balancing ops caused a bug. Hello. We also faced this bug in our embedded product using stable tree. Eventually, we found that these patch set exactly dealt with the problem. Now, I am just curious about if you have any plans to merge this to stable trees to make the stable trees stabler. Hm? > > The exact scenario is __sched_setscheduler() changing a (runnable) task from > FIFO to OTHER. In swiched_from_rt(), where we do pull_rt_task() we temporarity > drop rq->lock. This gap allows regular cfs load-balancing to step in and > migrate our task. > > However, check_class_changed() will happily continue with switched_to_fair() > which assumes our task is still on the old rq and makes the kernel go boom. > > Instead of trying to patch this up and make things complicated; simply disallow > these methods to drop rq->lock and extend the current post_schedule stuff into > a balancing callback list, and use that. > > This survives Mike's testcase. > > Changes since -v3: > - reworked the hrtimer stuff, again. -- Kirill, Oleg > - small changes to the new lockdep stuff > > Changes since -v2: > - reworked the hrtimer patch. -- Kirill, tglx > - added lock pinning > > Changes since -v1: > - make SMP=n build, > - cured switched_from_dl()'s cancel_dl_timer(). > > no real tests on the new parts other than booting / building kernels. > > > > -- > 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/