Re: [PATCH][-mm] Fix setup_per_zone_pages_min() lock.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 06 Sep 2007 14:53:01 +0100
Mel Gorman <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux