Re: [PATCH 2/7] sched: Update rq clock on nohz CPU before settingfair group shares
From: Peter Zijlstra
Date: Wed Apr 10 2013 - 03:05:25 EST
On Tue, 2013-04-09 at 15:21 +0200, Frederic Weisbecker wrote:
>
> Also please check those two patches in my series, it's a draft for an
> rq clock debug framework. For now it's just a brainless stale clock
> check but that's a start:
>
> * http://thread.gmane.org/gmane.linux.kernel/1470769/focus=1470786
> * http://thread.gmane.org/gmane.linux.kernel/1470769/focus=1470750
Right.. I was thinking of something like function-graph trace, where
we'd mark the context (fgraph_data I think its called) of the function
calling update_rq_clock() (and inherit this state on all child
contexts) and then verify the current context has this marker set when
we read ->clock.
Now clearly that would not work for something like:
a()
b()
update_rq_clock()
c()
read_rq_clock()
since we'd loose the marker once we pop b, but I'm not sure how common
this is.
Also, we could issue a warning when calling update_rq_clock() and the
marker is already set.
There's a further issue where we need to track the rq we updated vs the
rq we're reading, but I think even without that this might be of some
help.
I think Mike once tried something along the lines of keeping a per rq
state that got cleared at the end of schedule() but that doesn't catch
things like the migrate handlers I think.
--
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/