From: Andrew Morton <akpm@linux-foundation.org>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Herbert Xu <herbert@gondor.hengli.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] padata: Flush the padata queues actively
Date: Thu, 29 Apr 2010 16:11:12 -0700 [thread overview]
Message-ID: <20100429161112.f4bb67a3.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100429124426.GK5275@secunet.com>
On Thu, 29 Apr 2010 14:44:26 +0200
Steffen Klassert <steffen.klassert@secunet.com> wrote:
> +static void padata_flush_queues(struct parallel_data *pd)
> +{
> + int cpu;
> + struct padata_queue *queue;
> +
> + for_each_cpu(cpu, pd->cpumask) {
> + queue = per_cpu_ptr(pd->queue, cpu);
> + flush_work(&queue->pwork);
> + }
> +
> + del_timer_sync(&pd->timer);
> +
> + if (atomic_read(&pd->reorder_objects))
> + padata_reorder(pd);
padata_reorder() can fail to do anything, if someone else is holding
pd->lock. What happens then?
> + for_each_cpu(cpu, pd->cpumask) {
> + queue = per_cpu_ptr(pd->queue, cpu);
> + flush_work(&queue->swork);
> + }
> + BUG_ON(atomic_read(&pd->refcnt) != 0);
> +}
Are we safe against cpu hot-unplug in this code?
next prev parent reply other threads:[~2010-04-30 18:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 12:36 [PATCH 0/8] padata: fixes/cleanups Steffen Klassert
2010-04-29 12:37 ` [PATCH 1/8] padata: Dont scale the parallel objects with the cpus Steffen Klassert
2010-04-29 12:40 ` [PATCH 2/8] padata: cpu hotplug code should depend on CONFIG_HOTPLUG_CPU Steffen Klassert
2010-04-29 12:40 ` [PATCH 3/8] padata: Remove superfluous might_sleep Steffen Klassert
2010-04-29 12:41 ` [PATCH 4/8] padata: Initialize the padata queues only for the used cpus Steffen Klassert
2010-04-29 12:42 ` [PATCH 5/8] padata: Use get_online_cpus/put_online_cpus Steffen Klassert
2010-04-29 12:43 ` [PATCH 6/8] padata: Use a timer to handle the reorder queues Steffen Klassert
2010-04-29 23:06 ` Andrew Morton
2010-04-30 11:20 ` Steffen Klassert
2010-05-03 3:38 ` Herbert Xu
2010-04-29 12:44 ` [PATCH 7/8] padata: Flush the padata queues actively Steffen Klassert
2010-04-29 23:11 ` Andrew Morton [this message]
2010-04-30 11:24 ` Steffen Klassert
2010-04-29 12:45 ` [PATCH 8/8] padata: Add some code comments Steffen Klassert
2010-04-29 23:13 ` [PATCH 0/8] padata: fixes/cleanups Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100429161112.f4bb67a3.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=herbert@gondor.hengli.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox