diff options
| author | Tejun Heo <[email protected]> | 2012-10-16 15:03:14 -0700 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2012-10-16 15:03:14 -0700 |
| commit | dd67d32dbc5de299d70cc9e10c6c1e29ffa56b92 (patch) | |
| tree | 1c43ae45d54e0be328546df95fc4e29c150fcdf8 /tools/perf/scripts/python/futex-contention.py | |
| parent | 5edee61edeaaebafe584f8fb7074c1ef4658596b (diff) | |
freezer: add missing mb's to freezer_count() and freezer_should_skip()
A task is considered frozen enough between freezer_do_not_count() and
freezer_count() and freezers use freezer_should_skip() to test this
condition. This supposedly works because freezer_count() always calls
try_to_freezer() after clearing %PF_FREEZER_SKIP.
However, there currently is nothing which guarantees that
freezer_count() sees %true freezing() after clearing %PF_FREEZER_SKIP
when freezing is in progress, and vice-versa. A task can escape the
freezing condition in effect by freezer_count() seeing !freezing() and
freezer_should_skip() seeing %PF_FREEZER_SKIP.
This patch adds smp_mb()'s to freezer_count() and
freezer_should_skip() such that either %true freezing() is visible to
freezer_count() or !PF_FREEZER_SKIP is visible to
freezer_should_skip().
Signed-off-by: Tejun Heo <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: [email protected]
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions