From: Andrea Arcangeli <aarcange@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>, Minchan Kim <minchan.kim@gmail.com>,
Johannes Weiner <jweiner@redhat.com>,
linux-mm@kvack.org, stable@kernel.org
Subject: Re: [PATCH] remove compaction from kswapd
Date: Thu, 10 Mar 2011 00:50:40 +0100 [thread overview]
Message-ID: <20110309235040.GJ2141@random.random> (raw)
In-Reply-To: <20110309141718.93db5ea5.akpm@linux-foundation.org>
Hi Andrew,
On Wed, Mar 09, 2011 at 02:17:18PM -0800, Andrew Morton wrote:
> On Wed, 2 Mar 2011 14:25:42 +0000
> Mel Gorman <mel@csn.ul.ie> wrote:
>
> > mm: compaction: Prevent kswapd compacting memory to reduce CPU usage
> >
> > This patch reverts [5a03b051: thp: use compaction in kswapd for GFP_ATOMIC
> > order > 0] due to reports stating that kswapd CPU usage was higher
> > and IRQs were being disabled more frequently. This was reported at
> > http://www.spinics.net/linux/fedora/alsa-user/msg09885.html .
>
> OK, I grabbed this.
>
> I made a number of changelog changes:
>
> - Rewrote it as From: Andrea (correct?)
>
> - Replaced your acked-by with signed-off-by, as you were on the
> delivery path
>
> - Hunted down Arthur's email address and added his reported-by and
> tested-by.
So far so good.
> - Added cc:stable, as it's a bit late for 2.6.38. The intention
> being that we put this into 2.6.38.1 after it has cooked in 2.6.39-rcX
> for a while. OK?
That's ok with me. It's unfortunate the only two workloads that
triggers this weren't trivial setups and it was found after quite some
time after being introduced (if it was obvious for all workloads, it
wouldn't have gotten there after all, but this also makes it no big
deal if this is only applied in 2.6.38.1 for the same reason).
I think the fundamental issue with compaction is that its searches are
not SWAP_CLUSTER_MAX things, but it goes all the way through the zone
from top to bottom and bottom to top, until the two scans meet in the
middle. So invoking it just once for allocation in direct compaction
(during alloc_pages slow path) is enough. Keeping invoking it in
kswapd (even if at lower rate with my last patch as an attempt to fix
it without removing compaction from kswapd) is probably being
overkill. Maybe kswapd should have a comapction "incremental" mode
that does a SWAP_CLUSTER_MAX thing. Maybe we shouldn't do it from
kswapd either.
We clearly we need a bit more time to sort this out, and in the
meantime returning to the 2.6.37 logic in kswapd of 2.6.38.1 is good
idea and safe.
As opposed we could retain commit
c5a73c3d55be1faadba35b41a862e036a3b12ddb introduced together with the
problematic commit. Commit c5a73c3d55be1faadba35b41a862e036a3b12ddb
should help with the kernel stack allocation during high VM pressure,
without apparently hurting anything. That is somewhat safer than the
kswapd part because it doesn't affect kswapd globally but just the
thread allocating and it's surely not going to insist much invoking
compaction in the background.
Thanks a lot,
Andrea
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-03-09 23:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 22:21 [PATCH] remove compaction from kswapd Andrea Arcangeli
2011-03-01 22:33 ` Minchan Kim
2011-03-01 22:39 ` Andrea Arcangeli
2011-03-01 23:10 ` Minchan Kim
2011-03-02 0:41 ` Andrew Morton
2011-03-02 4:38 ` Andrea Arcangeli
2011-03-02 4:39 ` Andrea Arcangeli
2011-03-02 4:53 ` Andrew Morton
2011-03-02 5:52 ` Andrea Arcangeli
2011-03-02 5:57 ` Andrew Morton
2011-03-02 17:21 ` Andrea Arcangeli
2011-03-02 14:25 ` Mel Gorman
2011-03-09 22:17 ` Andrew Morton
2011-03-09 23:50 ` Andrea Arcangeli [this message]
2011-03-10 10:11 ` Mel Gorman
2011-03-09 17:00 ` Andrea Arcangeli
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=20110309235040.GJ2141@random.random \
--to=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jweiner@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).