linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Gao Xiang <hsiangkao@gmx.com>
Cc: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, david@fromorbit.com,
	hch@infradead.org
Subject: Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code
Date: Tue, 19 May 2020 08:16:32 -0700	[thread overview]
Message-ID: <20200519151632.GX16070@bombadil.infradead.org> (raw)
In-Reply-To: <20200519100612.GA3687@hsiangkao-HP-ZHAN-66-Pro-G1>

On Tue, May 19, 2020 at 06:06:19PM +0800, Gao Xiang wrote:
> In addition, I found some limitation of new {attach,detach}_page_private
> helper (that is why I was interested in this series at that time [1] [2],
> but I gave up finally) since many patterns (not all) in EROFS are
> 
> io_submit (origin, page locked):
> attach_page_private(page);
> ...
> put_page(page);
> 
> end_io (page locked):
> SetPageUptodate(page);
> unlock_page(page);
> 
> since the page is always locked, so io_submit could be simplified as
> set_page_private(page, ...);
> SetPagePrivate(page);
> , which can save both one temporary get_page(page) and one
> put_page(page) since it could be regarded as safe with page locked.

It's fine to use page private like this without incrementing the refcount,
and I can't find any problematic cases in EROFS like those fixed by commit
8e47a457321ca1a74ad194ab5dcbca764bc70731

So I think the new helpers are not for you, and that's fine.  They'll be
useful for other filesystems which are using page_private differently
from the way that you do.

  parent reply	other threads:[~2020-05-19 15:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 21:47 [PATCH 00/10] Introduce attach/detach_page_private to cleanup code Guoqing Jiang
2020-05-17 21:47 ` [PATCH 01/10] include/linux/pagemap.h: introduce attach/detach_page_private Guoqing Jiang
2020-05-17 21:47 ` [PATCH 02/10] md: remove __clear_page_buffers and use attach/detach_page_private Guoqing Jiang
2020-05-17 21:47 ` [PATCH 03/10] btrfs: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 04/10] fs/buffer.c: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 05/10] f2fs: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 06/10] iomap: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 07/10] ntfs: replace attach_page_buffers with attach_page_private Guoqing Jiang
2020-05-17 21:47 ` [PATCH 08/10] orangefs: use attach/detach_page_private Guoqing Jiang
2020-05-26 21:54   ` Mike Marshall
2020-05-28  8:39     ` Guoqing Jiang
2020-05-17 21:47 ` [PATCH 09/10] buffer_head.h: remove attach_page_buffers Guoqing Jiang
2020-05-17 21:47 ` [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code Guoqing Jiang
2020-05-19  5:12   ` Andrew Morton
2020-05-19  7:35     ` Guoqing Jiang
2020-05-19 10:06       ` Gao Xiang
2020-05-19 11:02         ` Guoqing Jiang
2020-05-19 11:31           ` Gao Xiang
2020-05-19 15:16         ` Matthew Wilcox [this message]
2020-05-19 15:27           ` Gao Xiang
2020-05-19 20:44       ` Guoqing Jiang
2020-05-21 22:52   ` Dave Chinner
2020-05-22  7:18     ` Guoqing Jiang
2020-05-22 23:53       ` Andrew Morton
2020-05-24 19:02         ` Guoqing Jiang

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=20200519151632.GX16070@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=guoqing.jiang@cloud.ionos.com \
    --cc=hch@infradead.org \
    --cc=hsiangkao@gmx.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).