From: "Huang, Ying" <ying.huang@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "Lameter, Christopher" <cl@os.amperecomputing.com>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH] mm: fix draining remote pageset
Date: Wed, 06 Sep 2023 12:17:27 +0800 [thread overview]
Message-ID: <87zg202aw8.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <703e284d-186a-5699-f06c-761e51115ae0@suse.cz> (Vlastimil Babka's message of "Tue, 5 Sep 2023 18:52:29 +0200")
Vlastimil Babka <vbabka@suse.cz> writes:
> On 8/25/23 19:06, Lameter, Christopher wrote:
>> On Tue, 22 Aug 2023, Michal Hocko wrote:
>>
>>> Yes, this doesn't really show any actual correctness problem so I do not
>>> think this is sufficient to change the code. You would need to show that
>>> the existing behavior is actively harmful.
>>
>> Having some pages from a remote NUMA node stuck in a pcp somewhere is
>> making that memory unusable. It is usually rate that these remote pages
>> are needed again and so they may remain there for a long time if the
>> situation is right.
>>
>> And he is right that the intended behavior of freeing the remote pages
>> has been disabled by the patch.
>>
>> So I think there is sufficient rationale to apply these fixes.
>
> I wonder if this the optimum way to handle the NOHZ case? IIUC there we use
> quiet_vmstat() to call refresh_cpu_vm_stats(). I'd expect if there were
> pending remote pages to flush, it would be best to do it immediately, and
> not keep a worker being requeued and only do that after the pcp->expires
> goes zero.
>
> However quiet_vmstat() even calls the refresh with do_pagesets == false. Why
> do we even refresh the stats at that moment if the delayed update is pending
> anyway?
According to commit f01f17d3705b ("mm, vmstat: make quiet_vmstat
lighter") and the comments in quiet_vmstat(). The pending worker will
not be canceled to avoid long latency of idle entry.
> And could we maybe make sure that in that case the flush is done on
> the first delayed update in that case and not expiring like this?
This sounds reasonable. How to identify whether the current CPU is in
NOHZ state? Via tick_get_tick_sched()->tick_stopped?
--
Best Regards,
Huang, Ying
prev parent reply other threads:[~2023-09-06 4:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 9:08 Huang Ying
2023-08-11 9:35 ` Michal Hocko
2023-08-14 1:59 ` Huang, Ying
2023-08-16 6:49 ` Michal Hocko
2023-08-16 7:08 ` Huang, Ying
2023-08-16 20:23 ` Lameter, Christopher
2023-08-21 7:55 ` Michal Hocko
2023-08-21 8:30 ` Huang, Ying
2023-08-21 9:27 ` Michal Hocko
2023-08-21 22:31 ` Huang, Ying
2023-08-22 8:09 ` Michal Hocko
2023-08-25 17:06 ` Lameter, Christopher
2023-08-29 6:08 ` Huang, Ying
2023-08-29 18:05 ` Lameter, Christopher
2023-09-05 16:52 ` Vlastimil Babka
2023-09-06 4:17 ` Huang, Ying [this message]
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=87zg202aw8.fsf@yhuang6-desk2.ccr.corp.intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cl@os.amperecomputing.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=vbabka@suse.cz \
/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