[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210312192634.GS7604@suse.cz>
Date: Fri, 12 Mar 2021 20:26:34 +0100
From: David Sterba <dsterba@...e.cz>
To: ira.weiny@...el.com
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/4] fs/btrfs: Convert raid5/6 kmaps to kmap_local_page()
On Tue, Feb 16, 2021 at 06:48:24PM -0800, ira.weiny@...el.com wrote:
> From: Ira Weiny <ira.weiny@...el.com>
>
> These kmaps are thread local and don't need to be atomic. So they can use
> the more efficient kmap_local_page(). However, the mapping of pages in
> the stripes and the additional parity and qstripe pages are a bit
> trickier because the unmapping must occur in the opposite order from the
> mapping. Furthermore, the pointer array in __raid_recover_end_io() may
> get reordered.
>
> Convert these calls to kmap_local_page() taking care to reverse the
> unmappings of any page arrays as well as being careful with the mappings
> of any special pages such as the parity and qstripe pages.
Though there's one more allocation for the additional array, I don't see
a simpler way to avoid it and track the array reordering at a lower
memory cost. At least it's not in a performance critical code and the
array size is reasonably small.
Powered by blists - more mailing lists