Re: [PATCH] btrfs: root memcgroup for metadata filemap_add_folio()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 02, 2024 at 12:41:29AM -0700, Christoph Hellwig wrote:
> > > This looks pretty ugly.  What speaks against a version of
> > > filemap_add_folio that doesn't charge the memcg?
> 
> What I'd propose is something like the patch below, plus proper
> documentation.

I like this much better as well.

> Note that this now does the uncharge on the unlocked folio in the
> error case.  From a quick look that should be fine, but someone who
> actually knows the code needs to confirm that.

That's fine. For the same reason the non-atomic __folio_clear_locked()
is fine in that case. The folio just has to be exclusive.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux