2022-04-07 19:41:52

by David Sterba

[permalink] [raw]
Subject: Re: [PATCH] btrfs: wait between incomplete batch allocations

On Wed, Apr 06, 2022 at 02:24:18PM -0400, Sweet Tea Dorminy wrote:
> When allocating memory in a loop, each iteration should call
> memalloc_retry_wait() in order to prevent starving memory-freeing
> processes (and to mark where allcoation loops are). ext4, f2fs, and xfs
> all use this function at present for their allocation loops; btrfs ought
> also.
>
> The bulk page allocation is the only place in btrfs with an allocation
> retry loop, so add an appropriate call to it.
>
> Suggested-by: David Sterba <[email protected]>
> Signed-off-by: Sweet Tea Dorminy <[email protected]>

Added to misc-next, thanks.