* Re: [PATCH 1/2] f2fs: register inodes which is able to donate pages
[not found] ` <20250115221814.1920703-2-jaegeuk@kernel.org>
@ 2025-01-16 6:24 ` Christoph Hellwig
2025-01-16 17:19 ` Jaegeuk Kim
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2025-01-16 6:24 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: linux-kernel, linux-f2fs-devel, Al Viro, Jan Kara,
Christian Brauner, linux-fsdevel, linux-api, linux-man
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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] f2fs: register inodes which is able to donate pages
2025-01-16 6:24 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Christoph Hellwig
@ 2025-01-16 17:19 ` Jaegeuk Kim
2025-01-17 7:56 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2025-01-16 17:19 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, linux-f2fs-devel, Al Viro, Jan Kara,
Christian Brauner, linux-fsdevel, linux-api, linux-man
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] f2fs: register inodes which is able to donate pages
2025-01-16 17:19 ` Jaegeuk Kim
@ 2025-01-17 7:56 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-01-17 7:56 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Christoph Hellwig, linux-kernel, linux-f2fs-devel, Al Viro,
Jan Kara, Christian Brauner, linux-fsdevel, linux-api, linux-man,
linux-mm
On Thu, Jan 16, 2025 at 05:19:24PM +0000, Jaegeuk Kim wrote:
> > 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.
Well, that's certainly not a file system feature. Please build this
as generic infrastucture and send it to the linux-mm list.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-17 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250115221814.1920703-1-jaegeuk@kernel.org>
[not found] ` <20250115221814.1920703-2-jaegeuk@kernel.org>
2025-01-16 6:24 ` [PATCH 1/2] f2fs: register inodes which is able to donate pages Christoph Hellwig
2025-01-16 17:19 ` Jaegeuk Kim
2025-01-17 7:56 ` Christoph Hellwig
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).