Skip to content

Free contiguous order-0 pages efficiently

Ryan Roberts linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm/page_alloc: Optimize free_contig_range()include/linux/gfp.h mm/page_alloc.c+106 -117 replies
2/2vmalloc: Optimize vfreemm/vmalloc.c+19 -103 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] Free contiguous order-0 pages efficiently

Hi All,

A recent change to vmalloc caused some performance benchmark regressions (see [1]). I'm attempting to fix that (and at the same time signficantly improve beyond the baseline) by freeing a contiguous set of order-0 pages as a batch.

At the same time I observed that free_contig_range() was essentially doing the same thing as vfree() so I've fixed it there too.

I think I've convinced myself that free_pages_prepare() per order-0 page followed by a single free_frozen_page_commit() or free_one_page() for the high order block is safe/correct, but would be good if a page_alloc expert can confirm!

Applies against today's mm-unstable (344d3580dacd). All mm selftests run and pass.

Thanks,
Ryan

Ryan Roberts (2):
mm/page_alloc: Optimize free_contig_range()
vmalloc: Optimize vfree

 include/linux/gfp.h |   1 +
 mm/page_alloc.c     | 116 +++++++++++++++++++++++++++++++++++++++-----
 mm/vmalloc.c        |  29 +++++++----
 3 files changed, 125 insertions(+), 21 deletions(-)

--
2.43.0