From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Trevor Brandt <tjbrandt@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Eric Paris <eparis@redhat.com>,
Fabio Estevam <fabio.estevam@freescale.com>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Glauber Costa <glommer@parallels.com>,
Steven Rostedt <rostedt@goodmis.org>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
Mike Galbraith <efault@gmx.de>,
linux-kernel@vger.kernel.org, team-fjord@googlegroups.com
Subject: Re: [PATCH] sched: Support compiling out real-time scheduling with REALTIME_SCHED.
Date: Wed, 15 Aug 2012 17:14:39 +0200 [thread overview]
Message-ID: <1345043679.31459.109.camel@twins> (raw)
In-Reply-To: <1344977423-28900-1-git-send-email-tjbrandt@gmail.com>
On Tue, 2012-08-14 at 13:50 -0700, Trevor Brandt wrote:
> Adds support for compiling out the real-time scheduler (SCHED_FIFO
> and SCHED_RR) to save space. Changes sched_set_stop_task to use
> SCHED_NORMAL rather than SCHED_FIFO, since the kernel only uses this
> function as a fake scheduling priority for userspace to read to avoid
> exposing the stop class to userspace. Bloat-o-meter gives a space
> savings of 1877 bytes with REALTIME_SCHED turned off.
>
> Userspace works fine with REALTIME_SCHED turned off. Processes
> attempting to set a real-time scheduling policy get EINVAL, exactly
> the response that the sched_setscheduler manpage documents you will
> get if the "scheduling policy is not one of the recognized policies."
Are you in the same group that wanted to make SCHED_FAIR optional as
well?
> Signed-off-by: Trevor Brandt <tjbrandt@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
> index 9a7dd35..a9bee25 100644
> --- a/kernel/sched/Makefile
> +++ b/kernel/sched/Makefile
> @@ -11,7 +11,8 @@ ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
> CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
> endif
>
> -obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o
> +obj-y += core.o clock.o idle_task.o fair.o stop_task.o
> +obj-$(CONFIG_REALTIME_SCHED) += rt.o
> obj-$(CONFIG_SMP) += cpupri.o
This wants extra magic, cpupri is only used for rt, cutting that will of
course increase your savings.
> obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
> obj-$(CONFIG_SCHEDSTATS) += stats.o
Other than that I'm not entirely happy with the growing #ifdef maze.
Granted this new one isn't nearly as bad as some of the existing ones,
but I do wish someone would clean up some of that.
next prev parent reply other threads:[~2012-08-15 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 20:50 [PATCH] sched: Support compiling out real-time scheduling with REALTIME_SCHED Trevor Brandt
2012-08-15 7:12 ` Mike Galbraith
2012-08-15 15:10 ` Josh Triplett
2012-08-16 4:30 ` Mike Galbraith
2012-08-15 15:14 ` Peter Zijlstra [this message]
2012-08-15 19:58 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345043679.31459.109.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=eparis@redhat.com \
--cc=fabio.estevam@freescale.com \
--cc=glommer@parallels.com \
--cc=josh@joshtriplett.org \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=suresh.b.siddha@intel.com \
--cc=team-fjord@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=tjbrandt@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.