linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/5] sched: Diagnostic checks for missing rq clock updates
@ 2016-05-12 19:49 Matt Fleming
  2016-05-12 19:49 ` [RFC][PATCH 1/5] sched/fair: Update the rq clock before detaching tasks Matt Fleming
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Matt Fleming @ 2016-05-12 19:49 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: linux-kernel, Byungchul Park, Frederic Weisbecker, Luca Abeni,
	Rafael J . Wysocki, Rik van Riel, Thomas Gleixner, Wanpeng Li,
	Yuyang Du, Mel Gorman, Mike Galbraith, Matt Fleming

There are currently no runtime diagnostic checks for detecting when we
have inadvertently missed a call to update_rq_clock() before accessing
rq_clock().

The idea in these patches, which came from Peter, is to piggyback on
the rq->lock pin/unpin context to detect when we expected (and failed)
to see an update to the rq clock. They've already caught a couple of
bugs: see patch 1 and commit b52fad2db5d7 ("sched/fair: Update rq
clock before updating nohz CPU load") in tip/sched/core.

I'm not sure how palatable the s/pin_cookie/rq_flags/ changes will be
in patch 2, so I've marked this entire series as RFC.

All the diagnostic code is guarded by CONFIG_SCHED_DEBUG, but there
are minimal changes to __schedule() in patch 5 for the !SCHED_DEBUG
case.

Matt Fleming (5):
  sched/fair: Update the rq clock before detaching tasks
  sched: Add wrappers for lockdep_(un)pin_lock()
  sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock
  sched/fair: Push rq lock pin/unpin into idle_balance()
  sched/core: Add debug code to catch missing update_rq_clock()

 kernel/sched/core.c      |  94 +++++++++++++++++++++++--------------------
 kernel/sched/deadline.c  |  10 ++---
 kernel/sched/fair.c      |  31 +++++++++------
 kernel/sched/idle_task.c |   2 +-
 kernel/sched/rt.c        |   6 +--
 kernel/sched/sched.h     | 101 ++++++++++++++++++++++++++++++++++++++++-------
 kernel/sched/stop_task.c |   2 +-
 7 files changed, 166 insertions(+), 80 deletions(-)

-- 
2.7.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-05-19  6:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 19:49 [RFC][PATCH 0/5] sched: Diagnostic checks for missing rq clock updates Matt Fleming
2016-05-12 19:49 ` [RFC][PATCH 1/5] sched/fair: Update the rq clock before detaching tasks Matt Fleming
2016-05-12 19:49 ` [RFC][PATCH 2/5] sched: Add wrappers for lockdep_(un)pin_lock() Matt Fleming
2016-05-12 19:49 ` [RFC][PATCH 3/5] sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock Matt Fleming
2016-05-12 19:49 ` [RFC][PATCH 4/5] sched/fair: Push rq lock pin/unpin into idle_balance() Matt Fleming
2016-05-12 19:49 ` [RFC][PATCH 5/5] sched/core: Add debug code to catch missing update_rq_clock() Matt Fleming
2016-05-15  2:14   ` Yuyang Du
2016-05-16  9:46     ` Matt Fleming
2016-05-16 20:11       ` Yuyang Du
2016-05-17 12:24         ` Matt Fleming
2016-05-17 19:01           ` Yuyang Du
2016-05-18  8:41             ` Matt Fleming
2016-05-18 22:51               ` Yuyang Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).