From: ira.weiny@intel.com
To: Jan Kara <jack@suse.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] ext2: Convert kmap to kmap_local_page
Date: Sun, 28 Mar 2021 23:54:00 -0700 [thread overview]
Message-ID: <20210329065402.3297092-1-ira.weiny@intel.com> (raw)
From: Ira Weiny <ira.weiny@intel.com>
kmap is inefficient and can be abused so it is being phased out in favor of
kmap_local_page where possible.
ext2 uses kmap in ext2_[get|put]_page(). All of the calls to
ext2_[get|put]_page() occur in single threads so it is perfectly safe and
preferable to use kmap_local_page().
This series has a clean up which matches ext2_put_page() with ext2_dotdot() and
ext2_find_entry(). Those calls use ext2_get_page() to map the page prior to
returning it to their callers. And they document that ext2_put_page() should
be matched up with them. This was the case but the ext2_put_page() calls were
hidden in other functions. We lift the ext2_put_page() calls to match up to
the functions where ext2_dotdot() and ext2_find_entry() are called.
After that clean up convert ext2_[get|put]_page() to kmap and adjust for
kunmap_local() requiring the page address.
Nesting of kmap_local_page() calls is maintained with minor changes.
Ira Weiny (2):
ext2: Match up ext2_put_page() with ext2_dotdot() and
ext2_find_entry()
fs/ext2: Replace kmap() with kmap_local_page()
fs/ext2/dir.c | 94 +++++++++++++++++++++++++++++++------------------
fs/ext2/ext2.h | 12 ++++---
fs/ext2/namei.c | 34 +++++++++++-------
3 files changed, 89 insertions(+), 51 deletions(-)
--
2.28.0.rc0.12.gb6a658bd00c9
next reply other threads:[~2021-03-29 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 6:54 ira.weiny [this message]
2021-03-29 6:54 ` [PATCH 1/2] ext2: Match up ext2_put_page() with ext2_dotdot() and ext2_find_entry() ira.weiny
2021-03-29 6:54 ` [PATCH 2/2] fs/ext2: Replace kmap() with kmap_local_page() ira.weiny
2021-03-31 12:05 ` [PATCH 0/2] ext2: Convert kmap to kmap_local_page Jan Kara
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=20210329065402.3297092-1-ira.weiny@intel.com \
--to=ira.weiny@intel.com \
--cc=jack@suse.com \
--cc=linux-ext4@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).