lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: fix pcp count beyond pcp high in pcplist allocation
On Mon, Oct 24, 2022 at 09:41:46PM +0800, Chen Wandun wrote:
> Nowadays there are several orders in pcplist, Function __rmqueue_pcplist
> would alloc pcp batch pages to refill pcplist, when list of target order
> if empty meanwhile other lists is not all empty, that result in pcp count
> beyond pcp high after allocation. This behaviour can be easily observed by
> adding debugging information in __rmqueue_pcplist.
>
> Fix this by recalculate the batch pages to be allocated.

Are any problems observed other than the PCP lists temporarily exceed
pcp->high? As is, the patch could result in a batch request of 0 and
fall through to allocating from the zone list anyway defeating the
purpose of the PCP allocator and probably regressing performance in some
csaes.

The intention was to allow high to be briefly exceeded on the refill side,
particularly for THP pages and to always refill by at least two pages. In
the THP case, one would be allocated and maybe one in the near future
without acquiring the zone lock. If the limits are exceeded, it's only
exceeded until the next free.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2022-10-25 02:09    [W:0.071 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site