[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220328215823.GV2237@twin.jikos.cz>
Date: Mon, 28 Mar 2022 23:58:23 +0200
From: David Sterba <dsterba@...e.cz>
To: Sweet Tea Dorminy <sweettea-kernel@...miny.me>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Nick Terrell <terrelln@...com>, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH 0/2] btrfs: Allocate page arrays more efficiently.
On Mon, Mar 28, 2022 at 04:14:26PM -0400, Sweet Tea Dorminy wrote:
> In several places, btrfs allocates an array of pages, one at a time. In
> addition to duplicating code, the mm subsystem provides a helper to
> allocate multiple pages at once into an array which is suited for our
> usecase. In the fast path, the batching can result in better allocation
> decisions and less locking. This changeset first adjusts the users to
> call a common array-of-pages allocation function, then adjusts that
> common function to use the batch page allocator.
Makes sense, the allocator internal knowledge can improve things. Though
after some time the memory often is fragmented and the bulk allocator
could fall back to single page allocation, it won't be worse than what
we already have.
I have some coding style comments, will reply under the patches,
otherwise the series looks good.
Powered by blists - more mailing lists