From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755400AbdDMIpF (ORCPT ); Thu, 13 Apr 2017 04:45:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48918 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbdDMIpC (ORCPT ); Thu, 13 Apr 2017 04:45:02 -0400 Date: Thu, 13 Apr 2017 10:44:53 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: LKML , Ingo Molnar , Andrew Morton , "Paul E. McKenney" , Thomas Gleixner Subject: Re: [PATCH v2] sched: Have do_idle() call __schedule() without enabling preemption Message-ID: <20170413084453.ad4falb7kc53viri@hirez.programming.kicks-ass.net> References: <20170412142744.6ff07236@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170412142744.6ff07236@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 02:27:44PM -0400, Steven Rostedt wrote: > + * schedule_idle() is similar to schedule_preempt_disable() except > + * that it never enables preemption. That's not right. The primary distinction is that it doesn't call sched_submit_work(). And because that function is a no-op for the idle thread, the idle thread can do without calling that and therefore avoid the preemption window. You also need a few words about fake idle threads, search play_idle() callers. You could also make schedule_idle() more robust by adding a WARN for the blk_schedule_flush_plug() condition. You Changelog is still entirely long and rambling but fails to mention the fundamental important stuff :-(