From owner-svn-src-user@freebsd.org Sat Oct 10 08:02:24 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 504AE440181 for ; Sat, 10 Oct 2020 08:02:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7cqN1WJZz4RDY; Sat, 10 Oct 2020 08:02:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18B1C27997; Sat, 10 Oct 2020 08:02:24 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09A82N1c078397; Sat, 10 Oct 2020 08:02:23 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09A82Nnp078394; Sat, 10 Oct 2020 08:02:23 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202010100802.09A82Nnp078394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 10 Oct 2020 08:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r366601 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 366601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 08:02:24 -0000 Author: pho Date: Sat Oct 10 08:02:23 2020 New Revision: 366601 URL: https://svnweb.freebsd.org/changeset/base/366601 Log: Handle sysctl name change from 'vm.max_wired' to 'vm.max_user_wired'. Handle sysent.h changes. Modified: user/pho/stress2/misc/contigmalloc.sh user/pho/stress2/misc/contigmalloc2.sh user/pho/stress2/misc/contigmalloc3.sh Modified: user/pho/stress2/misc/contigmalloc.sh ============================================================================== --- user/pho/stress2/misc/contigmalloc.sh Sat Oct 10 07:20:59 2020 (r366600) +++ user/pho/stress2/misc/contigmalloc.sh Sat Oct 10 08:02:23 2020 (r366601) @@ -92,7 +92,7 @@ test(int argc, char *argv[]) ps = getpagesize(); s = 0; n = arc4random() % N + 1; - mw = mw / 100 * 10 * ps; /* Use 10% of vm.max_wired */ + mw = mw / 100 * 10 * ps; /* Use 10% of vm.max_user_wired */ mw = min(mw, CAP); for (i = 0; i < n; i++) { size[i] = round_page((arc4random() % MAXBUF) + 1); @@ -102,6 +102,7 @@ test(int argc, char *argv[]) if (res == -1) { warn("contigmalloc(%lu pages) failed at loop %d", size[i] / ps, i); + usleep(200000); } else { #if defined(TEST) fprintf(stderr, "contigmalloc(%lu pages)\n", @@ -154,7 +155,7 @@ make || exit 1 kldload $dir/cmalloc.ko || exit 1 cd $odir -mw=`sysctl -n vm.max_wired` || exit 1 +mw=`sysctl -n vm.max_user_wired` || exit 1 /tmp/ctest `sysctl -n debug.cmalloc_offset` $mw 2>&1 | tail -5 kldunload $dir/cmalloc.ko rm -rf $dir /tmp/ctest @@ -219,8 +220,8 @@ cmalloc(struct thread *td, struct cmalloc_args *uap) * The sysent for the new syscall */ static struct sysent cmalloc_sysent = { - 3, /* sy_narg */ - (sy_call_t *) cmalloc /* sy_call */ + .sy_narg = 3, /* sy_narg */ + .sy_call = (sy_call_t *) cmalloc /* sy_call */ }; /* Modified: user/pho/stress2/misc/contigmalloc2.sh ============================================================================== --- user/pho/stress2/misc/contigmalloc2.sh Sat Oct 10 07:20:59 2020 (r366600) +++ user/pho/stress2/misc/contigmalloc2.sh Sat Oct 10 08:02:23 2020 (r366601) @@ -75,7 +75,7 @@ test(int argc, char *argv[]) errx(1, "Usage: %s ", argv[0]); ps = getpagesize(); - size = mw / 100 * 80 * ps; /* Use 80% of vm.max_wired */ + size = mw / 100 * 80 * ps; /* Use 80% of vm.max_user_wired */ while (size > 0) { res = syscall(no, TALLOC, &p, &size); if (res == -1) { @@ -122,8 +122,8 @@ make depend all || exit 1 kldload $dir/cmalloc2.ko || exit 1 cd $odir -mw=$((`sysctl -n vm.max_wired` - `sysctl -n vm.stats.vm.v_wire_count`)) || - exit 1 +mw=$((`sysctl -n vm.max_user_wired` - \ + `sysctl -n vm.stats.vm.v_user_wire_count`)) || exit 1 /tmp/ctest2 `sysctl -n debug.cmalloc_offset` $mw #2>&1 | tail -5 kldunload $dir/cmalloc2.ko rm -rf $dir /tmp/ctest2 @@ -188,8 +188,8 @@ cmalloc(struct thread *td, struct cmalloc_args *uap) * The sysent for the new syscall */ static struct sysent cmalloc_sysent = { - 3, /* sy_narg */ - (sy_call_t *) cmalloc /* sy_call */ + .sy_narg = 3, /* sy_narg */ + .sy_call = (sy_call_t *) cmalloc /* sy_call */ }; /* Modified: user/pho/stress2/misc/contigmalloc3.sh ============================================================================== --- user/pho/stress2/misc/contigmalloc3.sh Sat Oct 10 07:20:59 2020 (r366600) +++ user/pho/stress2/misc/contigmalloc3.sh Sat Oct 10 08:02:23 2020 (r366601) @@ -76,7 +76,7 @@ test(int argc, char *argv[]) ps = getpagesize(); if (mw < MAXBUF / ps) { - fprintf(stderr, "max_wired too small for this test\n"); + fprintf(stderr, "max_user_wired too small for this test\n"); exit (0); } i = 0; @@ -125,7 +125,7 @@ make || exit 1 kldload $dir/cmalloc.ko || exit 1 cd $odir -mw=`sysctl -n vm.max_wired` || exit 1 +mw=`sysctl -n vm.max_user_wired` || exit 1 /tmp/ctest `sysctl -n debug.cmalloc_offset` $mw 2>&1 | tail -5 kldunload $dir/cmalloc.ko rm -rf $dir /tmp/ctest @@ -190,8 +190,8 @@ cmalloc(struct thread *td, struct cmalloc_args *uap) * The sysent for the new syscall */ static struct sysent cmalloc_sysent = { - 3, /* sy_narg */ - (sy_call_t *) cmalloc /* sy_call */ + .sy_narg = 3, /* sy_narg */ + .sy_call = (sy_call_t *) cmalloc /* sy_call */ }; /*