Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752698AbcCVXCF (ORCPT ); Tue, 22 Mar 2016 19:02:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33731 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbcCVXCD (ORCPT ); Tue, 22 Mar 2016 19:02:03 -0400 Date: Tue, 22 Mar 2016 16:02:02 -0700 From: Andrew Morton To: Peter Zijlstra Cc: Michal Hocko , linux-mm@kvack.org, LKML , Tetsuo Handa , David Rientjes , Ingo Molnar Subject: Re: [PATCH 1/9] sched: add schedule_timeout_idle() Message-Id: <20160322160202.9647702367dabf86b003b168@linux-foundation.org> In-Reply-To: <20160322122345.GN6344@twins.programming.kicks-ass.net> References: <1458644426-22973-1-git-send-email-mhocko@kernel.org> <1458644426-22973-2-git-send-email-mhocko@kernel.org> <20160322122345.GN6344@twins.programming.kicks-ass.net> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 32 On Tue, 22 Mar 2016 13:23:45 +0100 Peter Zijlstra wrote: > On Tue, Mar 22, 2016 at 12:00:18PM +0100, Michal Hocko wrote: > > > extern signed long schedule_timeout_interruptible(signed long timeout); > > extern signed long schedule_timeout_killable(signed long timeout); > > extern signed long schedule_timeout_uninterruptible(signed long timeout); > > +extern signed long schedule_timeout_idle(signed long timeout); > > > +/* > > + * Like schedule_timeout_uninterruptible(), except this task will not contribute > > + * to load average. > > + */ > > +signed long __sched schedule_timeout_idle(signed long timeout) > > +{ > > + __set_current_state(TASK_IDLE); > > + return schedule_timeout(timeout); > > +} > > +EXPORT_SYMBOL(schedule_timeout_idle); > > Yes we have 3 such other wrappers, but I've gotta ask: why? They seem > pretty pointless. I like the wrappers. At least, more than having to read the open-coded version. The latter is just more stuff to interpret and to check whereas I can look at "schedule_timeout_idle" and think "yup, I know what that does". But whatever. I'll probably be sending this series up for 4.6 and we can worry about the schedule_timeout_foo() stuff later.