From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444Ab0KJSur (ORCPT ); Wed, 10 Nov 2010 13:50:47 -0500 Received: from canuck.infradead.org ([134.117.69.58]:39258 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753242Ab0KJSuq convert rfc822-to-8bit (ORCPT ); Wed, 10 Nov 2010 13:50:46 -0500 Subject: Re: [RFC][PATCH 02/22] sched: add extended scheduling interface From: Peter Zijlstra To: Raistlin Cc: Ingo Molnar , Thomas Gleixner , Steven Rostedt , Chris Friesen , oleg@redhat.com, Frederic Weisbecker , Darren Hart , Johan Eker , "p.faure" , linux-kernel , Claudio Scordino , michael trimarchi , Fabio Checconi , Tommaso Cucinotta , Juri Lelli , Nicola Manica , Luca Abeni , Dhaval Giani , Harald Gustafsson , paulmck In-Reply-To: <1288333622.8661.141.camel@Palantir> References: <1288333128.8661.137.camel@Palantir> <1288333622.8661.141.camel@Palantir> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 10 Nov 2010 19:50:17 +0100 Message-ID: <1289415017.2084.32.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2010-10-29 at 08:27 +0200, Raistlin wrote: > static int __sched_setscheduler(struct task_struct *p, int policy, > - const struct sched_param *param, bool user) > + const struct sched_param *param, > + const struct sched_param_ex *param_ex, > + bool user) > { > int retval, oldprio, oldpolicy = -1, on_rq, running; > unsigned long flags; > @@ -4861,10 +4863,18 @@ recheck: > int sched_setscheduler(struct task_struct *p, int policy, > const struct sched_param *param) > { > - return __sched_setscheduler(p, policy, param, true); > + return __sched_setscheduler(p, policy, param, NULL, true); > } > EXPORT_SYMBOL_GPL(sched_setscheduler); > > +int sched_setscheduler_ex(struct task_struct *p, int policy, > + const struct sched_param *param, > + const struct sched_param_ex *param_ex) > +{ > + return __sched_setscheduler(p, policy, param, param_ex, true); > +} > +EXPORT_SYMBOL_GPL(sched_setscheduler_ex); Do we really need to pass both params? Can't we simply create a struct sched_param_ex new_param = { .sched_priority = param->sched_priority }; on stack and pass that?