On Tue, Feb 16, 2021 at 06:48:24PM -0800, [email protected] wrote:
> From: Ira Weiny <[email protected]>
> 
> 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.

Reply via email to