All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE
Date: Wed, 19 Feb 2025 09:38:21 +0000	[thread overview]
Message-ID: <Z7WmjagtARpTA781@google.com> (raw)
In-Reply-To: <Z7REHrJ3ImdrF476@infradead.org>

On 02/18, Christoph Hellwig wrote:
> This still has a file system sysfs HACK, you're still not Ccing the
> right list, etc.
> 
> Can you pleae at least try to get it right?

I was modifying the patch having 1) declaring a static global list, 2) adding
some fields to superblock and inode structures to keep the given range in the
inode through fadvise, 3) adding hooks in evict_inode to handle the list, 4)
exploring which sysfs entry in MM to reclaim them explicitly.

But, I stopped at some point, as it looks not good at all. Moreover, I started
to be questioning why not just doing in F2FS back, given sementically I didn't
change anything  on general behavior of fadvise(POSIX_FADV_NOREUSE), IIUC, which
moves pages back to LRU. In addiiton to that, I'd like to keep the range hint in
a filesystem and provide a sysfs entry to manage the hints additionally.
In addition, I don't think there's rule that filesystem cannot reclaim file-back
pages, as it just uses the exported symbol that all filesystems are using in
various different purpose. Hence, I don't get the point which is wrong.

Thanks,

> 
> On Wed, Feb 12, 2025 at 02:31:55AM +0000, Jaegeuk Kim wrote:
> > This patch series does not add new API, but implements POSIX_FADV_NOREUSE where
> > it keeps the page ranges in the f2fs superblock and add a way for users to
> > reclaim the pages manually.
> > 
> > Change log from v8:
> >  - remove new APIs, but use fadvise(POSIX_FADV_NOREUSE)
> > 
> > Jaegeuk Kim (2):
> >   f2fs: keep POSIX_FADV_NOREUSE ranges
> >   f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages
> > 
> >  Documentation/ABI/testing/sysfs-fs-f2fs |  7 ++
> >  fs/f2fs/debug.c                         |  3 +
> >  fs/f2fs/f2fs.h                          | 14 +++-
> >  fs/f2fs/file.c                          | 60 +++++++++++++++--
> >  fs/f2fs/inode.c                         | 14 ++++
> >  fs/f2fs/shrinker.c                      | 90 +++++++++++++++++++++++++
> >  fs/f2fs/super.c                         |  1 +
> >  fs/f2fs/sysfs.c                         | 63 +++++++++++++++++
> >  8 files changed, 246 insertions(+), 6 deletions(-)
> > 
> > -- 
> > 2.48.1.601.g30ceb7b040-goog
> > 
> > 
> ---end quoted text---

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-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE
Date: Wed, 19 Feb 2025 09:38:21 +0000	[thread overview]
Message-ID: <Z7WmjagtARpTA781@google.com> (raw)
In-Reply-To: <Z7REHrJ3ImdrF476@infradead.org>

On 02/18, Christoph Hellwig wrote:
> This still has a file system sysfs HACK, you're still not Ccing the
> right list, etc.
> 
> Can you pleae at least try to get it right?

I was modifying the patch having 1) declaring a static global list, 2) adding
some fields to superblock and inode structures to keep the given range in the
inode through fadvise, 3) adding hooks in evict_inode to handle the list, 4)
exploring which sysfs entry in MM to reclaim them explicitly.

But, I stopped at some point, as it looks not good at all. Moreover, I started
to be questioning why not just doing in F2FS back, given sementically I didn't
change anything  on general behavior of fadvise(POSIX_FADV_NOREUSE), IIUC, which
moves pages back to LRU. In addiiton to that, I'd like to keep the range hint in
a filesystem and provide a sysfs entry to manage the hints additionally.
In addition, I don't think there's rule that filesystem cannot reclaim file-back
pages, as it just uses the exported symbol that all filesystems are using in
various different purpose. Hence, I don't get the point which is wrong.

Thanks,

> 
> On Wed, Feb 12, 2025 at 02:31:55AM +0000, Jaegeuk Kim wrote:
> > This patch series does not add new API, but implements POSIX_FADV_NOREUSE where
> > it keeps the page ranges in the f2fs superblock and add a way for users to
> > reclaim the pages manually.
> > 
> > Change log from v8:
> >  - remove new APIs, but use fadvise(POSIX_FADV_NOREUSE)
> > 
> > Jaegeuk Kim (2):
> >   f2fs: keep POSIX_FADV_NOREUSE ranges
> >   f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages
> > 
> >  Documentation/ABI/testing/sysfs-fs-f2fs |  7 ++
> >  fs/f2fs/debug.c                         |  3 +
> >  fs/f2fs/f2fs.h                          | 14 +++-
> >  fs/f2fs/file.c                          | 60 +++++++++++++++--
> >  fs/f2fs/inode.c                         | 14 ++++
> >  fs/f2fs/shrinker.c                      | 90 +++++++++++++++++++++++++
> >  fs/f2fs/super.c                         |  1 +
> >  fs/f2fs/sysfs.c                         | 63 +++++++++++++++++
> >  8 files changed, 246 insertions(+), 6 deletions(-)
> > 
> > -- 
> > 2.48.1.601.g30ceb7b040-goog
> > 
> > 
> ---end quoted text---


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2025-02-19  9:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  2:31 [f2fs-dev] [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE Jaegeuk Kim via Linux-f2fs-devel
2025-02-12  2:31 ` Jaegeuk Kim
2025-02-12  2:31 ` [f2fs-dev] [PATCH 1/2] f2fs: keep POSIX_FADV_NOREUSE ranges Jaegeuk Kim via Linux-f2fs-devel
2025-02-12  2:31   ` Jaegeuk Kim
2025-02-13  2:14   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-02-13  2:14     ` Chao Yu
2025-02-12  2:31 ` [f2fs-dev] [PATCH 2/2] f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages Jaegeuk Kim via Linux-f2fs-devel
2025-02-12  2:31   ` Jaegeuk Kim
2025-02-13  2:15   ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-02-13  2:15     ` Chao Yu
2025-02-18  8:26 ` [PATCH 0/2 v9] reclaim file-backed pages given POSIX_FADV_NOREUSE Christoph Hellwig
2025-02-18  8:26   ` [f2fs-dev] " Christoph Hellwig
2025-02-19  9:38   ` Jaegeuk Kim [this message]
2025-02-19  9:38     ` Jaegeuk Kim via Linux-f2fs-devel
2025-02-21  2:17 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
2025-02-21  2:17   ` patchwork-bot+f2fs

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=Z7WmjagtARpTA781@google.com \
    --to=jaegeuk@kernel.org \
    --cc=hch@infradead.org \
    --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-mm@kvack.org \
    /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.