lkml.org 
[lkml]   [2022]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/6] zswap: fix writeback lock ordering for zsmalloc
On (22/11/28 11:16), Nhat Pham wrote:
> zswap's customary lock order is tree->lock before pool->lock, because
> the tree->lock protects the entries' refcount, and the free callbacks in
> the backends acquire their respective pool locks to dispatch the backing
> object. zsmalloc's map callback takes the pool lock, so zswap must not
> grab the tree->lock while a handle is mapped. This currently only
> happens during writeback, which isn't implemented for zsmalloc. In
> preparation for it, move the tree->lock section out of the mapped entry
> section
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

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