Originally posted by: degibson
Originally posted by: degibson
I don't think PAPI can just be loaded as a module -- it needs to instrument various parts of the kernel here and there.
Originally posted by: scootermaster
...I installed it as a loadable kernel module...
I stand corrected.
Originally posted by: scootermaster
PERFCTR INIT: rdtsc cost is 98.2 cycles (7020 total)
This seems quite high for rdtsc. Are you running in a virtualized environment?
Okay, I was being brief -- and stupid -- but I guess it's time for some more detail:
1). First off, let's not get confused between PAPI and perfctr. PAPI is just a software API that accesses hardware performance counters. Installing PAPI is a matter of (theoretically) "configure" and "make install". So we're not talking about PAPI here. I've installed it on an R10k before, and it's pretty straight forward (I hope. If i have trouble, I'll be right back here!)
2). perfctr is a kernel patch/module for Linux. It allows access to the performance counters. Why it's not part of the core kernel, I don't know (I actually read a thread about it; never realized there was so much politics involved in getting something into a kernel. But the whole debate is foolish. The world's biggest linux clusters use this shit. The military does. Good enough for me).
3). I installed it once as a loadable module (the install text says that it can, if you so desire, install "most" of it as a loadable kernel module, for whatever that's worth). Got the results you saw above. Some nice notes from dmesg, but nothing doing when I do "perfex -i" (the test to make sure perfctr and APIC is working correctly).
4). I tried it again (for another three hours. Ugh!) installing it, uh, not as a kernel module. Pretty much the same results.
Other notes
5). First hack: My machine type is defined as i686 (I'm pretty sure it's a single-core, hyperthreaded P4. Either it's a dual core machine, or hyperthreading does some weird and strange things in Linux because my IT people have a). installed some SMP kernels on Grub, and b). dmesg shows a lot of stuff about other processors). Anyway, I had to "setenv ARCH i386" to even get "make mrproper" to work. So that's hack #1
6). In the installation steps, after something like "make dep vmlinux modules" or something, and editing the grub.conf files -- I should/will post the actual install directions when I get a chance; it's notable that the directions are for lilo and I modified them for grub -- it says to make install. So the second hack is that when I do that, it tells me I need to make first. So I obediently follow along. (Mentioned only because it's not in the perfctr instructions).
7). This was all done with a kernel.org 2.6.18 kernel source. I'm in the process of trying it with an RPM of 2.6.18-1.2259 (or something, I don't have it in front of me) source provided by my IT people. I have that exact kernel installed in grub. (I left the kernel compiling and went home at midnight. I'll be back there Thursday)
8). Apparently the vmlinuz (what's with that name, anyway?) link in the /boot directory isn't/doesn't change based on which kernel I boot to in grub. When I first installed it,I had to manually delete it, delete all the patched kernel entries in /boot, and manually create a new link to a different kernel. Is that normal?
9). I just want this to work. =]
That's all I can think of for now.
Anyway, to answer your question, no, it's not a virtualized environment. Fedora Core, 2.6.18 (patched), on a P4 3.0 (I think) with a gig of ram.
I can't help but think there is some sort of problem with either the boot loader, or the fact that 99% of the directories I'm dealing with here are off the NFS. But I just don't see why I'd get those messages in dmesg and then the tests would fail (the system call that the patch installs don't exist/can't be found).
Help?