linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER
Date: Fri, 2 Nov 2018 09:55:57 +0100	[thread overview]
Message-ID: <20181102081949.GQ23921@dhcp22.suse.cz> (raw)
In-Reply-To: <154109387197.925352.10499549042420271600.stgit@buzz>

On Thu 01-11-18 20:37:52, Konstantin Khlebnikov wrote:
> Page allocator has check in __alloc_pages_slowpath() but nowdays
> there is earlier entry point into reclimer without such check:
> get_page_from_freelist() -> node_reclaim().

Is the order check so expensive that it would be visible in the fast
path? Spreading these MAX_ORDER checks sounds quite fragile to me.

> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
>  mm/vmscan.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 62ac0c488624..52f672420f0b 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -4117,6 +4117,12 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)
>  {
>  	int ret;
>  
> +	/*
> +	 * Do not scan if allocation will never succeed.
> +	 */
> +	if (order >= MAX_ORDER)
> +		return NODE_RECLAIM_NOSCAN;
> +
>  	/*
>  	 * Node reclaim reclaims unmapped file backed pages and
>  	 * slab pages if we are over the defined limits.
> 

-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2018-11-02  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 17:37 [PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER Konstantin Khlebnikov
2018-11-02  8:55 ` Michal Hocko [this message]

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=20181102081949.GQ23921@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).