LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>, linux-mm@kvack.org
Cc: Roman Gushchin <klamm@yandex-team.ru>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>
Subject: Re: [PATCH RFC] mm: reset pages_scanned only when free pages are above high watermark
Date: Wed, 18 Mar 2015 14:48:32 +0100 [thread overview]
Message-ID: <55098230.5080600@suse.cz> (raw)
In-Reply-To: <20150311183023.4476.40069.stgit@buzz>
On 03/11/2015 07:30 PM, Konstantin Khlebnikov wrote:
> Technically, this counter works as OOM-countdown. Let's reset it only
> when zone is completely recovered and ready to handle any allocations.
> Otherwise system could never recover and stuck in livelock.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Hmm, could this help in cases like this one?
https://lkml.org/lkml/2015/1/23/688
> ---
> mm/page_alloc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ffd5ad2a6e10..ef7795c8c121 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -701,7 +701,8 @@ static void free_pcppages_bulk(struct zone *zone, int count,
>
> spin_lock(&zone->lock);
> nr_scanned = zone_page_state(zone, NR_PAGES_SCANNED);
> - if (nr_scanned)
> + if (nr_scanned &&
> + zone_page_state(zone, NR_FREE_PAGES) > high_wmark_pages(zone))
> __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
>
> while (to_free) {
> @@ -752,7 +753,8 @@ static void free_one_page(struct zone *zone,
> unsigned long nr_scanned;
> spin_lock(&zone->lock);
> nr_scanned = zone_page_state(zone, NR_PAGES_SCANNED);
> - if (nr_scanned)
> + if (nr_scanned &&
> + zone_page_state(zone, NR_FREE_PAGES) > high_wmark_pages(zone))
> __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
>
> if (unlikely(has_isolate_pageblock(zone) ||
>
> --
> 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>
>
next prev parent reply other threads:[~2015-03-18 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 18:30 Konstantin Khlebnikov
2015-03-18 13:48 ` Vlastimil Babka [this message]
2015-03-18 14:20 ` Konstantin Khlebnikov
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=55098230.5080600@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=khlebnikov@yandex-team.ru \
--cc=klamm@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--subject='Re: [PATCH RFC] mm: reset pages_scanned only when free pages are above high watermark' \
/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
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).