Re: [RFC PATCH] Dynamic sched domains (v0.5)

From: Dinakar Guniguntala
Date: Tue May 03 2005 - 09:55:37 EST


> >On Mon, May 02, 2005 at 07:44:05PM +1000, Nick Piggin wrote:
>
> What are you protecting against, though? synchroinze_kernel can
> sleep, so local_irq_disable is probably the wrong thing to do as well.

Paul, any reason why code marked "####" (fn cpuset_rmdir) is under
the dentry lock ??

spin_lock(&cs->dentry->d_lock);
parent = cs->parent; ####
set_bit(CS_REMOVED, &cs->flags); ####
if (is_cpu_exclusive(cs))
update_cpu_domains(cs);
list_del(&cs->sibling); /* delete my sibling from parent->children */
if (list_empty(&parent->children))
check_for_release(parent);
d = dget(cs->dentry); <----
cs->dentry = NULL; <----
spin_unlock(&d->d_lock);


As far as I can see only the ones marked "<----" should be under the
dentry lock, considering the fact that it already holds the cpuset_sem
all the while.

I saw that calling update_cpu_domains with the dentry lock held,
causes it to oops with preempt turned on. (Scheduling while atomic)

-Dinakar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/