From: Amit Shah <amit@kernel.org>
To: David Reaver <me@davidreaver.com>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
Ira Weiny <ira.weiny@intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] virtio: console: Replace deprecated kmap_atomic with kmap_local_page
Date: Thu, 09 Jan 2025 11:00:33 +0100 [thread overview]
Message-ID: <71ebf77ed3f006e950a692368c87726c74e9063d.camel@kernel.org> (raw)
In-Reply-To: <20250109035904.168345-1-me@davidreaver.com>
On Wed, 2025-01-08 at 19:59 -0800, David Reaver wrote:
> kmap_atomic() is deprecated and should be replaced with
> kmap_local_page()
> [1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled,
> can
> take page faults, and allows preemption.
>
> According to [2], this replacement is safe as long as the code
> between
> kmap_atomic() and kunmap_atomic() does not implicitly depend on
> disabling
> page faults or preemption. In this patch, the only thing happening
> between
> mapping and unmapping the page is a memcpy, and I don't suspect it
> depends
> on disabling page faults or preemption.
>
> [1] https://lwn.net/Articles/836144/
> [2]
> https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings
>
> Signed-off-by: David Reaver <me@davidreaver.com>
Reviewed-by: Amit Shah <amit@kernel.org>
next prev parent reply other threads:[~2025-01-09 10:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 3:59 [PATCH] virtio: console: Replace deprecated kmap_atomic with kmap_local_page David Reaver
2025-01-09 10:00 ` Amit Shah [this message]
2025-01-10 15:09 ` 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=71ebf77ed3f006e950a692368c87726c74e9063d.camel@kernel.org \
--to=amit@kernel.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=me@davidreaver.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox