From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754895AbaFCS3K (ORCPT ); Tue, 3 Jun 2014 14:29:10 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35501 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbaFCS3I (ORCPT ); Tue, 3 Jun 2014 14:29:08 -0400 Date: Tue, 3 Jun 2014 20:28:50 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Ingo Molnar , Thomas Gleixner , nicolas.pitre@linaro.org, Daniel Lezcano , Mike Galbraith , "linux-kernel@vger.kernel.org" Subject: Re: [RFC][PATCH 0/8] sched,idle: need resched polling rework Message-ID: <20140603182850.GJ16155@laptop.programming.kicks-ass.net> References: <20140522130931.GV13658@twins.programming.kicks-ass.net> <20140529064827.GI19143@laptop.programming.kicks-ass.net> <20140603104347.GT11096@twins.programming.kicks-ass.net> <20140603140223.GA13658@twins.programming.kicks-ass.net> <20140603161950.GB30445@twins.programming.kicks-ass.net> <20140603170018.GD30445@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140603170018.GD30445@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 03, 2014 at 07:00:18PM +0200, Peter Zijlstra wrote: > On Tue, Jun 03, 2014 at 09:52:22AM -0700, Andy Lutomirski wrote: > > > So you could cheat and set it in pick_next_task_idle() and clear in > > > put_prev_task_idle(), that way the entire idle loop, when running has it > > > set. > > > > > > > Isn't that a little late for sched_ttwu_pending? I guess it could be > > okay, but I'm hesitant to muck around with the scheduler innards that > > much. I don't see anything that'll break, though. > > Yeah, only later did I see you clear much earlier, which makes sense. Could we clear it from set_nr_and_not_polling()/set_nr_if_polling()? That's the only two functions that'll kick a cpu out of its polling loop, and we're already writing to the word anyhow.