[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190129184425.itcwgyrvqdwfmzjx@MacBook-Pro-91.local>
Date: Tue, 29 Jan 2019 13:44:26 -0500
From: Josef Bacik <josef@...icpanda.com>
To: Josef Bacik <josef@...icpanda.com>
Cc: Dennis Zhou <dennis@...nel.org>, David Sterba <dsterba@...e.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 Tue, Jan 29, 2019 at 01:17:17PM -0500, Josef Bacik wrote:
> 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,
>
Nevermind, I missed that you also change the get side to lookup the workspace
for the compression level instead of cycling through the idle_ws list. In that
case this is fine by me.
Reviewed-by: Josef Bacik <josef@...icpanda.com>
Thanks,
Josef
Powered by blists - more mailing lists