All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: David Sterba <dsterba@suse.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	Nick Terrell <terrelln@fb.com>, Chris Down <chris@chrisdown.name>,
	Filipe Manana <fdmanana@suse.com>, Qu Wenruo <wqu@suse.com>,
	Nikolay Borisov <nborisov@suse.com>,
	Gabriel Niebler <gniebler@suse.com>,
	Ira Weiny <ira.weiny@intel.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Sterba <dsterba@suse.cz>
Subject: Re: [RFC PATCH] btrfs: Replace kmap_atomic() with kmap_local_page()
Date: Mon, 27 Jun 2022 20:01:31 +0200	[thread overview]
Message-ID: <8960694.CDJkKcVGEf@opensuse> (raw)
In-Reply-To: <20220624084215.7287-1-fmdefrancesco@gmail.com>

On venerdì 24 giugno 2022 10:42:15 CEST Fabio M. De Francesco wrote:
> kmap_atomic() is being deprecated in favor of kmap_local_page() where it
> is feasible. With kmap_local_page() mappings are per thread, CPU local,
> and not globally visible.
> 
> As far as I can see, the kmap_atomic() calls in compression.c and in
> inode.c can be safely converted.
> 
> Above all else, David Sterba has confirmed that "The context in
> check_compressed_csum is atomic [...]" and that "kmap_atomic() in inode.c
> [...] also can be replaced by kmap_local_page().".[1]
> 
> Therefore, convert all kmap_atomic() calls currently still left in fs/
btrfs
> to kmap_local_page().
> 
> This is an RFC only because, testing with "./check -g quick" (xfstests) 
on
> a QEMU + KVM 32-bits VM with 4GB RAM and booting a kernel with 
HIGHMEM64GB
> enabled, outputs several errors. These errors seem to be exactly the same
> which are being output without this patch. It apparently seems that these
> changes don't introduce further errors, however I'd like to ask for
> comments before sending a "real" patch.
> 
> With this patch, there are no more call sites for kmap() and 
kmap_atomic()
> in fs/btrfs.
> 
> [1] https://lore.kernel.org/linux-btrfs/
20220601132545.GM20633@twin.jikos.cz/
> 
> Suggested-by: Ira Weiny <ira.weiny@intel.com>
> Suggested-by: David Sterba <dsterba@suse.cz>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  fs/btrfs/compression.c |  4 ++--
>  fs/btrfs/inode.c       | 12 ++++++------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 

Please discard this RFC.

I've just submitted a real patch:

https://lore.kernel.org/lkml/20220627174849.29962-1-fmdefrancesco@gmail.com/

Thanks,

Fabio



      reply	other threads:[~2022-06-27 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  8:42 [RFC PATCH] btrfs: Replace kmap_atomic() with kmap_local_page() Fabio M. De Francesco
2022-06-27 18:01 ` Fabio M. De Francesco [this message]

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=8960694.CDJkKcVGEf@opensuse \
    --to=fmdefrancesco@gmail.com \
    --cc=chris@chrisdown.name \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=fdmanana@suse.com \
    --cc=gniebler@suse.com \
    --cc=ira.weiny@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=terrelln@fb.com \
    --cc=wqu@suse.com \
    /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.