Skip to contentSkip to conversation

DISCUSSION Paolo Ciarrocchi 3 participants 3 messages Sep 14, 2002

lore
Share & tools
lore
#0 lore raw

[...]

Quoted 2 lines

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

Signature · 4 lines
Get your free email from www.linuxmail.org 


Powered by Outblaze
#1 lore raw

Re: System response benchmarks in performance patches

Quoting Paolo Ciarrocchi <[email protected]>:

Quoted 8 lines

[...]

Quoted 1 line

http://kernel.kolivas.net under the FAQ. A final >reminder note: it won't

work on

Quoted 1 line

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 ;-)

#2 lore raw

Re: your mail

In reply to Paolo Ciarrocchi
Quoted 2 lines · Paolo Ciarrocchi

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

Signature · 52 lines
Bravely reimplemented by the knights who say "NIH".

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

Spamtraps of the month:  [email protected] [email protected]


--- 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