mbox series

[f2fs-dev,0/2,v5] add ioctl/sysfs to donate file-backed pages

Message ID 20250116172438.2143971-1-jaegeuk@kernel.org (mailing list archive)
Headers show
Series add ioctl/sysfs to donate file-backed pages | expand

Message

Jaegeuk Kim Jan. 16, 2025, 5:19 p.m. UTC
If users clearly know which file-backed pages to reclaim in system view, they
can use this ioctl() to register in advance and reclaim all at once later.

Change log from v4:
 - fix range handling

Change log from v3:
 - cover partial range

Change log from v2:
 - add more boundary checks
 - de-register the range, if len is zero

Jaegeuk Kim (1):
  f2fs: add a sysfs entry to request donate file-backed pages

Yi Sun (1):
  f2fs: Optimize f2fs_truncate_data_blocks_range()

 Documentation/ABI/testing/sysfs-fs-f2fs |  7 ++++++
 fs/f2fs/f2fs.h                          |  2 ++
 fs/f2fs/file.c                          | 29 +++++++++++++++++++++----
 fs/f2fs/shrinker.c                      | 27 +++++++++++++++++++++++
 fs/f2fs/sysfs.c                         |  8 +++++++
 5 files changed, 69 insertions(+), 4 deletions(-)

Comments

Christoph Hellwig Jan. 17, 2025, 7:58 a.m. UTC | #1
Still NAC for sneaking in an almost undocumented MM feature into
a file system ioctl.  Especially while a discussion on that is still
ongoin.

And it's still bad that you don't even bother to Cc fsdevel on this,
nor linux-api or in this case the mm list.

On Thu, Jan 16, 2025 at 05:19:42PM +0000, Jaegeuk Kim wrote:
> If users clearly know which file-backed pages to reclaim in system view, they
> can use this ioctl() to register in advance and reclaim all at once later.
> 
> Change log from v4:
>  - fix range handling
> 
> Change log from v3:
>  - cover partial range
> 
> Change log from v2:
>  - add more boundary checks
>  - de-register the range, if len is zero
> 
> Jaegeuk Kim (1):
>   f2fs: add a sysfs entry to request donate file-backed pages
> 
> Yi Sun (1):
>   f2fs: Optimize f2fs_truncate_data_blocks_range()
> 
>  Documentation/ABI/testing/sysfs-fs-f2fs |  7 ++++++
>  fs/f2fs/f2fs.h                          |  2 ++
>  fs/f2fs/file.c                          | 29 +++++++++++++++++++++----
>  fs/f2fs/shrinker.c                      | 27 +++++++++++++++++++++++
>  fs/f2fs/sysfs.c                         |  8 +++++++
>  5 files changed, 69 insertions(+), 4 deletions(-)
> 
> -- 
> 2.48.0.rc2.279.g1de40edade-goog
> 
> 
---end quoted text---
Jaegeuk Kim Jan. 17, 2025, 4:40 p.m. UTC | #2
On 01/16, Christoph Hellwig wrote:
> Still NAC for sneaking in an almost undocumented MM feature into
> a file system ioctl.  Especially while a discussion on that is still
> ongoin.
> 
> And it's still bad that you don't even bother to Cc fsdevel on this,
> nor linux-api or in this case the mm list.

Well, I don't want to bother other groups for random APIs, unless I, myself, am
super confident this is feasible for generic API.
But, let me try to listen to other opinions.

> 
> On Thu, Jan 16, 2025 at 05:19:42PM +0000, Jaegeuk Kim wrote:
> > If users clearly know which file-backed pages to reclaim in system view, they
> > can use this ioctl() to register in advance and reclaim all at once later.
> > 
> > Change log from v4:
> >  - fix range handling
> > 
> > Change log from v3:
> >  - cover partial range
> > 
> > Change log from v2:
> >  - add more boundary checks
> >  - de-register the range, if len is zero
> > 
> > Jaegeuk Kim (1):
> >   f2fs: add a sysfs entry to request donate file-backed pages
> > 
> > Yi Sun (1):
> >   f2fs: Optimize f2fs_truncate_data_blocks_range()
> > 
> >  Documentation/ABI/testing/sysfs-fs-f2fs |  7 ++++++
> >  fs/f2fs/f2fs.h                          |  2 ++
> >  fs/f2fs/file.c                          | 29 +++++++++++++++++++++----
> >  fs/f2fs/shrinker.c                      | 27 +++++++++++++++++++++++
> >  fs/f2fs/sysfs.c                         |  8 +++++++
> >  5 files changed, 69 insertions(+), 4 deletions(-)
> > 
> > -- 
> > 2.48.0.rc2.279.g1de40edade-goog
> > 
> > 
> ---end quoted text---