From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
linux-man@vger.kernel.org
Subject: Re: [PATCH 1/2] f2fs: register inodes which is able to donate pages
Date: Thu, 16 Jan 2025 17:19:24 +0000 [thread overview]
Message-ID: <Z4k_nKT3V1xuhXGc@google.com> (raw)
In-Reply-To: <Z4imEs-Se-VWcpBG@infradead.org>
On 01/15, Christoph Hellwig wrote:
> On Wed, Jan 15, 2025 at 10:16:51PM +0000, Jaegeuk Kim wrote:
> > This patch introduces an inode list to keep the page cache ranges that users
> > can donate pages together.
> >
> > #define F2FS_IOC_DONATE_RANGE _IOW(F2FS_IOCTL_MAGIC, 27, \
> > struct f2fs_donate_range)
> > struct f2fs_donate_range {
> > __u64 start;
> > __u64 len;
> > };
>
> > e.g., ioctl(F2FS_IOC_DONATE_RANGE, &range);
>
> This is not a very good description. "donate" here seems to basically
> mean a invalidate_inode_pages2_range. Which is a strange use of the
> word. what are the use cases? Why is this queued up to a thread and
> not done inline? Why is this in f2fs and not in common code.
The idea is let apps register some file ranges for page donation and admin
recliam such pages all togehter if they expect to see memory pressure soon.
We can rely on LRU, but this is more user-given trigger. I'm not sure whether
there's a need in general, hence, wanted to put it in f2fs first to get more
concrete use-cases beyond this Android case.
>
> I also which file systems wouldn't just add random fs specific ioctls
> all the time without any kinds of discussion of the API. f2fs is by
> far the worst offender there, but not the only one.
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-man@vger.kernel.org, Christian Brauner <brauner@kernel.org>,
Jan Kara <jack@suse.cz>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: register inodes which is able to donate pages
Date: Thu, 16 Jan 2025 17:19:24 +0000 [thread overview]
Message-ID: <Z4k_nKT3V1xuhXGc@google.com> (raw)
In-Reply-To: <Z4imEs-Se-VWcpBG@infradead.org>
On 01/15, Christoph Hellwig wrote:
> On Wed, Jan 15, 2025 at 10:16:51PM +0000, Jaegeuk Kim wrote:
> > This patch introduces an inode list to keep the page cache ranges that users
> > can donate pages together.
> >
> > #define F2FS_IOC_DONATE_RANGE _IOW(F2FS_IOCTL_MAGIC, 27, \
> > struct f2fs_donate_range)
> > struct f2fs_donate_range {
> > __u64 start;
> > __u64 len;
> > };
>
> > e.g., ioctl(F2FS_IOC_DONATE_RANGE, &range);
>
> This is not a very good description. "donate" here seems to basically
> mean a invalidate_inode_pages2_range. Which is a strange use of the
> word. what are the use cases? Why is this queued up to a thread and
> not done inline? Why is this in f2fs and not in common code.
The idea is let apps register some file ranges for page donation and admin
recliam such pages all togehter if they expect to see memory pressure soon.
We can rely on LRU, but this is more user-given trigger. I'm not sure whether
there's a need in general, hence, wanted to put it in f2fs first to get more
concrete use-cases beyond this Android case.
>
> I also which file systems wouldn't just add random fs specific ioctls
> all the time without any kinds of discussion of the API. f2fs is by
> far the worst offender there, but not the only one.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2025-01-16 17:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 22:16 [f2fs-dev] [PATCH 0/2 v3] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-15 22:16 ` Jaegeuk Kim
2025-01-15 22:16 ` [f2fs-dev] [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-15 22:16 ` Jaegeuk Kim
2025-01-16 3:07 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-01-16 3:07 ` Chao Yu
2025-01-16 6:24 ` Christoph Hellwig
2025-01-16 6:24 ` [f2fs-dev] " Christoph Hellwig
2025-01-16 17:19 ` Jaegeuk Kim [this message]
2025-01-16 17:19 ` Jaegeuk Kim via Linux-f2fs-devel
2025-01-17 7:56 ` Christoph Hellwig
2025-01-17 7:56 ` [f2fs-dev] " Christoph Hellwig
2025-01-15 22:16 ` [f2fs-dev] [PATCH 2/2] f2fs: add a sysfs entry to request donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-15 22:16 ` Jaegeuk Kim
2025-01-16 3:14 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-01-16 3:14 ` Chao Yu
2025-01-16 4:41 ` Jaegeuk Kim via Linux-f2fs-devel
2025-01-16 4:41 ` Jaegeuk Kim
-- strict thread matches above, loose matches on Subject: below --
2025-01-31 22:27 [f2fs-dev] [PATCH 0/2 v8] add ioctl/sysfs to " Jaegeuk Kim via Linux-f2fs-devel
2025-01-31 22:27 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-22 21:10 [f2fs-dev] [PATCH 0/2 v7] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-22 21:10 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-17 16:41 [f2fs-dev] [PATCH 0/2 v6] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-17 16:41 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-16 22:51 [f2fs-dev] [PATCH 0/2 v5 RESEND] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-16 22:51 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-16 4:41 [f2fs-dev] [PATCH 0/2 v4] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-16 4:42 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-14 22:39 [f2fs-dev] [PATCH 0/2 v2] add ioctl/sysfs to donate file-backed pages Jaegeuk Kim via Linux-f2fs-devel
2025-01-14 22:39 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Jaegeuk Kim
2025-01-13 18:39 Jaegeuk Kim
2025-01-14 21:16 ` Eric Biggers
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=Z4k_nKT3V1xuhXGc@google.com \
--to=jaegeuk@kernel.org \
--cc=brauner@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.