lkml.org 
[lkml]   [2023]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] zram: add a parameter "node_id" for zram
On (23/09/01 15:19), Ze Zuo wrote:
> Now, zram memory allocation is random, however in some cases, specifying
> specific nodes for memory allocation for zram may have good effects.

I'm sorry, but that needs benchmarks in order to be justified.

> In addition, when memory tier is supported, demotion can be achieved not
> only through page migration, it is also possible to apply for memory by
> specifying zram on low-speed device nodes, such as CXL memory devices,
> and compressing pages to these devices through memory reclamation to
> achieve similar effects to migration.

zram->table has nothing to do with zsmalloc pool. zram->table is a
fixed size (it depends on block device size) array that maps block
index to zsmalloc handle. It's allocated once, when the device is
initialized. Compressed pages are not stored there, zsmalloc pool
is a separate thing.

[..]

> + zram->table = vzalloc_node(array_size(num_pages, sizeof(*zram->table)), node_id);

\
 
 \ /
  Last update: 2023-09-05 18:19    [W:0.076 / U:2.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site