linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] RFC: zswap tree use xarray instead of RB tree
@ 2024-01-18  3:05 Chris Li
  2024-01-18  3:05 ` [PATCH 1/2] mm: zswap.c: add xarray tree to zswap Chris Li
                   ` (3 more replies)
  0 siblings, 4 replies; 43+ messages in thread
From: Chris Li @ 2024-01-18  3:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-mm, Wei Xu,
	Yu Zhao, Greg Thelen, Chun-Tse Shao, Suren Baghdasaryan,
	Yosry Ahmed, Brain Geffon, Minchan Kim, Michal Hocko, Mel Gorman,
	Huang Ying, Nhat Pham, Johannes Weiner, Kairui Song, Zhongkun He,
	Kemeng Shi, Barry Song, Matthew Wilcox (Oracle),
	Liam R. Howlett, Joel Fernandes, Chengming Zhou, Chris Li

The RB tree shows some contribution to the swap fault
long tail latency due to two factors:
1) RB tree requires re-balance from time to time.
2) The zswap RB tree has a tree level spin lock protecting
the tree access.

The swap cache is using xarray. The break down the swap
cache access does not have the similar long time as zswap
RB tree.

Moving the zswap entry to xarray enable read side
take read RCU lock only.

The first patch adds the xarray alongside the RB tree.
There is some debug check asserting the xarray agrees with
the RB tree results.

The second patch removes the zwap RB tree.

I expect to merge the zswap rb tree spin lock with the xarray
lock in the follow up changes.

I can surely use some help in reviewing and testing.

Signed-off-by: Chris Li <chrisl@kernel.org>
---
Chris Li (2):
      mm: zswap.c: add xarray tree to zswap
      mm: zswap.c: remove RB tree

 mm/zswap.c | 120 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 59 insertions(+), 61 deletions(-)
---
base-commit: d7ba3d7c3bf13e2faf419cce9e9bdfc3a1a50905
change-id: 20240104-zswap-xarray-716260e541e3

Best regards,
-- 
Chris Li <chrisl@kernel.org>



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

end of thread, other threads:[~2024-01-19 22:08 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18  3:05 [PATCH 0/2] RFC: zswap tree use xarray instead of RB tree Chris Li
2024-01-18  3:05 ` [PATCH 1/2] mm: zswap.c: add xarray tree to zswap Chris Li
2024-01-18  6:20   ` Yosry Ahmed
2024-01-18 13:52     ` Matthew Wilcox
2024-01-18 16:59       ` Yosry Ahmed
2024-01-18 18:25         ` Matthew Wilcox
2024-01-19  5:28           ` Chris Li
2024-01-19 19:30             ` Yosry Ahmed
2024-01-19  5:24     ` Chris Li
2024-01-19 19:29       ` Yosry Ahmed
2024-01-19 20:04         ` Matthew Wilcox
2024-01-19 21:41           ` Yosry Ahmed
2024-01-19 22:05             ` Chris Li
2024-01-19 22:08               ` Yosry Ahmed
2024-01-18  3:05 ` [PATCH 2/2] mm: zswap.c: remove RB tree Chris Li
2024-01-18  6:35   ` Yosry Ahmed
2024-01-18 19:35     ` Yosry Ahmed
2024-01-19  5:49       ` Chris Li
2024-01-19 19:37         ` Yosry Ahmed
2024-01-19  5:43     ` Chris Li
2024-01-19 19:36       ` Yosry Ahmed
2024-01-19 21:31         ` Chris Li
2024-01-19 21:44           ` Yosry Ahmed
2024-01-18  6:01 ` [PATCH 0/2] RFC: zswap tree use xarray instead of " Yosry Ahmed
2024-01-18  6:39   ` Yosry Ahmed
2024-01-18  6:57     ` Chengming Zhou
2024-01-18  7:02       ` Yosry Ahmed
2024-01-18  7:19         ` Chris Li
2024-01-18  7:35           ` Chengming Zhou
2024-01-19  4:59             ` Chris Li
2024-01-19  6:18               ` Chengming Zhou
2024-01-19 10:26                 ` Chris Li
2024-01-19 11:12                   ` Chengming Zhou
2024-01-19 11:59                     ` Chris Li
2024-01-18  6:48   ` Christopher Li
2024-01-18  7:05     ` Yosry Ahmed
2024-01-18  7:28       ` Chris Li
2024-01-18 17:14         ` Yosry Ahmed
2024-01-18 14:48       ` Johannes Weiner
2024-01-18 18:59     ` Liam R. Howlett
2024-01-19  5:13       ` Chris Li
2024-01-18 18:01 ` Nhat Pham
2024-01-19  5:14   ` Chris Li

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