diff options
author | Hugo Lefeuvre <[email protected]> | 2019-02-07 21:03:52 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2019-02-11 08:34:04 +0100 |
commit | 2b9c2a4859ad5ac7b5a28e9db28c3e618760fe8c (patch) | |
tree | aa5d4435267ee9206a36ef3fd5abbfec7ce83893 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 9f132742d5c4146397fef0c5b09fe220576a5bb2 (diff) |
sched/wait: Use freezable_schedule() when possible
Replace 'schedule(); try_to_freeze();' with a call to freezable_schedule().
Tasks calling freezable_schedule() set the PF_FREEZER_SKIP flag
before calling schedule(). Unlike tasks calling schedule();
try_to_freeze() tasks calling freezable_schedule() are not awaken by
try_to_freeze_tasks(). Instead they call try_to_freeze() when they
wake up if the freeze is still underway.
It is not a problem since sleeping tasks can't do anything which isn't
allowed for a frozen task while sleeping.
The result is a potential performance gain during freeze, since less
tasks have to be awaken.
For instance on a bare Debian vm running a 4.19 stable kernel, the
number of tasks skipped in freeze_task() went up from 12 without the
patch to 32 with the patch (out of 448), an increase of > x2.5.
Signed-off-by: Hugo Lefeuvre <[email protected]>
Reviewed-by: Joel Fernandes (Google) <[email protected]>
Cc: Joel Fernandes <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions