From 80347fa1e29c7b879cc94e7134050aced0dcdb94 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 31 Oct 2005 17:09:45 +0000 Subject: 4.1.0nb1: Interix has no sync(2). Use fsync(2) there instead. While there, use fsync(2) on all hosts. Without this, the fstime benchmark will be disproportionately biased toward OS's and hardware that buffer larger amounts of data in memory before [background] syncing. --- benchmarks/bytebench/Makefile | 5 ++-- benchmarks/bytebench/distinfo | 3 ++- benchmarks/bytebench/patches/patch-ag | 50 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 benchmarks/bytebench/patches/patch-ag (limited to 'benchmarks/bytebench') diff --git a/benchmarks/bytebench/Makefile b/benchmarks/bytebench/Makefile index cebbd9e3844..0b54d97eb37 100644 --- a/benchmarks/bytebench/Makefile +++ b/benchmarks/bytebench/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.15 2004/07/30 15:50:37 minskim Exp $ +# $NetBSD: Makefile,v 1.16 2005/10/31 17:09:45 tv Exp $ DISTNAME= unixbench-4.1.0 -PKGNAME= bytebench-4.1.0 +PKGNAME= ${DISTNAME:S/unix/byte/} +PKGREVISION= 1 CATEGORIES= benchmarks MASTER_SITES= http://www.tux.org/pub/tux/benchmarks/System/unixbench/ EXTRACT_SUFX= .tgz diff --git a/benchmarks/bytebench/distinfo b/benchmarks/bytebench/distinfo index 20f1717e19c..b7f712ebbc0 100644 --- a/benchmarks/bytebench/distinfo +++ b/benchmarks/bytebench/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2005/10/13 03:31:06 ben Exp $ +$NetBSD: distinfo,v 1.9 2005/10/31 17:09:45 tv Exp $ SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248 RMD160 (unixbench-4.1.0.tgz) = 182e8a35574df0cd7984662bf99d47a7e24e7e03 @@ -9,3 +9,4 @@ SHA1 (patch-ac) = ebfb09da84c96f8c6f48293c65a74dcf8a43cff5 SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41 SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1 SHA1 (patch-af) = 725a82ecb5f15ec47dda39d53a16027a0e4a7efd +SHA1 (patch-ag) = 03916e56921f05ebfde2cb3c9944d528117c11c6 diff --git a/benchmarks/bytebench/patches/patch-ag b/benchmarks/bytebench/patches/patch-ag new file mode 100644 index 00000000000..fddceffb51e --- /dev/null +++ b/benchmarks/bytebench/patches/patch-ag @@ -0,0 +1,50 @@ +$NetBSD: patch-ag,v 1.1 2005/10/31 17:09:45 tv Exp $ + +--- src/fstime.c.orig 1999-07-28 17:47:02.000000000 -0400 ++++ src/fstime.c +@@ -151,11 +151,13 @@ int w_test(void) + long f_blocks; + extern int sigalarm; + ++#ifndef __INTERIX + /* Sync and let it settle */ + sync(); + sleep(2); + sync(); + sleep(1); ++#endif + + signal(SIGALRM,stop_count); + sigalarm = 0; /* reset alarm flag */ +@@ -176,6 +178,8 @@ int w_test(void) + lseek(f, 0L, 0); /* rewind */ + } + ++ fsync(f); ++ + /* stop clock */ + fprintf(stderr, "%d second sample\n", seconds); + write_score = counted/((long)seconds * COUNTPERK); +@@ -194,11 +198,13 @@ int r_test(void) + extern int sigalarm; + extern int errno; + ++#ifndef __INTERIX + /* Sync and let it settle */ + sync(); + sleep(2 + seconds/4); + sync(); + sleep(1 + seconds/4); ++#endif + + /* rewind */ + errno = 0; +@@ -229,6 +235,8 @@ int r_test(void) + counted += COUNTPERBUF; + } + ++ fsync(f); ++ + /* stop clock */ + fprintf(stderr, "%d second sample\n", seconds); + read_score = counted / ((long)seconds * COUNTPERK); -- cgit v1.2.3