linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Should we delete memmove_page?
@ 2022-05-26 14:48 Matthew Wilcox
  2022-05-27  0:40 ` Ira Weiny
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2022-05-26 14:48 UTC (permalink / raw)
  To: Ira Weiny; +Cc: linux-mm


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?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-27  3:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 14:48 Should we delete memmove_page? Matthew Wilcox
2022-05-27  0:40 ` Ira Weiny
2022-05-27  1:26   ` Matthew Wilcox
2022-05-27  3:33     ` Ira Weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox