[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [PATCH] Remove the spinlock protecting the pages allocation
- From: Mikulas Patocka <mpatocka redhat com>
- To: Joe Thornber <thornber redhat com>
- Cc: device-mapper development <dm-devel redhat com>, "Alasdair G. Kergon" <agk redhat com>
- Subject: Re: [dm-devel] [PATCH] Remove the spinlock protecting the pages allocation
- Date: Thu, 26 May 2011 08:50:55 -0400 (EDT)
On Mon, 23 May 2011, Joe Thornber wrote:
> On Thu, 2011-05-19 at 12:58 -0400, Mikulas Patocka wrote:
> > The spinlock is only taken on initialization or from single-threaded
> > workqueue.
> > Therefore, the spinlock is useless.
>
> The spinlock has memory barrier semantics as well. How are you
> guaranteeing the changes from the initialisation thread are visible in
> the workqueue thread?
There is another spinlock, kc->job_lock, that is taken each time someone
pushes or pops some work for the worker thread.
Once we take kc->job_lock, we guarantee that any written memory is
visible to the other CPUs.
Mikulas
> - Joe
>
> --
> dm-devel mailing list
> dm-devel redhat com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]