lkml.org 
[lkml]   [2007]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][-mm] Fix setup_per_zone_pages_min() lock.
On Thu, 06 Sep 2007 14:53:01 +0100
Mel Gorman <mel@csn.ul.ie> wrote:

> Does it really matter as they routinely do not take zone->lru_lock
> either? pages_min, pages_low and pages_high are currently examined on a
> regular basis by zone_watermark_ok() without any locks held in the page
> allocator and page reclaim path. Glancing through this, it would appear
> that the code in question has the same level of locking protection with
> zone->lru_lock or zone->lock.
>
At the first look, I thought this should be lock-less. But I noticed that
memory hotplug(See add_memory()) calls setup_per_zone_pages_min().
Then, logically, there are 2 interfaces which calls setup_per_zone_pages_min();
So, we need some kind of lock.

And setup_zone_migrate_reserve() is also called in this function.
This does more than change value. So I thought zone->lock is good here.

> Is memory hotadd specifically taking the lru_lock somewhere? I can only
> think of the seqlock at the moment.
>
memory hotplug doesn't take lru_lock.


Thanks,
-Kame

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

\
 
 \ /
  Last update: 2007-09-07 04:17    [W:0.060 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site