From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, rppt@kernel.org,
peterz@infradead.org, mingo@redhat.com,
mgorman@techsingularity.net, dishaa.talreja@amd.com,
david@redhat.com, bharata@amd.com, raghavendra.kt@amd.com,
akpm@linux-foundation.org
Subject: + sched-numa-use-hash_32-to-mix-up-pids-accessing-vma.patch added to mm-unstable branch
Date: Thu, 02 Mar 2023 18:25:36 -0800 [thread overview]
Message-ID: <20230303022536.AD7FDC433D2@smtp.kernel.org> (raw)
The patch titled
Subject: sched/numa: use hash_32 to mix up PIDs accessing VMA
has been added to the -mm mm-unstable branch. Its filename is
sched-numa-use-hash_32-to-mix-up-pids-accessing-vma.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/sched-numa-use-hash_32-to-mix-up-pids-accessing-vma.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Raghavendra K T <raghavendra.kt@amd.com>
Subject: sched/numa: use hash_32 to mix up PIDs accessing VMA
Date: Wed, 1 Mar 2023 17:49:03 +0530
before: last 6 bits of PID is used as index to store information about
tasks accessing VMA's.
after: hash_32 is used to take of cases where tasks are created over a
period of time, and thus improve collision probability.
Result:
The patch series overall improves autonuma cost.
Kernbench around more than 5% improvement and system time in mmtest
autonuma showed more than 80% improvement
Link: https://lkml.kernel.org/r/d5a9f75513300caed74e5c8570bba9317b963c2b.1677672277.git.raghavendra.kt@amd.com
Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Bharata B Rao <bharata@amd.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Disha Talreja <dishaa.talreja@amd.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/include/linux/mm.h~sched-numa-use-hash_32-to-mix-up-pids-accessing-vma
+++ a/include/linux/mm.h
@@ -1671,7 +1671,7 @@ static inline void vma_set_access_pid_bi
{
unsigned int pid_bit;
- pid_bit = current->pid % BITS_PER_LONG;
+ pid_bit = hash_32(current->pid, ilog2(BITS_PER_LONG));
if (vma->numab_state && !test_bit(pid_bit, &vma->numab_state->access_pids[1])) {
__set_bit(pid_bit, &vma->numab_state->access_pids[1]);
}
--- a/kernel/sched/fair.c~sched-numa-use-hash_32-to-mix-up-pids-accessing-vma
+++ a/kernel/sched/fair.c
@@ -2941,7 +2941,7 @@ static bool vma_is_accessed(struct vm_ar
return true;
pids = vma->numab_state->access_pids[0] | vma->numab_state->access_pids[1];
- return test_bit(current->pid % BITS_PER_LONG, &pids);
+ return test_bit(hash_32(current->pid, ilog2(BITS_PER_LONG)), &pids);
}
#define VMA_PID_RESET_PERIOD (4 * sysctl_numa_balancing_scan_delay)
_
Patches currently in -mm which might be from raghavendra.kt@amd.com are
sched-numa-enhance-vma-scanning-logic.patch
sched-numa-implement-access-pid-reset-logic.patch
sched-numa-use-hash_32-to-mix-up-pids-accessing-vma.patch
reply other threads:[~2023-03-03 2:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230303022536.AD7FDC433D2@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=bharata@amd.com \
--cc=david@redhat.com \
--cc=dishaa.talreja@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=mm-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=raghavendra.kt@amd.com \
--cc=rppt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.