|
|
0dfa60 |
From 2f38664f81e1877f81b16ed327b540d69d175a5b Mon Sep 17 00:00:00 2001
|
|
|
0dfa60 |
Message-Id: <2f38664f81e1877f81b16ed327b540d69d175a5b.1566225007.git.aquini@redhat.com>
|
|
|
0dfa60 |
In-Reply-To: <d42f467a923dfc09309acb7a83b42e3285fbd8f4.1566225007.git.aquini@redhat.com>
|
|
|
0dfa60 |
References: <d42f467a923dfc09309acb7a83b42e3285fbd8f4.1566225007.git.aquini@redhat.com>
|
|
|
0dfa60 |
From: Sandipan Das <sandipan@linux.ibm.com>
|
|
|
0dfa60 |
Date: Thu, 15 Aug 2019 13:08:31 +0530
|
|
|
0dfa60 |
Subject: [RHEL7 PATCH 04/31] tests: task-size-overrun: Make test faster on
|
|
|
0dfa60 |
powerpc64
|
|
|
0dfa60 |
|
|
|
0dfa60 |
As of now, powerpc64 supports 64TB, 128TB, 512TB, 1PB, 2PB and
|
|
|
0dfa60 |
4PB user address space sizes with 4TB being the default for the
|
|
|
0dfa60 |
newer kernels. With the relatively conservative increments that
|
|
|
0dfa60 |
this test uses to find the task size, it takes a very long time
|
|
|
0dfa60 |
but this can be made faster by also increasing the increment
|
|
|
0dfa60 |
factor in steps of the different supported task sizes.
|
|
|
0dfa60 |
|
|
|
0dfa60 |
Fixes: 02df38e ("Defined task size value to be 512T if it is more that 64Tb.")
|
|
|
0dfa60 |
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
|
|
|
0dfa60 |
Signed-off-by: Eric B Munson <emunson@mgebm.net>
|
|
|
0dfa60 |
Signed-off-by: Rafael Aquini <aquini@redhat.com>
|
|
|
0dfa60 |
---
|
|
|
0dfa60 |
tests/task-size-overrun.c | 14 ++++++++++++--
|
|
|
0dfa60 |
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
0dfa60 |
|
|
|
0dfa60 |
diff --git a/tests/task-size-overrun.c b/tests/task-size-overrun.c
|
|
|
0dfa60 |
index dc9ce0e..914ef65 100644
|
|
|
0dfa60 |
--- a/tests/task-size-overrun.c
|
|
|
0dfa60 |
+++ b/tests/task-size-overrun.c
|
|
|
0dfa60 |
@@ -83,8 +83,18 @@ static unsigned long find_task_size(void)
|
|
|
0dfa60 |
munmap(p, getpagesize());
|
|
|
0dfa60 |
addr += getpagesize();
|
|
|
0dfa60 |
#if defined(__powerpc64__)
|
|
|
0dfa60 |
- if (addr > (1UL << 46) && addr < (1UL << 49))
|
|
|
0dfa60 |
- addr = 1UL << 49;
|
|
|
0dfa60 |
+ if (addr > (1UL << 46) && addr < (1UL << 47))
|
|
|
0dfa60 |
+ addr = 1UL << 47; /* 64TB */
|
|
|
0dfa60 |
+ else if (addr > (1UL << 47) && addr < (1UL << 48))
|
|
|
0dfa60 |
+ addr = 1UL << 48; /* 128TB */
|
|
|
0dfa60 |
+ else if (addr > (1UL << 48) && addr < (1UL << 49))
|
|
|
0dfa60 |
+ addr = 1UL << 49; /* 512TB */
|
|
|
0dfa60 |
+ else if (addr > (1UL << 49) && addr < (1UL << 50))
|
|
|
0dfa60 |
+ addr = 1UL << 50; /* 1PB */
|
|
|
0dfa60 |
+ else if (addr > (1UL << 50) && addr < (1UL << 51))
|
|
|
0dfa60 |
+ addr = 1UL << 51; /* 2PB */
|
|
|
0dfa60 |
+ else if (addr > (1UL << 51) && addr < (1UL << 52))
|
|
|
0dfa60 |
+ addr = 1UL << 52; /* 4PB */
|
|
|
0dfa60 |
#endif
|
|
|
0dfa60 |
#if defined(__s390x__)
|
|
|
0dfa60 |
if (addr > (1UL << 42) && addr < (1UL << 53))
|
|
|
0dfa60 |
--
|
|
|
0dfa60 |
1.8.3.1
|
|
|
0dfa60 |
|