lkml.org 
[lkml]   [2022]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] zsmalloc: Consolidate zs_pool's migrate_lock and size_class's locks
On (22/10/26 13:06), Nhat Pham wrote:
> struct size_class {
> - spinlock_t lock;
> struct list_head fullness_list[NR_ZS_FULLNESS];
> /*
> * Size of objects stored in this class. Must be multiple
> @@ -247,8 +245,7 @@ struct zs_pool {
> #ifdef CONFIG_COMPACTION
> struct work_struct free_work;
> #endif
> - /* protect page/zspage migration */
> - rwlock_t migrate_lock;
> + spinlock_t lock;
> };

I'm not in love with this, to be honest. One big pool lock instead
of 255 per-class locks doesn't look attractive, as one big pool lock
is going to be hammered quite a lot when zram is used, e.g. as a regular
block device with a file system and is under heavy parallel writes/reads.

\
 
 \ /
  Last update: 2022-11-02 04:30    [W:0.134 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site