linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khazhismel Kumykov <khazhy@google.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Shakeel B <shakeelb@google.com>
Subject: Re: [PATCH v3 2/2] fuse: kmemcg account fs data
Date: Tue, 17 Sep 2019 12:21:41 -0700	[thread overview]
Message-ID: <CACGdZY+iviCmTc1fQriWSBbxhywGiFj1+f6RJ1AXpE6i=O_i-w@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegtevJHaOpeaGCTmj6WMjOt-RsfMs+oJBgNTLTOJt9Je_g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

On Tue, Sep 17, 2019 at 12:52 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Tue, Sep 17, 2019 at 1:56 AM Khazhismel Kumykov <khazhy@google.com> 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 #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4843 bytes --]

  reply	other threads:[~2019-09-17 19:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 23:56 [PATCH v3 1/2] fuse: on 64-bit store time in d_fsdata directly Khazhismel Kumykov
2019-09-16 23:56 ` [PATCH v3 2/2] fuse: kmemcg account fs data Khazhismel Kumykov
2019-09-17  7:52   ` Miklos Szeredi
2019-09-17 19:21     ` Khazhismel Kumykov [this message]
2019-09-17 19:35       ` [PATCH v4] " Khazhismel Kumykov
2019-09-17  7:46 ` [PATCH v3 1/2] fuse: on 64-bit store time in d_fsdata directly Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACGdZY+iviCmTc1fQriWSBbxhywGiFj1+f6RJ1AXpE6i=O_i-w@mail.gmail.com' \
    --to=khazhy@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=shakeelb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).