From: Rik van Riel <riel@redhat.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: linux-mm@kvack.org, lkml <linux-kernel@vger.kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan.kim@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Subject: Re: [PATCH v2 -mm 1/3] mm: reclaim at order 0 when compaction is enabled
Date: Wed, 25 Jan 2012 12:17:45 -0500 [thread overview]
Message-ID: <4F203939.70107@redhat.com> (raw)
In-Reply-To: <20120125160752.GE3901@csn.ul.ie>
On 01/25/2012 11:07 AM, Mel Gorman wrote:
> On Wed, Jan 25, 2012 at 10:27:28AM -0500, Rik van Riel wrote:
>> Maybe this is the place to check (in balanced_pgdat) ?
>>
>> /*
>> * We do this so kswapd doesn't build up large
>> priorities for
>> * example when it is freeing in parallel with
>> allocators. It
>> * matches the direct reclaim path behaviour in
>> terms of impact
>> * on zone->*_priority.
>> */
>> if (sc.nr_reclaimed>= SWAP_CLUSTER_MAX)
>> break;
>>
>
> It would be a good place all right. Preferably it would tie into
> compaction_ready() to decide whether to continue reclaiming or not.
Good point. We can just track compaction_ready for all
of the zones and bail out if at least one of the zones
is ready for compaction (somehow taking the classzone
index into account?).
Or maybe simply keep reclaiming order 0 pages until all
the memory zones in the pgdat are ready for compaction?
>>>> @@ -2922,8 +2939,6 @@ out:
>>>>
>>>> /* If balanced, clear the congested flag */
>>>> zone_clear_flag(zone, ZONE_CONGESTED);
>>>> - if (i<= *classzone_idx)
>>>> - balanced += zone->present_pages;
>>>> }
>>>
>>> Why is this being deleted? It is still used by pgdat_balanced().
>>
>> This is outside of the big while loop and is not used again
>> in the function.
>
> How about here?
>
> if (all_zones_ok || (order&& pgdat_balanced(pgdat, balanced, *classzone_idx)))
> break; /* kswapd: all done */
>
> Either way, it looks like something that should be in its own patch.
That code is above the lines that I removed.
The only way to get back there is to jump up to
loop_again, from where we will get to the main loop,
where balanced is zeroed out.
If you want I will split this out into its own patch.
--
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:[~2012-01-25 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 18:18 [PATCH v2 -mm 0/3] kswapd vs compaction improvements Rik van Riel
2012-01-24 18:21 ` [PATCH v2 -mm 1/3] mm: reclaim at order 0 when compaction is enabled Rik van Riel
2012-01-25 15:00 ` Mel Gorman
2012-01-25 15:27 ` Rik van Riel
2012-01-25 16:07 ` Mel Gorman
2012-01-25 17:17 ` Rik van Riel [this message]
2012-01-25 22:16 ` Andrea Arcangeli
2012-01-26 2:12 ` Rik van Riel
2012-01-24 18:22 ` [PATCH v2 -mm 2/3] mm: kswapd carefully call compaction Rik van Riel
2012-01-25 15:19 ` Mel Gorman
2012-01-24 18:23 ` [PATCH v2 -mm 3/3] mm: only defer compaction for failed order and higher Rik van Riel
2012-01-25 15:41 ` Mel Gorman
2012-01-25 15:55 ` Rik van Riel
2012-01-25 16:21 ` Mel Gorman
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=4F203939.70107@redhat.com \
--to=riel@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
/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).