All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] zswap: store zero-filled pages more efficiently
@ 2024-03-25 23:50 Yosry Ahmed
  2024-03-25 23:50 ` [RFC PATCH 1/9] mm: zswap: always shrink in zswap_store() if zswap_pool_reached_full Yosry Ahmed
                   ` (8 more replies)
  0 siblings, 9 replies; 53+ messages in thread
From: Yosry Ahmed @ 2024-03-25 23:50 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Johannes Weiner, Nhat Pham, Chengming Zhou, linux-mm,
	linux-kernel, Yosry Ahmed

This patch series drops the support for non-zero same-filled pages from
zswap and makes storing zero-filled pages faster and more efficient.
Non-zero same-filled pages should not be nearly as common as zero-filled
pages, so dropping support for them in favor of improving the more
common zero-filled pages makes sense. It also allows for a lot of code
cleanups.

Patch 1 is a small cleanup for zswap_store() cleanup path that also
implies a small behavioral change.

Patches 2-4 are groundword refactoring.

Patch 5 removes the userspace tunable to enable same-filled pages
handling. It arguably makes no sense anyway.

Patch 6 drops the support for non-zero same-filled pages, and patch 7
allows for storing them more efficiently. Both of these patch cause
around 1.4% improvement in the system time on kernbench. The kernel
build test only produces around 1.5% zero-filled pages. Some real
workloads are expected to have higher ratios of zero-filled pages and
hence more improvement. They also save a little bit of memory. Exact
numbers are in the commit logs.

Patch 8 drops the limit checks before handling zero-filled pages and
patch 9 does a followup cleanup of zswap_store() made possible by this
series.

This series is tagged as an RFC because it makes some potentially
controversial decisions :)

The series is based on a slightly outdated mm-unstable.

Yosry Ahmed (9):
  mm: zswap: always shrink in zswap_store() if zswap_pool_reached_full
  mm: zswap: refactor storing to the tree out of zswap_store()
  mm: zswap: refactor limit checking from zswap_store()
  mm: zswap: move more same-filled pages checks outside of zswap_store()
  mm: zswap: remove zswap_same_filled_pages_enabled
  mm: zswap: drop support for non-zero same-filled pages handling
  mm: zswap: store zero-filled pages without a zswap_entry
  mm: zswap: do not check the global limit for zero-filled pages
  mm: zswap: use zswap_entry_free() for partially initialized entries

 mm/zswap.c | 297 +++++++++++++++++++++++++----------------------------
 1 file changed, 139 insertions(+), 158 deletions(-)

-- 
2.44.0.396.g6e790dbe36-goog


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

end of thread, other threads:[~2024-04-01 18:30 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 23:50 [RFC PATCH 0/9] zswap: store zero-filled pages more efficiently Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 1/9] mm: zswap: always shrink in zswap_store() if zswap_pool_reached_full Yosry Ahmed
2024-03-26 21:49   ` Nhat Pham
2024-03-27  2:21   ` Chengming Zhou
2024-03-28 19:09   ` Johannes Weiner
2024-03-25 23:50 ` [RFC PATCH 2/9] mm: zswap: refactor storing to the tree out of zswap_store() Yosry Ahmed
2024-03-27  2:25   ` Chengming Zhou
2024-03-27 22:29     ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 3/9] mm: zswap: refactor limit checking from zswap_store() Yosry Ahmed
2024-03-27  2:42   ` Chengming Zhou
2024-03-27 22:30     ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 4/9] mm: zswap: move more same-filled pages checks outside of zswap_store() Yosry Ahmed
2024-03-26 21:57   ` Nhat Pham
2024-03-27  2:39   ` Chengming Zhou
2024-03-27 22:32     ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 5/9] mm: zswap: remove zswap_same_filled_pages_enabled Yosry Ahmed
2024-03-26 22:01   ` Nhat Pham
2024-03-27  2:44   ` Chengming Zhou
2024-03-27 22:34     ` Yosry Ahmed
2024-03-28 19:11   ` Johannes Weiner
2024-03-28 20:06     ` Yosry Ahmed
2024-03-29  2:14       ` Yosry Ahmed
2024-03-29 14:02         ` Maciej S. Szmigiero
2024-03-29 17:44           ` Johannes Weiner
2024-03-29 18:22             ` Yosry Ahmed
2024-04-01 10:37               ` Maciej S. Szmigiero
2024-04-01 18:29                 ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 6/9] mm: zswap: drop support for non-zero same-filled pages handling Yosry Ahmed
2024-03-27 11:25   ` Chengming Zhou
2024-03-27 16:40   ` Nhat Pham
2024-03-27 22:38     ` Yosry Ahmed
2024-03-28 19:31   ` Johannes Weiner
2024-03-28 20:23     ` Yosry Ahmed
2024-03-28 21:07       ` Johannes Weiner
2024-03-28 23:19         ` Nhat Pham
2024-03-29  2:05           ` Yosry Ahmed
2024-03-29  4:27             ` Yosry Ahmed
2024-03-29 17:37               ` Johannes Weiner
2024-03-29 18:56                 ` Yosry Ahmed
2024-03-29 21:17                   ` Johannes Weiner
2024-03-29 22:29                     ` Yosry Ahmed
2024-03-28 23:33       ` Nhat Pham
2024-03-29  2:07         ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 7/9] mm: zswap: store zero-filled pages without a zswap_entry Yosry Ahmed
2024-03-28  8:12   ` Chengming Zhou
2024-03-28 18:45     ` Yosry Ahmed
2024-03-28 19:38   ` Johannes Weiner
2024-03-28 20:29     ` Yosry Ahmed
2024-03-25 23:50 ` [RFC PATCH 8/9] mm: zswap: do not check the global limit for zero-filled pages Yosry Ahmed
2024-03-28  8:15   ` Chengming Zhou
2024-03-25 23:50 ` [RFC PATCH 9/9] mm: zswap: use zswap_entry_free() for partially initialized entries Yosry Ahmed
2024-03-28  8:31   ` Chengming Zhou
2024-03-28 18:49     ` Yosry Ahmed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.