lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250226151757.6e3f4ce355d0fdbc11cd54c0@linux-foundation.org>
Date: Wed, 26 Feb 2025 15:17:57 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: <zhongjinji@...or.com>
Cc: <yuzhao@...gle.com>, <linux-kernel@...r.kernel.org>,
 <linux-mm@...ck.org>, <rientjes@...gle.com>, <vbabka@...e.cz>,
 <yipengxiang@...or.com>, <liulu.liu@...or.com>, <feng.han@...or.com>
Subject: Re: [PATCH] mm/page_alloc: make the maximum number of highatomic
 pageblocks resizable

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

> From: zhongjinji <zhongjinji@...or.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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ