From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756630AbcARUSc (ORCPT ); Mon, 18 Jan 2016 15:18:32 -0500 Received: from www.linutronix.de ([62.245.132.108]:48318 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756596AbcARUSa convert rfc822-to-8bit (ORCPT ); Mon, 18 Jan 2016 15:18:30 -0500 Date: Mon, 18 Jan 2016 21:18:28 +0100 From: Sebastian Andrzej Siewior To: Mike Galbraith Cc: Thomas Gleixner , LKML , linux-rt-users Subject: Re: [rfc patch v4.4-rt2] sched: fix up preempt lazy forward port Message-ID: <20160118201828.GE12309@linutronix.de> References: <1453108103.4123.4.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1453108103.4123.4.camel@gmail.com> X-Key-Id: 2A8CF5D1 X-Key-Fingerprint: 6425 4695 FFF0 AA44 66CC 19E6 7B96 E816 2A8C F5D1 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 * Mike Galbraith | 2016-01-18 10:08:23 [+0100]: >--- a/arch/x86/entry/common.c >+++ b/arch/x86/entry/common.c >@@ -220,14 +220,14 @@ long syscall_trace_enter(struct pt_regs > > #define EXIT_TO_USERMODE_LOOP_FLAGS \ > (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ >- _TIF_NEED_RESCHED | _TIF_USER_RETURN_NOTIFY) >+ _TIF_NEED_RESCHED_MASK | _TIF_USER_RETURN_NOTIFY) > If I read this right, the loop where this define is used _TIF_ALLWORK_MASK in v4.1 of which _TIF_NEED_RESCHED_MASK was part of. Adding this will reassmeble the old behaviour. … >--- a/kernel/sched/core.c >+++ b/kernel/sched/core.c >@@ -3542,6 +3542,15 @@ asmlinkage __visible void __sched notrac > if (likely(!preemptible())) > return; > >+#ifdef CONFIG_PREEMPT_LAZY >+ /* >+ * Check for lazy preemption >+ */ >+ if (current_thread_info()->preempt_lazy_count && >+ !test_thread_flag(TIF_NEED_RESCHED)) >+ return; >+#endif >+ And this is a new piece. So you forbid that tasks leave the CPU if lazy_count > 0. Let me look closed why this is happening and if this is v4.1 … v4.4 or not. > preempt_schedule_common(); > } > NOKPROBE_SYMBOL(preempt_schedule); Sebastian