linux-api.vger.kernel.org archive mirror
 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,
	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.

  reply	other threads:[~2025-01-16 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2025-01-17  7:56       ` Christoph Hellwig

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 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).