From: Bharata B Rao <bharata@amd.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, mingo@redhat.com,
peterz@infradead.org, mgorman@techsingularity.net,
raghavendra.kt@amd.com, dave.hansen@linux.intel.com,
hannes@cmpxchg.org
Subject: Re: [RFC PATCH 0/2] Hot page promotion optimization for large address space
Date: Fri, 12 Apr 2024 13:46:12 +0530 [thread overview]
Message-ID: <8b073658-268d-4d3e-bd94-3fe95c948bd9@amd.com> (raw)
In-Reply-To: <87cyqv59bj.fsf@yhuang6-desk2.ccr.corp.intel.com>
On 12-Apr-24 12:58 PM, Huang, Ying wrote:
> Bharata B Rao <bharata@amd.com> writes:
>
>> On 03-Apr-24 2:10 PM, Huang, Ying wrote:
>>>> Here are the numbers for the 192nd chunk:
>>>>
>>>> Each iteration of 262144 random accesses takes around ~10ms
>>>> 512 such iterations are taking ~5s
>>>> numa_scan_seq is 16 when this chunk is accessed.
>>>> And no page promotions were done from this chunk. All the
>>>> time should_numa_migrate_memory() found the NUMA hint fault
>>>> latency to be higher than threshold.
>>>>
>>>> Are these time periods considered too short for the pages
>>>> to be detected as hot and promoted?
>>>
>>> Yes. I think so. This is burst accessing, not repeated accessing.
>>> IIUC, NUMA balancing based promotion only works for repeated accessing
>>> for long time, for example, >100s.
>>
>> Hmm... When a page is accessed 512 times over a period of 5s and it is
>> still not detected as hot. This is understandable if fresh scanning couldn't
>> be done as the accesses were bursty and hence they couldn't be captured via
>> NUMA hint faults. But here the access captured via hint fault is being rejected
>> as not hot because the scanning was done a while back. But I do see the challenge
>> here since we depend on scanning time to obtain the frequency-of-access metric.
>
> Consider some pages that will be accessed once every 1 hour, should we
> consider it hot or not? Will your proposed method deal with that
> correctly?
The proposed method removes the absolute time as a factor for the decision and instead
relies on the number of hint faults that have occurred since that page was scanned last.
As long as there are enough hint faults happening in that 1 hour (which means a lot many
other accesses have been captured in that 1 hour), that page shouldn't be considered as
hot. You did mention earlier about hint fault rate varying a lot and one thing I haven't
tried yet is to vary the fault threshold based on current or historical fault rate.
Regards,
Bharata.
next prev parent reply other threads:[~2024-04-12 8:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 16:02 Bharata B Rao
2024-03-27 16:02 ` [RFC PATCH 1/2] sched/numa: Fault count based NUMA hint fault latency Bharata B Rao
2024-03-28 1:56 ` Huang, Ying
2024-03-28 4:39 ` Bharata B Rao
2024-03-28 5:21 ` Huang, Ying
2024-03-27 16:02 ` [RFC PATCH 2/2] mm: Update hint fault count for pages that are skipped during scanning Bharata B Rao
2024-03-28 5:35 ` [RFC PATCH 0/2] Hot page promotion optimization for large address space Huang, Ying
2024-03-28 5:49 ` Bharata B Rao
2024-03-28 6:03 ` Huang, Ying
2024-03-28 6:29 ` Bharata B Rao
2024-03-29 1:14 ` Huang, Ying
2024-04-01 12:20 ` Bharata B Rao
2024-04-02 2:03 ` Huang, Ying
2024-04-02 9:26 ` Bharata B Rao
2024-04-03 8:40 ` Huang, Ying
2024-04-12 4:00 ` Bharata B Rao
2024-04-12 7:28 ` Huang, Ying
2024-04-12 8:16 ` Bharata B Rao [this message]
2024-04-12 8:48 ` Huang, Ying
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=8b073658-268d-4d3e-bd94-3fe95c948bd9@amd.com \
--to=bharata@amd.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=raghavendra.kt@amd.com \
--cc=ying.huang@intel.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