FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 05-23-2011, 08:59 AM
Joe Thornber
 
Default Remove the spinlock protecting the pages allocation

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?

- Joe

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-26-2011, 12:50 PM
Mikulas Patocka
 
Default Remove the spinlock protecting the pages allocation

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
>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-26-2011, 12:52 PM
Joe Thornber
 
Default Remove the spinlock protecting the pages allocation

On Thu, 2011-05-26 at 08:50 -0400, Mikulas Patocka wrote:
> 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.

Good, thanks.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 08:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org