[lkml]   [2019]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 07/11] btrfs: move to fn pointers for get/put workspaces
On Mon, Jan 28, 2019 at 04:24:33PM -0500, Dennis Zhou wrote:
> The previous patch added generic helpers for get_workspace() and
> put_workspace(). Now, we can migrate ownership of the workspace_manager
> to be in the compression type code as the compression code itself
> doesn't care beyond being able to get a workspace. The init/cleanup
> and get/put methods are abstracted so each compression algorithm can
> decide how they want to manage their workspaces.
> Signed-off-by: Dennis Zhou <>

We're doing this to have special handling for extra workspaces to be free'd at
some point in the future if they are unused. This is fine by me, but why not
just add a shrinker and let it be handled by memory pressure? Then we avoid all
this abstraction and allow for ztsd to have its shrinker for its extra
workspaces. You can even use the list_lru stuff to make it super simple, then
you don't have to worry about all the infrastructure. Thanks,


 \ /
  Last update: 2019-01-29 19:18    [W:0.226 / U:5.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site