linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] convert read_kcore(), vread() to use iterators
@ 2023-03-19  0:20 Lorenzo Stoakes
  2023-03-19  0:20 ` [PATCH 1/4] fs/proc/kcore: Avoid bounce buffer for ktext data Lorenzo Stoakes
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Lorenzo Stoakes @ 2023-03-19  0:20 UTC (permalink / raw)
  To: linux-mm, linux-kernel, linux-fsdevel, Andrew Morton
  Cc: Baoquan He, Uladzislau Rezki, Matthew Wilcox, David Hildenbrand,
	Liu Shixin, Jiri Olsa, Lorenzo Stoakes

While reviewing Baoquan's recent changes to permit vread() access to
vm_map_ram regions of vmalloc allocations, Willy pointed out [1] that it
would be nice to refactor vread() as a whole, since its only user is
read_kcore() and the existing form of vread() necessitates the use of a
bounce buffer.

This patch series does exactly that, as well as adjusting how we read the
kernel text section to avoid the use of a bounce buffer in this case as
well.

This patch series necessarily changes the locking used in vmalloc, however
tests indicate that this has very little impact on allocation performance
(test results are shown in the relevant patch).

This has been tested against the test case which motivated Baoquan's
changes in the first place [2] which continues to function correctly, as
do the vmalloc self tests.

[1] https://lore.kernel.org/all/Y8WfDSRkc%2FOHP3oD@casper.infradead.org/
[2] https://lore.kernel.org/all/87ilk6gos2.fsf@oracle.com/T/#u

Lorenzo Stoakes (4):
  fs/proc/kcore: Avoid bounce buffer for ktext data
  mm: vmalloc: use rwsem, mutex for vmap_area_lock and vmap_block->lock
  fs/proc/kcore: convert read_kcore() to read_kcore_iter()
  mm: vmalloc: convert vread() to vread_iter()

 fs/proc/kcore.c         |  84 +++++++------------
 include/linux/vmalloc.h |   3 +-
 mm/vmalloc.c            | 178 +++++++++++++++++++++-------------------
 3 files changed, 125 insertions(+), 140 deletions(-)

--
2.39.2


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

end of thread, other threads:[~2023-03-20  8:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19  0:20 [PATCH 0/4] convert read_kcore(), vread() to use iterators Lorenzo Stoakes
2023-03-19  0:20 ` [PATCH 1/4] fs/proc/kcore: Avoid bounce buffer for ktext data Lorenzo Stoakes
2023-03-19  0:20 ` [PATCH 2/4] mm: vmalloc: use rwsem, mutex for vmap_area_lock and vmap_block->lock Lorenzo Stoakes
2023-03-19  0:20 ` [PATCH 3/4] fs/proc/kcore: convert read_kcore() to read_kcore_iter() Lorenzo Stoakes
2023-03-19  0:20 ` [PATCH 4/4] mm: vmalloc: convert vread() to vread_iter() Lorenzo Stoakes
2023-03-19  1:46   ` kernel test robot
2023-03-19  6:08     ` Lorenzo Stoakes
2023-03-19  2:16   ` kernel test robot
2023-03-19  6:03     ` Lorenzo Stoakes
2023-03-19  2:50   ` Matthew Wilcox
2023-03-19  6:16     ` Lorenzo Stoakes
2023-03-19 22:28     ` David Laight
2023-03-20  8:30       ` Lorenzo Stoakes

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).