[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190129181716.hstuxkdzai4qiist@MacBook-Pro-91.local>
Date: Tue, 29 Jan 2019 13:17:17 -0500
From: Josef Bacik <josef@...icpanda.com>
To: Dennis Zhou <dennis@...nel.org>
Cc: David Sterba <dsterba@...e.com>,
Josef Bacik <josef@...icpanda.com>, Chris Mason <clm@...com>,
Omar Sandoval <osandov@...ndov.com>,
Nick Terrell <terrelln@...com>, kernel-team@...com,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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 <dennis@...nel.org>
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,
Josef
Powered by blists - more mailing lists