From: Raghavendra K T <raghavendra.kt@amd.com>
To: Oliver Sang <oliver.sang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Mel Gorman <mgorman@suse.de>,
David Hildenbrand <david@redhat.com>,
rppt@kernel.org, Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Bharata B Rao <bharata@amd.com>,
Aithal Srikanth <sraithal@amd.com>,
fengwei.yin@intel.com
Subject: Re: [RFC PATCH V3 1/1] sched/numa: Fix disjoint set vma scan regression
Date: Mon, 17 Jul 2023 11:53:32 +0530 [thread overview]
Message-ID: <edc92c77-ec96-8f8b-dbbc-081624231dc4@amd.com> (raw)
In-Reply-To: <ZLP8F001a+Shp8DD@xsang-OptiPlex-9020>
On 7/16/2023 7:47 PM, Oliver Sang wrote:
> hi, Raghavendra K T,
>
> On Wed, Jul 05, 2023 at 11:18:37AM +0530, Raghavendra K T wrote:
>> On 5/31/2023 9:55 AM, Raghavendra K T wrote:
>>> With the numa scan enhancements [1], only the threads which had previously
>>> accessed vma are allowed to scan.
>>>
>>> While this had improved significant system time overhead, there were corner
>>> cases, which genuinely need some relaxation. For e.g.,
>>>
>>> 1) Concern raised by PeterZ, where if there are N partition sets of vmas
>>> belonging to tasks, then unfairness in allowing these threads to scan could
>>> potentially amplify the side effect of some of the vmas being left
>>> unscanned.
>>>
>>> 2) Below reports of LKP numa01 benchmark regression.
>>>
>>> Currently this is handled by allowing first two scanning unconditional
>>> as indicated by mm->numa_scan_seq. This is imprecise since for some
>>> benchmark vma scanning might itself start at numa_scan_seq > 2.
>>>
>>> Solution:
>>> Allow unconditional scanning of vmas of tasks depending on vma size. This
>>> is achieved by maintaining a per vma scan counter, where
>>>
>>> f(allowed_to_scan) = f(scan_counter < vma_size / scan_size)
>>>
>>> Result:
>>> numa01_THREAD_ALLOC result on 6.4.0-rc2 (that has numascan enhancement)
>>> base-numascan base base+fix
>>> real 1m1.507s 1m23.259s 1m2.632s
>>> user 213m51.336s 251m46.363s 220m35.528s
>>> sys 3m3.397s 0m12.492s 2m41.393s
>>>
>>> numa_hit 5615517 4560123 4963875
>>> numa_local 5615505 4560024 4963700
>>> numa_other 12 99 175
>>> numa_pte_updates 1822797 493 1559111
>>> numa_hint_faults 1307113 523 1469031
>>> numa_hint_faults_local 612617 488 884829
>>> numa_pages_migrated 694370 35 584202
>>>
>>> Summary: Regression in base is recovered by allowing scanning as required.
>>>
>>> [1] https://lore.kernel.org/lkml/cover.1677672277.git.raghavendra.kt@amd.com/T/#t
>>>
>>> Fixes: fc137c0ddab2 ("sched/numa: enhance vma scanning logic")
>>> regression.
>>> Reported-by: Aithal Srikanth <sraithal@amd.com>
>>> Reported-by: kernel test robot <oliver.sang@intel.com>
>>> Closes: https://lore.kernel.org/lkml/db995c11-08ba-9abf-812f-01407f70a5d4@amd.com/T/
>>> Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>
>>
>> Hello kernel test robot,
>>
>> Gentle ping to check if the patch has helped your regression report.
>
> sorry for late.
>
> previously we found a 118.9% regression of autonuma-benchmark.numa01.seconds
> on a Cascade Lake, which happened to be converted for other test purposes, so
> we cannot test your patch on it again.
>
> however, we also found a 39.3% regression on a Sapphire Rapids test machine:
>
> =========================================================================================
> compiler/cpufreq_governor/iterations/kconfig/rootfs/tbox_group/test/testcase:
> gcc-11/performance/4x/x86_64-rhel-8.3/debian-11.1-x86_64-20220510.cgz/lkp-spr-r02/numa02_SMT/autonuma-benchmark
>
> ef6a22b70f6d9044 fc137c0ddab29b591db6a091dc6
> ---------------- ---------------------------
> %stddev %change %stddev
> \ | \
> 193.14 +39.2% 268.84 autonuma-benchmark.numa01.seconds
> 8.14 -0.7% 8.09 autonuma-benchmark.numa02.seconds
>
>
> now we tested your v3 patch on it, found regression mostly recovered
> (55fd15913b18d6a790c17d947df is just [RFC PATCH V3 1/1] sched/numa: Fix disjoint set vma scan regression)
>
> =========================================================================================
> compiler/cpufreq_governor/iterations/kconfig/rootfs/tbox_group/test/testcase:
> gcc-11/performance/4x/x86_64-rhel-8.3/debian-11.1-x86_64-20220510.cgz/lkp-spr-r02/numa01_THREAD_ALLOC/autonuma-benchmark
>
> ef6a22b70f6d9044 55fd15913b18d6a790c17d947df
> ---------------- ---------------------------
> %stddev %change %stddev
> \ | \
> 193.14 +5.8% 204.37 ± 3% autonuma-benchmark.numa01.seconds
> 8.14 -0.9% 8.06 autonuma-benchmark.numa02.seconds
>
> detail comparison as below:
>
Thank you for the confirmation. So looks like we got back most of the
regression with the patch for numa01_THREAD_ALLOC case.
Andrew, could you please help by picking up this patch unless
Mel , PeterZ do not have any concern about the patch / direction.
(as we note it brings back little bit system time overhead by allowing
some scanning..)
Thanks and Regards
- Raghu
next prev parent reply other threads:[~2023-07-17 6:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 4:25 [RFC PATCH V3 0/1] " Raghavendra K T
2023-05-31 4:25 ` [RFC PATCH V3 1/1] " Raghavendra K T
2023-07-05 5:48 ` Raghavendra K T
2023-07-16 14:17 ` Oliver Sang
2023-07-17 6:23 ` Raghavendra K T [this message]
2023-07-21 15:18 ` Mel Gorman
2023-07-24 7:41 ` Raghavendra K T
2023-08-11 13:35 ` Raghavendra K T
2023-06-07 11:40 ` [RFC PATCH V3 0/1] " Sapkal Swapnil
2023-06-08 4:01 ` Raghavendra K T
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=edc92c77-ec96-8f8b-dbbc-081624231dc4@amd.com \
--to=raghavendra.kt@amd.com \
--cc=akpm@linux-foundation.org \
--cc=bharata@amd.com \
--cc=david@redhat.com \
--cc=fengwei.yin@intel.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=oliver.sang@intel.com \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=sraithal@amd.com \
--cc=vincent.guittot@linaro.org \
/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