lkml.org 
[lkml]   [1999]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: HINT benchmark and Linux
Richard J. Farnsworth writes:
> To grossly simplify, this benchmark purports to measure performance
> a wide range of problem sizes. And sure enough, when run on FreeBSD
> the performance curve shows the classic ``3-step'' drop-off when the
> data size moves from cache to main memory to paging. The Linux
> graph is similar but with a much less clearly defined ``shape''
> and the small-problem peak performance is about 15% less that FreeBSD.
> (See http://www.cs.washington.edu/lab/sw/HINT/hintgraphs.html.)
>
> I don't plan on making a career of tracking down what is causing
> this behavior, but the most likely thing would seem to be ``cache
> trashing'' for whatever reason. So I thought I would ask the
> experts if any them knew off the top of their head what the likely
> culprits could be -- or actually _are_, for that matter.

If you're getting cache thrashing, then try the crude page colouring
patch I wrote. It's part of my MSR patch:
http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html

It adds an ioctl() to /proc/<pid>/mem to turn on page colouring. The
appended programme allows you to run another programme with page
colouring enabled.

Further, if you want to figure out what is actually happening, my MSR
patch includes a performance monitoring driver so you can measure
cache hits and misses.

Regards,

Richard....

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/proc_fs.h>

#define ERRSTRING strerror (errno)

void main (int argc, char **argv)
{
int fd;
int enable = 1;
/*static char usage[] = "colour command ...";*/

if ( ( fd = open ("/proc/self/mem", O_WRONLY, 0) ) < 0 )
{
fprintf (stderr, "Error opening: \"/proc/self/mem\"\t%s\n",
ERRSTRING);
exit (1);
}
if (ioctl (fd, PROC_PID_MEM_ENABLE_COLOURING, &enable) != 0)
{
fprintf (stderr, "Error ioctl()ing: \"/proc/self/mem\"\t%s\n",
ERRSTRING);
exit (1);
}
close (fd);
execvp (argv[1], argv + 1);
} /* End Function main */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.035 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site