public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* VM: qsbench
@ 2001-10-31 12:12 Lorenzo Allegrucci
  2001-10-31 12:23 ` Jeff Garzik
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Lorenzo Allegrucci @ 2001-10-31 12:12 UTC (permalink / raw)
  To: linux-kernel


Three runs for each kernel, kswapd CPU time appended.

Linux-2.4.13-ac4:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.800u 3.470s 3:04.15 40.3%    0+0k 0+0io 13916pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.530u 3.930s 3:13.90 38.9%    0+0k 0+0io 14101pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.260u 3.640s 3:03.54 40.8%    0+0k 0+0io 13047pf+0w
0:08 kswapd

Linux-2.4.13:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.260u 2.150s 2:20.68 52.1%    0+0k 0+0io 20173pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.020u 2.050s 2:18.78 52.6%    0+0k 0+0io 20353pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.810u 2.080s 2:19.50 52.2%    0+0k 0+0io 20413pf+0w
0:06 kswapd

Linux-2.4.14-pre3:
N/A, this kernel cannot run qsbench. Livelock.

Linux-2.4.14-pre4:
Not tested.

Linux-2.4.14-pre5:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.340u 3.450s 2:13.62 55.2%    0+0k 0+0io 16829pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.590u 2.940s 2:15.48 54.2%    0+0k 0+0io 17182pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.140u 3.480s 2:14.66 54.6%    0+0k 0+0io 17122pf+0w
0:01 kswapd

kswapd CPU time is a record ;)


Linux-2.4.14-pre6:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
Out of Memory: Killed process 224 (qsbench).
69.890u 3.430s 2:12.48 55.3%    0+0k 0+0io 16374pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
Out of Memory: Killed process 226 (qsbench).
69.550u 2.990s 2:11.31 55.2%    0+0k 0+0io 15374pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
Out of Memory: Killed process 228 (qsbench).
69.480u 3.100s 2:13.33 54.4%    0+0k 0+0io 15950pf+0w
0:01 kswapd

This is interesting, -pre6 killed qsbench _just_ before qsbench exited.
Unreliable results.

Linux-2.4.14-pre3aa1:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
72.180u 2.200s 2:19.59 53.2%    0+0k 0+0io 19568pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.510u 2.230s 2:18.74 53.1%    0+0k 0+0io 19585pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.500u 2.510s 2:19.29 53.1%    0+0k 0+0io 19606pf+0w
0:04 kswapd

Linux-2.4.14-pre3aa2:
Not tested.

Linux-2.4.14-pre3aa3:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.790u 2.280s 2:17.57 53.8%    0+0k 0+0io 19138pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.190u 2.040s 2:16.95 53.4%    0+0k 0+0io 19306pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
72.000u 2.120s 2:16.80 54.1%    0+0k 0+0io 19231pf+0w
0:03 kswapd

Linux-2.4.14-pre3aa4:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.270u 2.210s 2:16.43 53.8%    0+0k 0+0io 19067pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.110u 2.180s 2:16.52 53.6%    0+0k 0+0io 19095pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.320u 2.290s 2:16.32 53.9%    0+0k 0+0io 19162pf+0w
0:03 kswapd

Linux-2.4.14-pre5aa1:
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
70.580u 2.430s 2:16.36 53.5%    0+0k 0+0io 19024pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.070u 2.180s 2:15.97 53.8%    0+0k 0+0io 19110pf+0w
lenstra:~/src/qsort> time ./qsbench -n 90000000 -p 1 -s 140175100
71.280u 2.160s 2:16.61 53.7%    0+0k 0+0io 19185pf+0w
0:03 kswapd



-- 
Lorenzo

^ permalink raw reply	[flat|nested] 23+ messages in thread
[parent not found: <Pine.LNX.3.96.1011031133645.448B-100000@gollum.norang.ca>]
[parent not found: <200111012108.WAA28044@webserver.ithnet.com>]
* Re: new OOM heuristic failure  (was: Re: VM: qsbench)
@ 2001-11-02  2:37 Ed Tomlinson
  2001-11-02  3:01 ` Stephan von Krawczynski
  0 siblings, 1 reply; 23+ messages in thread
From: Ed Tomlinson @ 2001-11-02  2:37 UTC (permalink / raw)
  To: linux-kernel

Hi,

shrink_caches can end up lying.  shrink_dcache_memory and friends do not tell 
shrink_caches how many pages they free so nr_pages can be bogus...  Is it worth 
fixing?  The simpliest, harmlessly racey and not too pretty, code follows.  It 
would also not be hard to change the shrink_ calls to return the number of pages 
shrunk, but this would hit more code...

Comments?

Ed Tomlinson

--- linux/mm/vmscan.c.orig	Wed Oct 31 14:11:33 2001
+++ linux/mm/vmscan.c	Wed Oct 31 14:51:58 2001
@@ -552,6 +552,7 @@
 static int shrink_caches(zone_t * classzone, int priority, unsigned int gfp_mask, int nr_pages)
 {
 	int chunk_size = nr_pages;
+	int nr_shrunk;
 	unsigned long ratio;
 
 	nr_pages -= kmem_cache_reap(gfp_mask);
@@ -567,11 +568,21 @@
 	if (nr_pages <= 0)
 		return 0;
 
+	nr_shrunk = nr_free_pages;
+
 	shrink_dcache_memory(priority, gfp_mask);
 	shrink_icache_memory(priority, gfp_mask);
 #ifdef CONFIG_QUOTA
 	shrink_dqcache_memory(DEF_PRIORITY, gfp_mask);
 #endif
+
+	/* racey - calculate how many pages we got from shrinks */
+	nr_shrunk = nr_free_pages - nr_shrunk; 
+	if (nr_shrunk > 0) {
+		nr_pages -= nr_shrunk;
+		if (nr_pages <= 0)
+			return 0;
+	}
 
 	return nr_pages;
 }

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2001-11-02 17:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-31 12:12 VM: qsbench Lorenzo Allegrucci
2001-10-31 12:23 ` Jeff Garzik
2001-10-31 15:00 ` new OOM heuristic failure (was: Re: VM: qsbench) Rik van Riel
2001-10-31 15:52   ` Linus Torvalds
2001-10-31 16:04     ` Rik van Riel
2001-10-31 17:42       ` Stephan von Krawczynski
2001-10-31 18:22         ` Linus Torvalds
2001-10-31 17:55   ` Lorenzo Allegrucci
2001-10-31 18:06     ` Linus Torvalds
2001-10-31 21:31     ` Lorenzo Allegrucci
2001-11-02 13:00     ` Stephan von Krawczynski
2001-11-02 17:36     ` Lorenzo Allegrucci
2001-10-31 17:55 ` VM: qsbench Lorenzo Allegrucci
     [not found] <Pine.LNX.3.96.1011031133645.448B-100000@gollum.norang.ca>
2001-10-31 19:46 ` new OOM heuristic failure (was: Re: VM: qsbench) Linus Torvalds
     [not found] <200111012108.WAA28044@webserver.ithnet.com>
     [not found] ` <3.0.6.32.20011101214957.01feaa70@pop.tiscalinet.it>
2001-11-01 21:59   ` Lorenzo Allegrucci
2001-11-01 23:35     ` Stephan von Krawczynski
2001-11-02  0:37       ` Linus Torvalds
2001-11-02  2:17         ` Stephan von Krawczynski
2001-11-02  2:21           ` Linus Torvalds
2001-11-02  2:30         ` Stephan von Krawczynski
2001-11-02  2:55           ` Stephan von Krawczynski
  -- strict thread matches above, loose matches on Subject: below --
2001-11-02  2:37 Ed Tomlinson
2001-11-02  3:01 ` Stephan von Krawczynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox