stress-ng: fix stress-icache on x86 (#6435)

This commit is contained in:
davidkaroly
2022-01-27 16:00:39 +01:00
committed by GitHub
parent 80dfac68f6
commit 9bae1f54d0
2 changed files with 43 additions and 28 deletions

View File

@@ -1,33 +1,48 @@
From 2488e162f38e9b753f9d1ec0cb11258e17ae6944 Mon Sep 17 00:00:00 2001
From 632e49dc6eebdbeebed5c5f91ca63ea98aa5dfc4 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Tue, 23 Nov 2021 10:46:52 +0000
Subject: remove stress-icache.c
Date: Fri, 26 Nov 2021 17:45:23 +0000
Subject: disable 64K alignment on 32-bit Haiku
diff --git a/Makefile b/Makefile
index 4c163d6..4d25430 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,6 @@ STRESS_SRC = \
stress-heapsort.c \
stress-hrtimers.c \
stress-hsearch.c \
- stress-icache.c \
stress-icmp-flood.c \
stress-idle-page.c \
stress-inode-flags.c \
diff --git a/stress-ng.h b/stress-ng.h
index 8fc5def..e12cd0d 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -2522,7 +2522,6 @@ typedef struct {
MACRO(heapsort) \
MACRO(hrtimers) \
MACRO(hsearch) \
- MACRO(icache) \
MACRO(icmp_flood) \
MACRO(idle_page) \
MACRO(inode_flags) \
diff --git a/stress-icache.c b/stress-icache.c
index bbff361..ed38bf7 100644
--- a/stress-icache.c
+++ b/stress-icache.c
@@ -161,14 +161,14 @@ static inline int icache_madvise(const stress_args_t *args, void *addr, size_t s
return 0;
}
-#if defined(HAVE_ALIGNED_64K)
-STRESS_ICACHE_FUNC(stress_icache_func_64K, SIZE_64K)
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
+STRESS_ICACHE_FUNC(stress_icache_func_64K, SIZE_4K)
#endif
STRESS_ICACHE_FUNC(stress_icache_func_16K, SIZE_16K)
STRESS_ICACHE_FUNC(stress_icache_func_4K, SIZE_4K)
-#if defined(HAVE_ALIGNED_64K)
-STRESS_ICACHE(stress_icache_64K, SIZE_64K, stress_icache_func_64K)
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
+STRESS_ICACHE(stress_icache_64K, SIZE_4K, stress_icache_func_64K)
#endif
STRESS_ICACHE(stress_icache_16K, SIZE_16K, stress_icache_func_16K)
STRESS_ICACHE(stress_icache_4K, SIZE_4K, stress_icache_func_4K)
@@ -193,13 +193,13 @@ static int stress_icache(const stress_args_t *args)
case SIZE_16K:
ret = stress_icache_16K(args);
break;
-#if defined(HAVE_ALIGNED_64K)
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
case SIZE_64K:
ret = stress_icache_64K(args);
break;
#endif
default:
-#if defined(HAVE_ALIGNED_64K)
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
pr_inf("%s: page size %zu is not %u or %u or %u, cannot test\n",
args->name, args->page_size,
SIZE_4K, SIZE_16K, SIZE_64K);
--
2.30.2

View File

@@ -33,7 +33,7 @@ processors as defined by sysconf(_SC_NPROCESSORS_ONLN)."
HOMEPAGE="https://kernel.ubuntu.com/~cking/stress-ng/"
COPYRIGHT="2013-2021 Colin Ian King"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/ColinIanKing/stress-ng/archive/V$portVersion.zip"
SOURCE_DIR="stress-ng-$portVersion"
CHECKSUM_SHA256="af08a8b3c434277d86eaaf7301c4dd1ff77c9e129291c754759fd86566cd49cc"