Re: [PATCH 1/2] brw_mutex: big read-write mutex
From: Mikulas Patocka
Date: Thu Oct 18 2012 - 15:49:09 EST
On Thu, 18 Oct 2012, Oleg Nesterov wrote:
> Ooooh. And I just noticed include/linux/percpu-rwsem.h which does
> something similar. Certainly it was not in my tree when I started
> this patch... percpu_down_write() doesn't allow multiple writers,
> but the main problem it uses msleep(1). It should not, I think.
synchronize_rcu() can sleep for hundred milliseconds, so msleep(1) is not
a big problem.
> But. It seems that percpu_up_write() is equally wrong? Doesn't
> it need synchronize_rcu() before "p->locked = false" ?
Yes, it does ... and I sent patch for that to Linus.
> (add Mikulas)
>
> Oleg.
Mikulas
--
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/