Page MenuHomeFreeBSD

test: iterate both reader and writer threads starting at the actual pagesize
ClosedPublic

Authored by rscheff on Oct 11 2023, 7:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 7:34 AM
Unknown Object (File)
Thu, Apr 25, 5:31 AM
Unknown Object (File)
Thu, Apr 25, 5:31 AM
Unknown Object (File)
Thu, Apr 25, 5:19 AM
Unknown Object (File)
Mar 16 2024, 4:08 PM
Unknown Object (File)
Jan 27 2024, 9:28 AM
Unknown Object (File)
Jan 26 2024, 12:22 PM
Unknown Object (File)
Nov 10 2023, 12:55 AM
Subscribers

Details

Summary

The writer iterates from pagesize to 1M, while the reader iterates
from 4k to 1M - on systems with a pagesize other than 4k, the "jumbo"
test would likely fail because of this.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

In my opinion, any (broken) test scenario that can crash the kernel is a good stress test. :)

I applied your patch and still see the panic.

22:09 /usr/src/tools/test/stress2/misc $ git diff jumbo.sh
diff --git a/tools/test/stress2/misc/jumbo.sh b/tools/test/stress2/misc/jumbo.sh
index 8dcc5aa7aca33a..a2d09bafaa8268 100755
--- a/tools/test/stress2/misc/jumbo.sh
+++ b/tools/test/stress2/misc/jumbo.sh
@@ -131,7 +131,7 @@ reader(void) {
        if ((buf = malloc(MX)) == NULL)
                        err(1, "malloc(%d), %s:%d", MX, __FILE__, __LINE__);
        setproctitle("reader");
-       for (i = 4096; i < MX; i += 1024) {
+       for (i = sysconf(_SC_PAGESIZE); i < MX; i += 1024) {
                alarm(TIMEOUT);
                if ((n = recvfrom(msgsock, buf, i, MSG_WAITALL, NULL,
                    NULL)) < 0) {
22:09 /usr/src/tools/test/stress2/misc $ ``

The change looks good to me.
I'm always a bit hesitant to change a test scenario which has proven to trigger multiple panics, but this looks fine to me.

This revision is now accepted and ready to land.Oct 11 2023, 8:56 PM