From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754778AbdDLQWL (ORCPT ); Wed, 12 Apr 2017 12:22:11 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:39510 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753333AbdDLQWD (ORCPT ); Wed, 12 Apr 2017 12:22:03 -0400 Date: Wed, 12 Apr 2017 18:21:57 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: LKML , Ingo Molnar , "Paul E. McKenney" Subject: Re: [RFC][PATCH] sched: Have do_idle() call __schedule() without enabling preemption Message-ID: <20170412162157.ukmhksytgrc2qx2e@hirez.programming.kicks-ass.net> References: <20170411224413.72d9344a@grimm.local.home> <20170412104124.4639c8ff@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170412104124.4639c8ff@gandalf.local.home> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 12, 2017 at 10:41:24AM -0400, Steven Rostedt wrote: > [ tl;dr; version ] > > Peter, In order to have synchronize_rcu_tasks() work, the idle task can > never be preempted. There's a very small window in > schedule_preempt_disable() that enables preemption, and when this > happens, it breaks synchronize_rcu_tasks() (see above email for > details). > > Is there any reason to enable preemption, or can we simply have idle > call into schedule without ever allowing it to be preempted, as in my > patch? Dunno,.. this changelog should convince me, not make me do the work :-) > Note, it is almost good enough to just change > schedule_preempt_disable() to do the exact same thing, but there's one > instance in kernel/locking/mutex.c that calls it in a non running state. The point being that that must not happen because of sched_submit_work(), which, for idle, should not matter.