linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: "黄朝阳 (Zhaoyang Huang)" <zhaoyang.huang@unisoc.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"康纪滨 (Steve Kang)" <Steve.Kang@unisoc.com>
Subject: Re: summarize all information again at bottom//reply: reply: [PATCH] mm: fix a race scenario in folio_isolate_lru
Date: Thu, 28 Mar 2024 03:18:27 +0000	[thread overview]
Message-ID: <ZgThg-pzQzRl3ckF@casper.infradead.org> (raw)
In-Reply-To: <CAGWkznF3GfCs8odhR-Hue5H8MZ=eXb82V20ZoCCjeoSjAPQ9cw@mail.gmail.com>

On Thu, Mar 28, 2024 at 09:27:31AM +0800, Zhaoyang Huang wrote:
> ok, I missed the refcnt from alloc_pages. However, I still think it is
> a bug to call readahead_folio in read_pages as the refcnt obtained by
> alloc_pages should be its final guard which is paired to the one which
> checked in shrink_folio_list->__remove_mapping->folio_ref_freeze(2)(this
> 2 represent alloc_pages & page cache). If we removed this one without

__remove_mapping()  requires that the caller holds the folio locked.
Since the readahead code unlocks the folio, __remove_mapping() cannot
be run because the caller of __remove_mapping() will wait for the folio
lock.


  reply	other threads:[~2024-03-28  3:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  9:32 summarize all information again at bottom//reply: reply: [PATCH] mm: fix a race scenario in folio_isolate_lru 黄朝阳 (Zhaoyang Huang)
2024-03-18 12:32 ` Matthew Wilcox
2024-03-19  0:48   ` Zhaoyang Huang
2024-03-19  3:01     ` Matthew Wilcox
2024-03-21  8:25       ` Zhaoyang Huang
2024-03-21 12:36         ` Matthew Wilcox
2024-03-22  1:52           ` Zhaoyang Huang
2024-03-22  3:20             ` Matthew Wilcox
2024-03-24 11:14               ` Zhaoyang Huang
2024-03-25  3:22                 ` Matthew Wilcox
2024-03-26  9:06                   ` Zhaoyang Huang
2024-03-26 12:21                     ` Matthew Wilcox
2024-03-27  1:25                       ` Zhaoyang Huang
2024-03-27 12:31                         ` Matthew Wilcox
2024-03-28  1:27                           ` Zhaoyang Huang
2024-03-28  3:18                             ` Matthew Wilcox [this message]
2024-03-28  4:03                               ` Zhaoyang Huang
2024-03-28 14:12                                 ` Matthew Wilcox
2024-03-29  5:49                                   ` Zhaoyang Huang
2024-03-29 12:19                                     ` Matthew Wilcox

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=ZgThg-pzQzRl3ckF@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Steve.Kang@unisoc.com \
    --cc=akpm@linux-foundation.org \
    --cc=huangzhaoyang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=zhaoyang.huang@unisoc.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).