All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: ira.weiny@intel.com
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/4] fs/btrfs: Convert raid5/6 kmaps to kmap_local_page()
Date: Fri, 12 Mar 2021 20:26:34 +0100	[thread overview]
Message-ID: <20210312192634.GS7604@suse.cz> (raw)
In-Reply-To: <20210217024826.3466046-3-ira.weiny@intel.com>

On Tue, Feb 16, 2021 at 06:48:24PM -0800, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.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.

  reply	other threads:[~2021-03-12 19:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  2:48 [PATCH 0/4] btrfs: Convert more kmaps to kmap_local_page() ira.weiny
2021-02-17  2:48 ` [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle ira.weiny
2021-03-12 18:58   ` David Sterba
2021-03-12 20:03     ` Ira Weiny
2021-03-16 11:04       ` David Sterba
2021-02-17  2:48 ` [PATCH 2/4] fs/btrfs: Convert raid5/6 kmaps to kmap_local_page() ira.weiny
2021-03-12 19:26   ` David Sterba [this message]
2021-02-17  2:48 ` [PATCH 3/4] fs/btrfs: Use kmap_local_page() in __btrfsic_submit_bio() ira.weiny
2021-02-17  2:48 ` [PATCH 4/4] fs/btrfs: Convert block context kmap's to kmap_local_page() ira.weiny
2021-03-11 21:30 ` [PATCH 0/4] btrfs: Convert more kmaps " Ira Weiny
2021-03-12 19:41 ` David Sterba
2021-03-12 20:05   ` Ira Weiny
2021-03-16 11:07     ` David Sterba
2021-03-16 16:56       ` Ira Weiny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210312192634.GS7604@suse.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=ira.weiny@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.