Rebase to upstream V0.17.08
ARM: Don't declare inlined yield helper if yield is not available Resolves: RHEL-33304 Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
9d12e07792
commit
5a0cd88c21
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.swp
|
||||
/stress-ng-*.tar.xz
|
||||
/stress-ng-0.17.08.tar.gz
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 6a22f648bd3452c83c5f88ec530d496fefe5e9a0 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Mon, 21 Nov 2022 12:16:47 +0000
|
||||
Subject: [PATCH 1/3] stress-sysfs: check for zero sysfs entries after pruning
|
||||
the directory
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
---
|
||||
stress-sysfs.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/stress-sysfs.c b/stress-sysfs.c
|
||||
index 00fe9ba08100..24267d00ee5a 100644
|
||||
--- a/stress-sysfs.c
|
||||
+++ b/stress-sysfs.c
|
||||
@@ -634,14 +634,11 @@ static int stress_sysfs(const stress_args_t *args)
|
||||
}
|
||||
|
||||
n = scandir("/sys", &dlist, NULL, alphasort);
|
||||
- if (n <= 0) {
|
||||
- if (args->instance == 0)
|
||||
- pr_inf_skip("%s: no /sys entries found, skipping stressor\n", args->name);
|
||||
- stress_dirent_list_free(dlist, n);
|
||||
- (void)munmap((void *)ctxt, sizeof(*ctxt));
|
||||
- return EXIT_NO_RESOURCE;
|
||||
- }
|
||||
+ if (n <= 0)
|
||||
+ goto exit_no_sysfs_entries;
|
||||
n = stress_dirent_list_prune(dlist, n);
|
||||
+ if (n <= 0)
|
||||
+ goto exit_no_sysfs_entries;
|
||||
|
||||
os_release = 0;
|
||||
#if defined(HAVE_UNAME) && \
|
||||
@@ -806,10 +803,17 @@ finish:
|
||||
(void)close(ctxt->kmsgfd);
|
||||
(void)shim_pthread_spin_destroy(&lock);
|
||||
|
||||
+exit_free:
|
||||
stress_dirent_list_free(dlist, n);
|
||||
(void)munmap((void *)ctxt, sizeof(*ctxt));
|
||||
|
||||
return rc;
|
||||
+
|
||||
+exit_no_sysfs_entries:
|
||||
+ if (args->instance == 0)
|
||||
+ pr_inf_skip("%s: no /sys entries found, skipping stressor\n", args->name);
|
||||
+ rc = EXIT_NO_RESOURCE;
|
||||
+ goto exit_free;
|
||||
}
|
||||
|
||||
stressor_info_t stress_sysfs_info = {
|
||||
--
|
||||
2.38.1
|
||||
|
@ -1,37 +0,0 @@
|
||||
From f424f5b774b7cb0fd7939d28e68db6fa977baea1 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Mon, 21 Nov 2022 12:45:11 +0000
|
||||
Subject: [PATCH 2/3] stress-shm: skip stressor if /dev/shm is not mounted with
|
||||
tmpfs on linux
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
---
|
||||
stress-shm.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/stress-shm.c b/stress-shm.c
|
||||
index 91bcd961aeb1..4e6327ac97d4 100644
|
||||
--- a/stress-shm.c
|
||||
+++ b/stress-shm.c
|
||||
@@ -122,6 +122,18 @@ static int stress_shm_posix_child(
|
||||
const size_t page_size = args->page_size;
|
||||
struct sigaction sa;
|
||||
|
||||
+#if defined(__linux__)
|
||||
+ /*
|
||||
+ * /dev/shm should be mounted with tmpfs and
|
||||
+ * be writeable, if not shm_open will fail
|
||||
+ */
|
||||
+ if (access("/dev/shm", W_OK) < 0) {
|
||||
+ pr_inf("%s: cannot access /dev/shm for writes, errno=%d (%s) skipping stressor\n",
|
||||
+ args->name, errno, strerror(errno));
|
||||
+ return EXIT_NO_RESOURCE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
addrs = calloc(shm_posix_objects, sizeof(*addrs));
|
||||
if (!addrs) {
|
||||
pr_fail("%s: calloc on addrs failed, out of memory\n", args->name);
|
||||
--
|
||||
2.38.1
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 7681f2d05470b8c8850346bcf12e525f628941b3 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Mon, 21 Nov 2022 12:46:54 +0000
|
||||
Subject: [PATCH 3/3] stress-shm: move /dev/shm check to earlier in the setup
|
||||
phase
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
---
|
||||
stress-shm.c | 23 +++++++++++------------
|
||||
1 file changed, 11 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/stress-shm.c b/stress-shm.c
|
||||
index 4e6327ac97d4..a9c26498024e 100644
|
||||
--- a/stress-shm.c
|
||||
+++ b/stress-shm.c
|
||||
@@ -122,18 +122,6 @@ static int stress_shm_posix_child(
|
||||
const size_t page_size = args->page_size;
|
||||
struct sigaction sa;
|
||||
|
||||
-#if defined(__linux__)
|
||||
- /*
|
||||
- * /dev/shm should be mounted with tmpfs and
|
||||
- * be writeable, if not shm_open will fail
|
||||
- */
|
||||
- if (access("/dev/shm", W_OK) < 0) {
|
||||
- pr_inf("%s: cannot access /dev/shm for writes, errno=%d (%s) skipping stressor\n",
|
||||
- args->name, errno, strerror(errno));
|
||||
- return EXIT_NO_RESOURCE;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
addrs = calloc(shm_posix_objects, sizeof(*addrs));
|
||||
if (!addrs) {
|
||||
pr_fail("%s: calloc on addrs failed, out of memory\n", args->name);
|
||||
@@ -384,6 +372,17 @@ static int stress_shm(const stress_args_t *args)
|
||||
}
|
||||
orig_sz = sz = shm_posix_bytes & ~(page_size - 1);
|
||||
|
||||
+#if defined(__linux__)
|
||||
+ /*
|
||||
+ * /dev/shm should be mounted with tmpfs and
|
||||
+ * be writeable, if not shm_open will fail
|
||||
+ */
|
||||
+ if (access("/dev/shm", W_OK) < 0) {
|
||||
+ pr_inf("%s: cannot access /dev/shm for writes, errno=%d (%s) skipping stressor\n",
|
||||
+ args->name, errno, strerror(errno));
|
||||
+ return EXIT_NO_RESOURCE;
|
||||
+ }
|
||||
+#endif
|
||||
stress_set_proc_state(args->name, STRESS_STATE_RUN);
|
||||
|
||||
while (keep_stressing_flag() && retry) {
|
||||
--
|
||||
2.38.1
|
||||
|
33
core-asm-arm.h-declare-stress_asm_arm_yield-when-HAV.patch
Normal file
33
core-asm-arm.h-declare-stress_asm_arm_yield-when-HAV.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From cdfb0b0656b6fd371cf73333af54530e8de556e1 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Fri, 3 May 2024 10:46:01 +0100
|
||||
Subject: [PATCH] core-asm-arm.h: declare stress_asm_arm_yield when
|
||||
HAVE_ASM_ARM_YIELD is defined
|
||||
|
||||
Don't declare inlined yield helper if yield is not available
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
---
|
||||
core-asm-arm.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/core-asm-arm.h b/core-asm-arm.h
|
||||
index c275dc8b9bda..152e771811b8 100644
|
||||
--- a/core-asm-arm.h
|
||||
+++ b/core-asm-arm.h
|
||||
@@ -24,10 +24,12 @@
|
||||
|
||||
#if defined(STRESS_ARCH_ARM)
|
||||
|
||||
+#if defined(HAVE_ASM_ARM_YIELD)
|
||||
static inline void ALWAYS_INLINE stress_asm_arm_yield(void)
|
||||
{
|
||||
__asm__ __volatile__("yield;\n");
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* #if defined(STRESS_ARCH_ARM) */
|
||||
#endif
|
||||
--
|
||||
2.45.0
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (stress-ng-0.17.01.tar.xz) = 8ef88e835d38143087ed5056433f632926ce3bd65eb52edc1a398a6320d241e0231bd56255f7d995e4baec78265bd4b82360b0fdae6f4804f1e6e94909bb5356
|
||||
SHA512 (stress-ng-0.17.08.tar.gz) = 3df9bb507687839ad9978099bea33bc6923d324c6e6f66d441911670fcd8080e093fd02741ea8516626ae1ba357f42d2c50b6553cb75f48fd5f008e59d469777
|
||||
|
@ -1,11 +1,11 @@
|
||||
Name: stress-ng
|
||||
Version: 0.17.01
|
||||
Version: 0.17.08
|
||||
Release: 1%{?dist}
|
||||
Summary: Stress test a computer system in various ways
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://github.com/ColinIanKing/%{name}/tarball
|
||||
Source0: https://github.com/ColinIanKing/%{name}/tarball/%{name}-%{version}.tar.xz
|
||||
Source0: https://github.com/ColinIanKing/%{name}/tarball/%{name}-%{version}.tar.gz
|
||||
|
||||
# Work around for ld.gold error
|
||||
%undefine _package_note_flags
|
||||
@ -25,6 +25,7 @@ BuildRequires: zlib-devel
|
||||
BuildRequires: Judy-devel
|
||||
|
||||
# Patches
|
||||
Patch1: core-asm-arm.h-declare-stress_asm_arm_yield-when-HAV.patch
|
||||
|
||||
%description
|
||||
Stress test a computer system in various ways. It was designed to exercise
|
||||
@ -56,6 +57,11 @@ install -pm 644 bash-completion/%{name} \
|
||||
%{_datadir}/bash-completion/completions/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu May 23 2024 John Kacur <jkacur@redhat.com> - 0.17.08-1
|
||||
- Rebase to upstream V0.17.08
|
||||
- ARM: Don't declare inlined yield helper if yield is not available
|
||||
Resolves: RHEL-33304
|
||||
|
||||
* Thu Nov 16 2023 John Kacur <jkacur@redhat.com> - 0.17.01-1
|
||||
- Rebase to upstream V0.17.01
|
||||
Resolves: RHEL-7859
|
||||
|
Loading…
Reference in New Issue
Block a user