From: Matthew Wilcox <willy@infradead.org>
To: Ira Weiny <ira.weiny@intel.com>
Cc: linux-mm@kvack.org
Subject: Should we delete memmove_page?
Date: Thu, 26 May 2022 15:48:28 +0100 [thread overview]
Message-ID: <Yo+TPE2Zrg6czyBu@casper.infradead.org> (raw)
I was looking at memmove_page() and it occurred to me that it can't
actually work, so we should probably delete it as being an attractive
nuisance. It doesn't have any users.
memmove() isn't magic. It compares the source address, source length,
destination address and destination length, and then does either a
forwards copy or a backwards copy, depending where the overlap is.
But 'dst' and 'src' are guaranteed to be non-overlapping. They come from
different calls to kmap_local_page(), so even if src_page and dst_page
are the same, src and dst will be different.
We could fix it up. Include a compare of 'dst_page' and 'src_page'
and if they're the same only kmap_local_page() one of them. But since
it has no users, perhaps just delete it?
next reply other threads:[~2022-05-26 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 14:48 Matthew Wilcox [this message]
2022-05-27 0:40 ` Ira Weiny
2022-05-27 1:26 ` Matthew Wilcox
2022-05-27 3:33 ` 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=Yo+TPE2Zrg6czyBu@casper.infradead.org \
--to=willy@infradead.org \
--cc=ira.weiny@intel.com \
--cc=linux-mm@kvack.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