Re: [PATCH 2/7] sched: Update rq clock on nohz CPU before settingfair group shares
From: Peter Zijlstra
Date: Wed Apr 10 2013 - 07:47:26 EST
On Wed, 2013-04-10 at 13:06 +0200, Ingo Molnar wrote:
> There's just a handful of high level entry points, right? schedule(), wakeup,
> scheduler tick, maybe notifiers - anything else?
I suppose there's some cgroup muck and the various system calls; most
of them should be covered if we take some lower level primitives or so.
We could 'simply' hijack rq->lock and clear the state every time we
acquire or release it.. maybe have an exemption for the balance double
lock ops.
> Documenting/listing those would
> be nice anyway, near the top of kernel/sched/core.c or so.
Sure and it might have to do.. I just prefer an option that's less
prone to human failure; being both paranoid and lazy :-)
> The other approach would be to periodically clear the flag from the timer tick.
> That would catch invalid rq->clock use probabilistically.
Right, but once we have the most common paths covered it is very very
unlikely we'll hit the weird corner cases like this. But it is an
option.
> > I'd clear at the beginning, but that's more or less the same thing.
> >
> > We have the .sched.text section but I'm not sure we've been consistent enough
> > with that to be useful. But otherwise we'd be able to clear on section
> > entry/exit or so.
>
> Hm, I'm not sure that can be made to work sanely.
Yeah.. one option is to make all code in kernel/sched/ part of
.sched.text but that might be overkill -- not to mention we'd have to
peel things like completions and wait_queues out of sched/kernel/core.c
but that seems like a good idea anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/