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]
Date:   Tue, 31 Jan 2023 16:26:06 +0200
From:   Georgi Djakov <djakov@...nel.org>
To:     Sukadev Bhattiprolu <quic_sukadev@...cinc.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Rik van Riel <riel@...riel.com>, Roman Gushchin <guro@...com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Joonsoo Kim <js1304@...il.com>,
        Minchan Kim <minchan@...nel.org>,
        Chris Goldsworthy <quic_cgoldswo@...cinc.com>,
        Georgi Djakov <quic_c_gdjako@...cinc.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm,page_alloc,cma: configurable CMA utilization

Hi Sukadev,

On 31.01.23 9:10, Sukadev Bhattiprolu wrote:
> 
> Commit 16867664936e ("mm,page_alloc,cma: conditionally prefer cma pageblocks for movable allocations")
> added support to use CMA pages when more than 50% of total free pages in
> the zone are free CMA pages.
> 
> However, with multiplatform kernels a single binary is used across different
> targets of varying memory sizes. A low memory target using one such kernel
> would incur allocation failures even when sufficient memory is available in
> the CMA region. On these targets we would want to utilize a higher percentage
> of the CMA region and reduce the allocation failures, even if it means that a
> subsequent cma_alloc() would take longer.
>  > Make the percentage of CMA utilization a configurable parameter to allow
> for such usecases.

The above makes sense to me. But it also needs to documented like the other
sysctl files in Documentation/admin-guide/sysctl/vm.rst

Thanks,
Georgi

> 
> Signed-off-by: Sukadev Bhattiprolu <quic_sukadev@...cinc.com>
> ---
> Note:	There was a mention about it being the last resort to making this
> 	percentage configurable (https://lkml.org/lkml/2020/3/12/751). But
> 	as explained above, multi-platform kernels for varying memory size
> 	targets would need this to be configurable.
> ---
>   include/linux/mm.h |  1 +
>   kernel/sysctl.c    |  8 ++++++++
>   mm/page_alloc.c    | 18 +++++++++++++++---
>   mm/util.c          |  2 ++
>   4 files changed, 26 insertions(+), 3 deletions(-)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ