From: Rik van Riel <riel@redhat.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Richard Davies <richard@arachsys.com>,
Shaohua Li <shli@kernel.org>, Avi Kivity <avi@redhat.com>,
QEMU-devel <qemu-devel@nongnu.org>, KVM <kvm@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] mm: compaction: Acquire the zone->lru_lock as late as possible
Date: Thu, 20 Sep 2012 14:54:16 -0400 [thread overview]
Message-ID: <505B6658.1080706@redhat.com> (raw)
In-Reply-To: <1348149875-29678-3-git-send-email-mgorman@suse.de>
On 09/20/2012 10:04 AM, 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 <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Richard Davies <richard@arachsys.com>,
Shaohua Li <shli@kernel.org>, Avi Kivity <avi@redhat.com>,
QEMU-devel <qemu-devel@nongnu.org>, KVM <kvm@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] mm: compaction: Acquire the zone->lru_lock as late as possible
Date: Thu, 20 Sep 2012 14:54:16 -0400 [thread overview]
Message-ID: <505B6658.1080706@redhat.com> (raw)
In-Reply-To: <1348149875-29678-3-git-send-email-mgorman@suse.de>
On 09/20/2012 10:04 AM, 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 <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Richard Davies <richard@arachsys.com>, KVM <kvm@vger.kernel.org>,
QEMU-devel <qemu-devel@nongnu.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>, Avi Kivity <avi@redhat.com>,
Shaohua Li <shli@kernel.org>
Subject: Re: [Qemu-devel] [PATCH 2/6] mm: compaction: Acquire the zone->lru_lock as late as possible
Date: Thu, 20 Sep 2012 14:54:16 -0400 [thread overview]
Message-ID: <505B6658.1080706@redhat.com> (raw)
In-Reply-To: <1348149875-29678-3-git-send-email-mgorman@suse.de>
On 09/20/2012 10:04 AM, 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 <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
next prev parent reply other threads:[~2012-09-20 18:54 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 14:04 [PATCH 0/6] Reduce compaction scanning and lock contention Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 14:04 ` [PATCH 1/6] mm: compaction: Abort compaction loop if lock is contended or run too long Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:53 ` Rik van Riel
2012-09-20 18:53 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:53 ` Rik van Riel
2012-09-20 14:04 ` [PATCH 2/6] mm: compaction: Acquire the zone->lru_lock as late as possible Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:54 ` Rik van Riel [this message]
2012-09-20 18:54 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:54 ` Rik van Riel
2012-09-20 14:04 ` [PATCH 3/6] mm: compaction: Acquire the zone->lock " Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:54 ` Rik van Riel
2012-09-20 18:54 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:54 ` Rik van Riel
2012-09-20 14:04 ` [PATCH 4/6] Revert "mm: have order > 0 compaction start off where it left" Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:54 ` Rik van Riel
2012-09-20 18:54 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:54 ` Rik van Riel
2012-09-20 14:04 ` [PATCH 5/6] mm: compaction: Cache if a pageblock was scanned and no pages were isolated Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:55 ` Rik van Riel
2012-09-20 18:55 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:55 ` Rik van Riel
2012-09-20 14:04 ` [PATCH 6/6] mm: compaction: Restart compaction from near where it left off Mel Gorman
2012-09-20 14:04 ` [Qemu-devel] " Mel Gorman
2012-09-20 14:04 ` Mel Gorman
2012-09-20 18:57 ` Rik van Riel
2012-09-20 18:57 ` [Qemu-devel] " Rik van Riel
2012-09-20 18:57 ` Rik van Riel
2012-09-21 9:13 ` [PATCH 0/6] Reduce compaction scanning and lock contention Richard Davies
2012-09-21 9:13 ` [Qemu-devel] " Richard Davies
2012-09-21 9:13 ` Richard Davies
2012-09-21 9:15 ` Richard Davies
2012-09-21 9:15 ` [Qemu-devel] " Richard Davies
2012-09-21 9:15 ` Richard Davies
2012-09-21 9:17 ` Richard Davies
2012-09-21 9:17 ` [Qemu-devel] " Richard Davies
2012-09-21 9:17 ` Richard Davies
2012-09-21 9:55 ` Mel Gorman
2012-09-21 9:55 ` [Qemu-devel] " Mel Gorman
2012-09-21 9:55 ` Mel Gorman
2012-09-21 9:18 ` Richard Davies
2012-09-21 9:18 ` [Qemu-devel] " Richard Davies
2012-09-21 9:18 ` Richard Davies
2012-09-21 9:35 ` Mel Gorman
2012-09-21 9:35 ` [Qemu-devel] " Mel Gorman
2012-09-21 9:35 ` Mel Gorman
2012-09-21 9:49 ` Richard Davies
2012-09-21 9:49 ` [Qemu-devel] " Richard Davies
2012-09-21 9:49 ` Richard Davies
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505B6658.1080706@redhat.com \
--to=riel@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=richard@arachsys.com \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.