[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241121045109.GA20615@lst.de>
Date: Thu, 21 Nov 2024 05:51:09 +0100
From: Christoph Hellwig <hch@....de>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Max Kellermann <max.kellermann@...os.com>,
Johannes Weiner <hannes@...xchg.org>,
Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>
Subject: Re: Bad psi_group_cpu.tasks[NR_MEMSTALL] counter
On Wed, Nov 20, 2024 at 08:56:21AM -0800, Suren Baghdasaryan wrote:
> This is interesting. readahead_expand() indeed has
> psi_memstall_enter() without a matching psi_memstall_leave():
> https://elixir.bootlin.com/linux/v6.11.9/source/mm/readahead.c#L727
> and https://elixir.bootlin.com/linux/v6.11.9/source/mm/readahead.c#L754.
> Looks like this was introduced in [1]. I'm not sure if that's a bug
> or psi_memstall_leave() is supposed to be called from somewhere else.
> CC'ing Christoph to clarify.
So the readahead_control structure tracks if psi_memstall_enter has
been called using the _workingset member, and the assumption was
that readahead_expand is only called from aops->readahead so that
read_pages() takes care of the psi_memstall_leave. This still seems
reasonable given that readahead_expand operates on the ractl structure
only used by ->readahead, and tested fine back then.
Something seems to be going wrong here, though, but the trace below
doesn't really tell me anything about the workload or file system
used, and if this is even calling into readahead.
Powered by blists - more mailing lists