LINUX CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>

7-DAY TOP DOWNLOAD

#
Program
BackTrack 3.0 / 4.0
Pre-Final

5,487
Ubuntu 9.10
4,487
VLC 1.0.3
3,388
Wine 1.0.1 / 1.1.32
2,824
Yahoo Messenger
1.0.4

2,483
Adobe Flash Player
for Linux 10.0.32.18

2,320
Thunderbird PST
Import plugin 1.2

2,290
Mandriva Linux
2010.0

1,992
Super Grub Disk
0.9799

1,577
Yellow Dog Linux 6.2
1,441

WEEK'S BEST

  • Ubuntu 9.10
  • Ubuntu Netbook Rem...
  • Pidgin 2.6.3
  • Wine 1.0.1 / 1.1.32
  • Linux Kernel 2.6.3...
  • Mozilla Firefox 3....
  • Fedora 11
  • OpenOffice.org 3.1.1
  • Firestarter 1.0.3
  • The Gimp 2.6.7 / 2...
  • FileZilla 3.2.8.1 ...
  • Transmission 1.76
  • Super Grub Disk 0....
  • Gufw 9.04.2
  • Skype 2.0.072 / 2....
  • openSUSE Linux 11....
  • Opera 10.01 / 10.1...
  • Adobe Flash Player...
  • wine-doors 0.1.3
  • Google Gadgets 0.1...
  • Home / Linux / System / Operating Systems / Kernels

    The LatSched Kernel Patch 2.5.0-0.3 / 2.5.1-pre11-0.5

    Download button

    No screenshots available
    Downloads: 309  Add to download basket  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.9/5)
    14 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    LatSched Team | More programs
    GPL / FREE
    April 8th, 2008, 10:40 GMT
    ROOT / System / Operating Systems / Kernels

     Read user reviews (0)  Add a review  Refer to a friend  Subscribe

     

    The LatSched Kernel Patch description

     

    The LatSched Kernel Patch is a kernel patch that enables a fine grained scheduler timing measurement.

    The LatSched Kernel Patch is a kernel patch that enables a fine grained scheduler timing measurement by using the kernel function get_cycles() that, on x86 cpu families, uses the rdtsc instruction to fetch the CPU cycle counter. A new character device /dev/latsched (MAJOR = 10 - MINOR = 117) has been introduced to control the behaviour and to fetch data from the kernel scheduler measure code. Other then measuring the scheduler latency this patch can be used to study process scheduling and migration between CPUs.

    To use the patch a new kernel must be built (with the patch applied) and the new character device /dev/latsched must be created with :

    # mknod /dev/latsched c 10 117

    The code that will make use of the LatSched patch must open the device with :

    if ((lsfd = open("/dev/latsched", O_RDWR)) == -1) {
    ...
    }

    The next step is to set the size of the sample ( circular ) buffer with :

    if ((res = ioctl(lsfd, LS_SAMPLES, samples))) {
    ...
    }

    Then the code will have to instruct to sampler to start collecting scheduler timings with :

    if ((res = ioctl(lsfd, LS_START, 0))) {
    ...
    }

    To stop the sampling process a new ioctl() call is necessary :

    if ((res = ioctl(lsfd, LS_STOP, 0))) {
    ...
    }

    At this point collected data is held inside the scheduler data buffers and must be fetched with something like this :

    int cpu, ncpus, ii;
    struct lsctl_getdata lsgd;

    ncpus = sysconf(_SC_NPROCESSORS_CONF);

    memset(&lsgd, 0, sizeof(lsgd));
    lsgd.size = samples;
    lsgd.data = (struct latsched_sample *) malloc(samples * sizeof(struct latsched_sample));

    for (cpu = 0; cpu < ncpus; cpu++) {
    lsgd.cpu = cpu;
    lsgd.size = samples;

    if ((res = ioctl(lsfd, LS_FETCH, &lsgd))) {
    ...
    }

    for (ii = 0; ii < lsgd.rsize; ii++) {
    ...
    }
    }

      


    TAGS:

    kernel patch | fine grained scheduler | linux kernel | linux | kernel | fine grained



    HTML code for linking to this page:


    Go to top

    Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM