Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1198930
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 6/6] stop_machine: kill stop_cpus_lock and lg_double_lock/unlock() |
| Date | 2015-08-03 17:10 +0200 |
| Message-ID | <pTpxg-6Ex-29@gated-at.bofh.it> (permalink) |
| References | <pOLoJ-JK-9@gated-at.bofh.it> <pOLoK-JK-21@gated-at.bofh.it> <pS41Q-2wU-13@gated-at.bofh.it> <pSgw2-3Ty-11@gated-at.bofh.it> <pSjke-8dP-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/31, Peter Zijlstra wrote:
>
> + for_each_cpu(cpu, cpumask)
> + arch_spin_lock((arch_spinlock_t *)&per_cpu(cpu_stopper.lock, cpu));
> +
> for_each_cpu(cpu, cpumask) {
> work = &per_cpu(cpu_stopper.stop_work, cpu);
> work->fn = fn;
> work->arg = arg;
> work->done = done;
> - cpu_stop_queue_work(cpu, work);
> + __cpu_stop_queue_work(cpu, work);
> }
> - lg_global_unlock(&stop_cpus_lock);
> +
> + for_each_cpu(cpu, cpumask)
> + arch_spin_unlock((arch_spinlock_t *)&per_cpu(cpu_stopper.lock, cpu));
Of course, we discussed this before and I think this should work too.
However to me this looks more ugly (although better than the current
code), and this is what I tried to avoid.
But! of course "more ugly" is very much subjective, so I won't really
argue if you prefer this change. That said, let me write another email
in reply to your initial review.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v2 6/6] stop_machine: kill stop_cpus_lock and lg_double_lock/unlock() Oleg Nesterov <oleg@redhat.com> - 2015-08-03 17:10 +0200
csiph-web