Re: [RFC v2 PATCH 05/17] mm: Routines to determine max anon folio allocation order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 14, 2023 at 02:02:51PM +0100, Ryan Roberts wrote:
> For variable-order anonymous folios, we want to tune the order that we
> prefer to allocate based on the vma. Add the routines to manage that
> heuristic.
> 
> TODO: Currently we always use the global maximum. Add per-vma logic!
> 
> Signed-off-by: Ryan Roberts <ryan.roberts@xxxxxxx>
> ---
>  include/linux/mm.h | 5 +++++
>  mm/memory.c        | 8 ++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index cdb8c6031d0f..cc8d0b239116 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3674,4 +3674,9 @@ madvise_set_anon_name(struct mm_struct *mm, unsigned long start,
>  }
>  #endif
> 
> +/*
> + * TODO: Should this be set per-architecture?
> + */
> +#define ANON_FOLIO_ORDER_MAX	4
> +

I think it has to be derived from size in bytes, not directly specifies
page order. For 4K pages, order 4 is 64k and for 64k pages it is 1M.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux