lkml.org 
[lkml]   [2023]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm-treewide-redefine-max_order-sanely-fix.txt
On Fri, 7 Apr 2023 00:14:31 +0300 Mike Rapoport <rppt@kernel.org> wrote:

> > > Shouldn't that be
> > > else
> > > order = 0;
> > > ?
> >
> > +Mike.
> >
> > No. start == 0 is MAX_ORDER-aligned. We want to free the pages in the
> > largest chunks alignment allows.
>
> Right. Before the changes to MAX_ORDER it was
>
> order = min(MAX_ORDER - 1UL, __ffs(start));
>
> which would evaluate to 10.
>
> I'd just prefer the comment to include the explanation about why we choose
> MAX_ORDER for start == 0. Say
>
> /*
> * __ffs() behaviour is undefined for 0 and we want to free the
> * pages in the largest chunks alignment allows, so set order to
> * MAX_ORDER when start == 0
> */

Meanwhile I'd like to fix "various boot failures (hang) on arm targets"
in -next, so I queued up Kirill's informal fix for now.

\
 
 \ /
  Last update: 2023-04-07 00:45    [W:0.082 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site