linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2002-09-14 12:39 Paolo Ciarrocchi
  2002-09-14 12:53 ` System response benchmarks in performance patches Con Kolivas
  2002-09-14 17:05 ` your mail Rik van Riel
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Ciarrocchi @ 2002-09-14 12:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: conman

[...]
>http://kernel.kolivas.net under the FAQ. A final >reminder note: it won't work on
>2.5.x

Con, 
I think that only the _memload_ test is not
working with 2.5.*, am I wrong?

Paolo
-- 
Get your free email from www.linuxmail.org 


Powered by Outblaze

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

* Re: System response benchmarks in performance patches
  2002-09-14 12:39 Paolo Ciarrocchi
@ 2002-09-14 12:53 ` Con Kolivas
  2002-09-14 17:05 ` your mail Rik van Riel
  1 sibling, 0 replies; 3+ messages in thread
From: Con Kolivas @ 2002-09-14 12:53 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: linux-kernel

Quoting Paolo Ciarrocchi <ciarrocchi@linuxmail.org>:

> [...]
> >http://kernel.kolivas.net under the FAQ. A final >reminder note: it won't
> work on
> >2.5.x
> 
> Con, 
> I think that only the _memload_ test is not
> working with 2.5.*, am I wrong?

Correct. memload determines the amount of memory to allocate based on
/proc/meminfo which has changed in 2.5.x

Thanks for doing the 2.5.34 tests. They are promising results.

Con.

P.S. How does 2.4.19-ck7 compare ;-)

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

* Re: your mail
  2002-09-14 12:39 Paolo Ciarrocchi
  2002-09-14 12:53 ` System response benchmarks in performance patches Con Kolivas
@ 2002-09-14 17:05 ` Rik van Riel
  1 sibling, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2002-09-14 17:05 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: linux-kernel, conman

On Sat, 14 Sep 2002, Paolo Ciarrocchi wrote:

> I think that only the _memload_ test is not
> working with 2.5.*, am I wrong?

You're right, the memload test doesn't work with 2.5 but
needs the following patch...

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/

Spamtraps of the month:  september@surriel.com trac@trac.org


--- contest-0.1/mem_load.c.orig	2002-09-13 23:36:47.000000000 -0400
+++ contest-0.1/mem_load.c	2002-09-14 11:10:07.000000000 -0400
@@ -47,24 +47,25 @@
   switch (type) {

   case 0: /* RAM */
-    if ((position = strstr(buffer, "Mem:")) == (char *) NULL) {
-      fprintf (stderr, "Can't parse \"Mem:\" in /proc/meminfo\n");
+    if ((position = strstr(buffer, "MemTotal:")) == (char *) NULL) {
+      fprintf (stderr, "Can't parse \"MemTotal:\" in /proc/meminfo\n");
       exit (-1);
     }
-    sscanf (position, "Mem:  %ul", &size);
+    sscanf (position, "MemTotal:  %ul", &size);
     break;

   case 1:
-    if ((position = strstr(buffer, "Swap:")) == (char *) NULL) {
-      fprintf (stderr, "Can't parse \"Swap:\" in /proc/meminfo\n");
+    if ((position = strstr(buffer, "SwapTotal:")) == (char *) NULL) {
+      fprintf (stderr, "Can't parse \"SwapTotal:\" in /proc/meminfo\n");
       exit (-1);
     }
-    sscanf (position, "Swap: %ul", &size);
+    sscanf (position, "SwapTotal: %ul", &size);
     break;

   }

-  return (size / MB);
+  /* convert from kB to MB */
+  return (size / KB);

 }

--- contest-0.1/mem_load.h.orig	2002-09-14 11:09:28.000000000 -0400
+++ contest-0.1/mem_load.h	2002-09-14 11:09:42.000000000 -0400
@@ -24,6 +24,7 @@

 #define MAX_BUF_SIZE 1024          /* size of /proc/meminfo in bytes */
 #define MB (1024 * 1024)           /* 2^20 bytes */
+#define KB 1024
 #define MAX_MEM_IN_MB (1024 * 64)  /* 64 GB */

 /* Tuning parameter.  Increase if you are getting an 'unreasonable' load


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

end of thread, other threads:[~2002-09-14 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-14 12:39 Paolo Ciarrocchi
2002-09-14 12:53 ` System response benchmarks in performance patches Con Kolivas
2002-09-14 17:05 ` your mail Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).