From b728ca06029d085a1585c1926610f26de93b9146 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Wed, 25 Jun 2014 12:19:55 +0400 Subject: [PATCH] sched: Rework check_for_tasks() 1) Iterate thru all of threads in the system. Check for all threads, not only for group leaders. 2) Check for p->on_rq instead of p->state and cputime. Preempted task in !TASK_RUNNING state OR just created task may be queued, that we want to be reported too. 3) Use read_lock() instead of write_lock(). This function does not change any structures, and read_lock() is enough. Signed-off-by: Kirill Tkhai Reviewed-by: Srikar Dronamraju Cc: Andrew Morton Cc: Ben Segall Cc: Fabian Frederick Cc: Gautham R. Shenoy Cc: Konstantin Khorenko Cc: Linus Torvalds Cc: Michael wang Cc: Mike Galbraith Cc: Paul Gortmaker Cc: Paul Turner Cc: Rafael J. Wysocki Cc: Srivatsa S. Bhat Cc: Todd E Brandt Cc: Toshi Kani Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1403684395.3462.44.camel@tkhai Signed-off-by: Ingo Molnar --- Reading git-format-patch failed