linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: zippermonkey <zzippermonkey@outlook.com>
To: zhangpengpeng0808@gmail.com
Cc: akpm@linux-foundation.org, bruzzhang@tencent.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, vernhao@tencent.com, willy@infradead.org,
	zigiwang@tencent.com, jack@suse.cz
Subject: Re: [PATCH RFC] mm/readahead: Fix repeat initial_readahead
Date: Tue, 25 Jun 2024 14:28:34 +0800	[thread overview]
Message-ID: <SYBP282MB2224E68F688DD74FFEA86AA6B9D52@SYBP282MB2224.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20240618114941.5935-1-zhangpengpeng0808@gmail.com>

To illustrate this problem, I created the following example:


Assuming that the process reads sequentially from the beginning of the 
file and
calls the `page_cache_sync_readahead` function. In this sync readahead 
function,
since the index is 0, it will proceed to `initial_readahead` and initialize
`ra_state`. It allocates a folio with an order of 2 and marks it as 
PG_readahead.
Next, because` (folio_test_readahead(folio))` is true, the 
page_cache_async_ra
function is called, which causes the `ra_state` to be initialized again.


  reply	other threads:[~2024-06-25  6:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 11:49 Peng Zhang
2024-06-25  6:28 ` zippermonkey [this message]
2024-06-25 10:36   ` Jan Kara

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=SYBP282MB2224E68F688DD74FFEA86AA6B9D52@SYBP282MB2224.AUSP282.PROD.OUTLOOK.COM \
    --to=zzippermonkey@outlook.com \
    --cc=akpm@linux-foundation.org \
    --cc=bruzzhang@tencent.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vernhao@tencent.com \
    --cc=willy@infradead.org \
    --cc=zhangpengpeng0808@gmail.com \
    --cc=zigiwang@tencent.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