All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] selftests-mm-set-overcommit_policy-as-overcommit_always.patch removed from -mm tree
@ 2023-04-06  2:45 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-04-06  2:45 UTC (permalink / raw)
  To: mm-commits, shuah, david, chaitanyas.prakash, akpm


The quilt patch titled
     Subject: selftests/mm: set overcommit_policy as OVERCOMMIT_ALWAYS
has been removed from the -mm tree.  Its filename was
     selftests-mm-set-overcommit_policy-as-overcommit_always.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
Subject: selftests/mm: set overcommit_policy as OVERCOMMIT_ALWAYS
Date: Thu, 23 Mar 2023 11:31:21 +0530

The kernel's default behaviour is to obstruct the allocation of high
virtual address as it handles memory overcommit in a heuristic manner. 
Setting the parameter as OVERCOMMIT_ALWAYS, ensures kernel isn't
susceptible to the availability of a platform's physical memory when
denying a memory allocation request.

Link: https://lkml.kernel.org/r/20230323060121.1175830-4-chaitanyas.prakash@arm.com
Signed-off-by: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/run_vmtests.sh |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/tools/testing/selftests/mm/run_vmtests.sh~selftests-mm-set-overcommit_policy-as-overcommit_always
+++ a/tools/testing/selftests/mm/run_vmtests.sh
@@ -220,7 +220,15 @@ CATEGORY="mremap" run_test ./mremap_test
 CATEGORY="hugetlb" run_test ./thuge-gen
 
 if [ $VADDR64 -ne 0 ]; then
+
+	# set overcommit_policy as OVERCOMMIT_ALWAYS so that kernel
+	# allows high virtual address allocation requests independent
+	# of platform's physical memory.
+
+	prev_policy=$(cat /proc/sys/vm/overcommit_memory)
+	echo 1 > /proc/sys/vm/overcommit_memory
 	CATEGORY="hugevm" run_test ./virtual_address_range
+	echo $prev_policy > /proc/sys/vm/overcommit_memory
 
 	# virtual address 128TB switch test
 	CATEGORY="hugevm" run_test ./va_128TBswitch.sh
_

Patches currently in -mm which might be from chaitanyas.prakash@arm.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-06  2:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06  2:45 [merged mm-stable] selftests-mm-set-overcommit_policy-as-overcommit_always.patch removed from -mm tree Andrew Morton

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.