Messages in this thread | | | Date | Tue, 30 Jun 2015 03:08:11 +0200 | From | Oleg Nesterov <> | Subject | Re: [RFC PATCH 0/6] stop_machine: kill stop_cpus_mutex and stop_cpus_lock |
| |
On 06/29, Peter Zijlstra wrote: > > On Mon, Jun 29, 2015 at 06:02:51AM +0200, Oleg Nesterov wrote: > > > If we change stop_two_cpus() to use stop_work_alloc_one() it can use > > cpu_online(), > > So the one user of this actually needs cpu_active(); we do not want to > go move tasks to an inactive cpu. > > So if you change this to cpu_online() we need to audit the user is doing > the stricter test.
Hmm. But the user (migrate_swap_stop) should check cpu_active() anyway?
The cpu_active() checks in stop_two_cpus() can only help to ensure that multi_cpu_stop() won't hang. CPU_DOWN_PREPARE can deactivate either CPU right after the check?
Or stop_two_cpus() needs get_online_cpus(). Or I missed something.
Oleg.
| |