Re: [PATCH v3 2/2] fuse: kmemcg account fs data

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

 



On Tue, Sep 17, 2019 at 12:52 AM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Tue, Sep 17, 2019 at 1:56 AM Khazhismel Kumykov <khazhy@xxxxxxxxxx> wrote:
> >  struct fuse_forget_link *fuse_alloc_forget(void)
> >  {
> > -       return kzalloc(sizeof(struct fuse_forget_link), GFP_KERNEL);
> > +       return kzalloc(sizeof(struct fuse_forget_link),
> > +                      GFP_KERNEL_ACCOUNT | __GFP_RECLAIMABLE);
>
> What does __GFP_RECLAIMBALE signify in slab allocs?
>

Marking these allocations reclaimable hints to mm how much we can
reclaim overall by shrinking, so if it is reclaimable we should mark
it as such.

For d_fsdata, the lifetime is linked to the dentry, which is
reclaimable, so it makes sense here.

> You understand that the forget_link is not reclaimable in the sense,
> that it requires action (reading requests from the fuse device) from
> the userspace filesystem daemon?
>

Ah, I see, whenever we evict the fuse_inode, we queue a forget
command, which usually waits for userspace. So it's not actually
linked to the inode itself, and yeah, if we need userspace to
intervene we shouldn't treat forget_link as reclaimable. I had figured
since fuse_inode is reclaimable, this should be too, but missed that
disconnect, thanks.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux