[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock
From: |
Rafael Aquini |
Subject: |
Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible |
Date: |
Fri, 21 Sep 2012 14:51:15 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Sep 21, 2012 at 11:46:19AM +0100, Mel Gorman wrote:
> Compactions migrate scanner acquires the zone->lru_lock when scanning a range
> of pages looking for LRU pages to acquire. It does this even if there are
> no LRU pages in the range. If multiple processes are compacting then this
> can cause severe locking contention. To make matters worse commit b2eef8c0
> (mm: compaction: minimise the time IRQs are disabled while isolating pages
> for migration) releases the lru_lock every SWAP_CLUSTER_MAX pages that are
> scanned.
>
> This patch makes two changes to how the migrate scanner acquires the LRU
> lock. First, it only releases the LRU lock every SWAP_CLUSTER_MAX pages if
> the lock is contended. This reduces the number of times it unnecessarily
> disables and re-enables IRQs. The second is that it defers acquiring the
> LRU lock for as long as possible. If there are no LRU pages or the only
> LRU pages are transhuge then the LRU lock will not be acquired at all
> which reduces contention on zone->lru_lock.
>
> Signed-off-by: Mel Gorman <address@hidden>
> Acked-by: Rik van Riel <address@hidden>
> ---
Acked-by: Rafael Aquini <address@hidden>
- Re: [Qemu-devel] [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated, (continued)
[Qemu-devel] [PATCH 9/9] mm: compaction: Restart compaction from near where it left off, Mel Gorman, 2012/09/21
[Qemu-devel] [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long, Mel Gorman, 2012/09/21
[Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Mel Gorman, 2012/09/21
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible,
Rafael Aquini <=
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Minchan Kim, 2012/09/25
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Mel Gorman, 2012/09/25
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Minchan Kim, 2012/09/25
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Andrew Morton, 2012/09/25
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Minchan Kim, 2012/09/25
- Re: [Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone->lru_lock as late as possible, Mel Gorman, 2012/09/26
Re: [Qemu-devel] [PATCH 0/9] Reduce compaction scanning and lock contention, Rik van Riel, 2012/09/21