linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/mm_init.c: use round_up() to align movable range
Date: Thu, 13 Feb 2025 08:29:57 +0200	[thread overview]
Message-ID: <Z62RZZDRHN4Bt1OZ@kernel.org> (raw)
In-Reply-To: <20250207100453.9989-1-richard.weiyang@gmail.com>

On Fri, Feb 07, 2025 at 10:04:53AM +0000, Wei Yang wrote:
> Since MAX_ORDER_NR_PAGES is power of 2, let's use a faster version.
> 
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
>  mm/mm_init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index dec4084fe15a..99ef70a8b63c 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -438,7 +438,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
>  		 * was requested by the user
>  		 */
>  		required_movablecore =
> -			roundup(required_movablecore, MAX_ORDER_NR_PAGES);
> +			round_up(required_movablecore, MAX_ORDER_NR_PAGES);
>  		required_movablecore = min(totalpages, required_movablecore);
>  		corepages = totalpages - required_movablecore;
>  
> @@ -549,7 +549,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
>  		unsigned long start_pfn, end_pfn;
>  
>  		zone_movable_pfn[nid] =
> -			roundup(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES);
> +			round_up(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES);
>  
>  		get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
>  		if (zone_movable_pfn[nid] >= end_pfn)
> -- 
> 2.34.1
> 

-- 
Sincerely yours,
Mike.


  parent reply	other threads:[~2025-02-13  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 10:04 Wei Yang
2025-02-11 18:13 ` Shivank Garg
2025-02-12  0:24   ` Wei Yang
2025-02-13  6:29 ` Mike Rapoport [this message]
2025-02-13  6:37 ` Anshuman Khandual

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=Z62RZZDRHN4Bt1OZ@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=richard.weiyang@gmail.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