linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	Theodore Ts'o <tytso@mit.edu>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Chao Yu <chao@kernel.org>, Miklos Szeredi <miklos@szeredi.hu>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-block@vger.kernel.org, ceph-devel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	"open list:F2FS FILE SYSTEM"
	<linux-f2fs-devel@lists.sourceforge.net>,
	cluster-devel@redhat.com, linux-xfs@vger.kernel.org,
	linux-nfs@vger.kernel.org, linux-mm@kvack.org,
	NeilBrown <neilb@suse.de>
Subject: Re: [PATCH 08/13] iomap: assign current->backing_dev_info in iomap_file_buffered_write
Date: Tue, 23 May 2023 04:30:51 +0100	[thread overview]
Message-ID: <ZGwza3fdkBHyVG3+@casper.infradead.org> (raw)
In-Reply-To: <20230523010627.GD11598@frogsfrogsfrogs>

On Mon, May 22, 2023 at 06:06:27PM -0700, Darrick J. Wong wrote:
> On Fri, May 19, 2023 at 11:35:16AM +0200, Christoph Hellwig wrote:
> > Move the assignment to current->backing_dev_info from the callers into
> > iomap_file_buffered_write to reduce boiler plate code and reduce the
> > scope to just around the page dirtying loop.
> > 
> > Note that zonefs was missing this assignment before.
> 
> I'm still wondering (a) what the hell current->backing_dev_info is for,
> and (b) if we need it around the iomap_unshare operation.
> 
> $ git grep current..backing_dev_info
[results show it only set, never used]
> 
> AFAICT nobody uses it at all?  Unless there's some bizarre user that
> isn't extracting it from @current?
> 
> Oh, hey, new question (c) isn't this set incorrectly for xfs realtime
> files?

Some git archaelogy ...

This was first introduced in commit 2f45a06517a62 (in the
linux-fullhistory tree) in 2002 by one Andrew Morton.  At the time,
it added this check to the page scanner:

+                               if (page->pte.direct ||
+                                       page->mapping->backing_dev_info ==
+                                               current->backing_dev_info) {
+                                       wait_on_page_writeback(page);
+                               }

AFAICT (the code went through some metamorphoses in the intervening
twenty years), the last use of it ended up in current_may_throttle(),
and it was removed in March 2022 by Neil Brown in commit b9b1335e6403.
Since then, there have been no users of task->backing_dev_info, and I'm
pretty sure it can go away.

  reply	other threads:[~2023-05-23  3:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19  9:35 cleanup the filemap / direct I/O interaction Christoph Hellwig
2023-05-19  9:35 ` [PATCH 01/13] iomap: update ki_pos a little later in iomap_dio_complete Christoph Hellwig
2023-05-21 23:40   ` Damien Le Moal
2023-07-06  0:18   ` [f2fs-dev] " patchwork-bot+f2fs
2023-05-19  9:35 ` [PATCH 02/13] filemap: update ki_pos in generic_perform_write Christoph Hellwig
2023-05-21 23:42   ` Damien Le Moal
2023-05-22  2:20   ` Xiubo Li
2023-05-19  9:35 ` [PATCH 03/13] filemap: assign current->backing_dev_info " Christoph Hellwig
2023-05-21 23:44   ` Damien Le Moal
2023-05-22  2:22   ` Xiubo Li
2023-05-19  9:35 ` [PATCH 04/13] filemap: add a kiocb_write_and_wait helper Christoph Hellwig
2023-05-21 23:46   ` Damien Le Moal
2023-05-19  9:35 ` [PATCH 05/13] filemap: add a kiocb_invalidate_pages helper Christoph Hellwig
2023-05-21 23:51   ` Damien Le Moal
2023-05-19  9:35 ` [PATCH 06/13] filemap: add a kiocb_invalidate_post_write helper Christoph Hellwig
2023-05-21 23:56   ` Damien Le Moal
2023-05-23 16:01     ` Christoph Hellwig
2023-05-19  9:35 ` [PATCH 07/13] iomap: update ki_pos in iomap_file_buffered_write Christoph Hellwig
2023-05-22  0:01   ` Damien Le Moal
2023-05-23 16:02     ` Christoph Hellwig
2023-05-19  9:35 ` [PATCH 08/13] iomap: assign current->backing_dev_info " Christoph Hellwig
2023-05-22  0:05   ` Damien Le Moal
2023-05-23  1:06   ` Darrick J. Wong
2023-05-23  3:30     ` Matthew Wilcox [this message]
2023-05-23 16:02       ` Christoph Hellwig
2023-05-19  9:35 ` [PATCH 09/13] iomap: use kiocb_write_and_wait and kiocb_invalidate_pages Christoph Hellwig
2023-05-22  0:07   ` Damien Le Moal
2023-05-19  9:35 ` [PATCH 10/13] fs: factor out a direct_write_fallback helper Christoph Hellwig
2023-05-22  0:16   ` Damien Le Moal
2023-05-22 14:19   ` Miklos Szeredi
2023-05-23 16:03     ` Christoph Hellwig
2023-05-19  9:35 ` [PATCH 11/13] fuse: update ki_pos in fuse_perform_write Christoph Hellwig
2023-05-22  0:18   ` Damien Le Moal
2023-05-19  9:35 ` [PATCH 12/13] fuse: drop redundant arguments to fuse_perform_write Christoph Hellwig
2023-05-22  0:19   ` Damien Le Moal
2023-05-19  9:35 ` [PATCH 13/13] fuse: use direct_write_fallback Christoph Hellwig
2023-05-22  0:20   ` Damien Le Moal
2023-05-23  1:12 ` cleanup the filemap / direct I/O interaction Darrick J. Wong

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=ZGwza3fdkBHyVG3+@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=agruenba@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=chao@kernel.org \
    --cc=cluster-devel@redhat.com \
    --cc=djwong@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=idryomov@gmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@hammerspace.com \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiubli@redhat.com \
    /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).