[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170120165211.GR6485@twins.programming.kicks-ass.net>
Date: Fri, 20 Jan 2017 17:52:11 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too
On Fri, Jan 20, 2017 at 11:14:25AM -0500, Steven Rostedt wrote:
> > OK, so I hate this patch because it makes the condition more complex,
> > and while staring at what it does for code generation I couldn't for the
> > life of me figure out why we care about prev->sched_class to begin with.
>
> I was thinking it would save on checking the rq at all, but rq is used
> by pick_next_task_*() anyway, so I doubt it's much savings.
fwiw, code generation adds something like:
CMP imm32, reg
JE imm8
So the overhead is not immense, something like 7-8 bytes, but still,
less is more :-)
Powered by blists - more mailing lists