Revert "sched/core: Prevent race condition between cpuset and __sched_setscheduler()"
This reverts commit 710da3c8ea
.
When changing a thread's scheduling priority, binder calls
sched_setscheduler_nocheck() while holding the node lock and
proc inner lock. This was safe until v5.3 when this change was
introduced where cpuset_read_lock() is called in this path
which can sleep.
This patch was introduced to fix a possible accounting error
in sched deadline (potential oversell of CPU bandwidth) due
to a race condition between cpusets and __sched_setscheduler().
This is not an issue for Android.
This should be fixed in the binder driver, but that may take
some time.
Bug: 151861772
Change-Id: Ica1ef71b3cdcdc509b341ea1b57c41f8ee73794a
Signed-off-by: Todd Kjos <tkjos@google.com>
This commit is contained in:
@@ -334,17 +334,6 @@ static struct cpuset top_cpuset = {
|
||||
*/
|
||||
|
||||
DEFINE_STATIC_PERCPU_RWSEM(cpuset_rwsem);
|
||||
|
||||
void cpuset_read_lock(void)
|
||||
{
|
||||
percpu_down_read(&cpuset_rwsem);
|
||||
}
|
||||
|
||||
void cpuset_read_unlock(void)
|
||||
{
|
||||
percpu_up_read(&cpuset_rwsem);
|
||||
}
|
||||
|
||||
static DEFINE_SPINLOCK(callback_lock);
|
||||
|
||||
static struct workqueue_struct *cpuset_migrate_mm_wq;
|
||||
|
Verwijs in nieuw issue
Block a user