linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mm/zsmalloc: some cleanup for get/set_zspage_mapping()
@ 2024-02-20  6:52 Chengming Zhou
  2024-02-20  6:53 ` [PATCH 1/3] mm/zsmalloc: remove set_zspage_mapping() Chengming Zhou
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chengming Zhou @ 2024-02-20  6:52 UTC (permalink / raw)
  To: nphamcs, Andrew Morton, Sergey Senozhatsky, hannes, yosryahmed,
	Minchan Kim
  Cc: Chengming Zhou, linux-kernel, linux-mm

The discussion[1] with Sergey shows there are some cleanup works to do
in get/set_zspage_mapping():

- the fullness returned from get_zspage_mapping() is not stable outside
  pool->lock, this usage pattern is confusing, but should be ok in this
  free_zspage path.

- we seldom use the class_idx returned from get_zspage_mapping(), only
  free_zspage path use to get its class.

- set_zspage_mapping() always set the zspage->class, but it's never
  changed after zspage allocated.

[1] https://lore.kernel.org/all/a6c22e30-cf10-4122-91bc-ceb9fb57a5d6@bytedance.com/

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
Chengming Zhou (3):
      mm/zsmalloc: remove set_zspage_mapping()
      mm/zsmalloc: remove_zspage() don't need fullness parameter
      mm/zsmalloc: remove get_zspage_mapping()

 mm/zsmalloc.c | 55 +++++++++++++------------------------------------------
 1 file changed, 13 insertions(+), 42 deletions(-)
---
base-commit: 207636f0f52428f3b46540b212d6f93c6ac484cf
change-id: 20240220-b4-zsmalloc-cleanup-560a4159bb6b

Best regards,
-- 
Chengming Zhou <zhouchengming@bytedance.com>


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

end of thread, other threads:[~2024-02-20  6:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20  6:52 [PATCH 0/3] mm/zsmalloc: some cleanup for get/set_zspage_mapping() Chengming Zhou
2024-02-20  6:53 ` [PATCH 1/3] mm/zsmalloc: remove set_zspage_mapping() Chengming Zhou
2024-02-20  6:53 ` [PATCH 2/3] mm/zsmalloc: remove_zspage() don't need fullness parameter Chengming Zhou
2024-02-20  6:53 ` [PATCH 3/3] mm/zsmalloc: remove get_zspage_mapping() Chengming Zhou

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