linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: <zhongjinji@honor.com>
Cc: <yuzhao@google.com>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, <rientjes@google.com>, <vbabka@suse.cz>,
	<yipengxiang@honor.com>, <liulu.liu@honor.com>,
	<feng.han@honor.com>
Subject: Re: [PATCH] mm/page_alloc: make the maximum number of highatomic pageblocks resizable
Date: Wed, 26 Feb 2025 15:17:57 -0800	[thread overview]
Message-ID: <20250226151757.6e3f4ce355d0fdbc11cd54c0@linux-foundation.org> (raw)
In-Reply-To: <20250226024126.3718-1-zhongjinji@honor.com>

On Wed, 26 Feb 2025 10:41:25 +0800 <zhongjinji@honor.com> wrote:

> From: zhongjinji <zhongjinji@honor.com>
> 
> In the past, nr_reserved_highatomic was considered to be part of
> unusable_free when there was no ALLOC_RESERVES flag. To prevent
> unusable_free from being too large, it is reasonable to set a
> fixed maximum highatomic value.

Can you explain further?  Why is it "reasonable"?  Please fully describe
the userspace-visible problem which this patch fixes.

> Even if the maximum number of highatomic pageblocks is set to be larger,
> unusable_free may not increase, since Yu Zhao provided the modification
> about nr_free_highatomic in
> https://lore.kernel.org/all/20241028182653.3420139-1-yuzhao@google.com/T/#u
> 
> More highatomic pageblocks are beneficial for the successful allocation
> of high-order page, which is helpful in some devices. Therefore, use
> highatomic_reserve_ratio to adjust the maximum number of highatomic
> pageblocks.

Can you provide testcases and measurements which help us to understand
and to quantify the benefits of this change?

> @@ -6199,6 +6201,13 @@ static const struct ctl_table page_alloc_sysctl_table[] = {
>  		.mode		= 0644,
>  		.proc_handler	= percpu_pagelist_high_fraction_sysctl_handler,
>  		.extra1		= SYSCTL_ZERO,
> +	},
> +		.procname	= "highatomic_reserve_ratio",
> +		.data		= &highatomic_reserve_ratio,
> +		.maxlen		= sizeof(highatomic_reserve_ratio),
> +		.mode		= 0644,
> +		.proc_handler	= proc_dointvec_minmax,
> +		.extra1		= SYSCTL_ZERO,
>  	},

Is there any way at all in which we can address the issue you're seeing
without adding yet another tunable?

Also, a new highatomic_reserve_ratio should be documented in
Documentation/admin-guide/sysctl/vm.rst, please.



  reply	other threads:[~2025-02-26 23:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26  2:41 zhongjinji
2025-02-26 23:17 ` Andrew Morton [this message]
2025-02-27  4:53 ` kernel test robot
2025-02-27  5:25 ` kernel test robot
2025-02-27  5:35 ` kernel test robot
2025-02-28 11:01 ` Vlastimil Babka

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=20250226151757.6e3f4ce355d0fdbc11cd54c0@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=feng.han@honor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liulu.liu@honor.com \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --cc=yipengxiang@honor.com \
    --cc=yuzhao@google.com \
    --cc=zhongjinji@honor.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