Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #2550

setup the PMU to generate an interrupt on x number of LLC misses

From Emanuel Berg <embe8573@student.uu.se>
Newsgroups alt.os.linux, comp.os.linux.hardware
Subject setup the PMU to generate an interrupt on x number of LLC misses
Followup-To alt.os.linux
Date 2014-10-22 00:03 +0200
Organization Aioe.org NNTP Server
Message-ID <87y4s9ozc2.fsf@debian.uxu> (permalink)

Cross-posted to 2 groups.

Followups directed to: alt.os.linux

Show all headers | View raw


I have heard this is possible but not seen any
examples.

It doesn't matter if I have to change the kernel to
get it.

I have written a program [1] in C++ that uses polling,
but I was told that wasn't good enough so now I search
for a "preemptive" or interrupt-based solution.

Any help very much appreciated.

Here is a fragment of the C++ program:

    for (long long polls = 0, count = 0, old_count = -1;
         count < max_misses; polls++) {
      read(fd, &count, sizeof(count));
      if (count != old_count) {
        std::cout << "LLC misses after " << polls << " polls: "
                  << count << std::endl;
        old_count = count;
      }
      std::this_thread::sleep_for(std::chrono::milliseconds(rate));
    }

I don't know if I can use that or need a whole new
solution.

This is my CPU:

    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    2
    Socket(s):             1
    NUMA node(s):          1
    Vendor ID:             AuthenticAMD
    CPU family:            15
    Model:                 35
    Stepping:              2
    CPU MHz:               1000.000
    BogoMIPS:              1989.78
    L1d cache:             64K
    L1i cache:             64K
    L2 cache:              512K
    NUMA node0 CPU(s):     0,1

This is my Linux version:

    Linux debian 3.17.1 #6 SMP Sun Oct 19 15:32:18 CEST 2014 x86_64 GNU/Linux

[1] http://user.it.uu.se/~embe8573/llc/

-- 
underground experts united

Back to comp.os.linux.hardware | Previous | Next | Find similar | Unroll thread


Thread

setup the PMU to generate an interrupt on x number of LLC misses Emanuel Berg <embe8573@student.uu.se> - 2014-10-22 00:03 +0200

csiph-web