From: adam f <adam_fli@po...> - 2004-04-21 09:51:19
I trying to profile network code in linux. I am counting for cycles,
instructions and interruptions using MSR counters.
I read the mail by W.Cohen, part of which says: "[...]This is quite
possible with I/O when the processor is waiting for the device to
complete some action, e.g. a disk drive head seek or waiting for an
interrupt signalling that a network packet has arrived."
Does it mean that while copying data from kernel buffer to device memory CPU
BTW can someone please tell me what exactly happen between the time packet
is dev_copy_and_csum'ed and the time tx_interrupt is called?
During network packet receiving phase (starting from NIC packet reception
and ending on putting packet into backlog queue) i can see that cycles
(kernel mode) oscillate around some value ( 3000cycles +/-300) while
instructions count is almost _fixed_ (let say 500instructions and only few
points with 502instr.) and the interruptions count (read from MSR) varies
from 0 to 30.
Could you please explain to me what it means that instr. count is fixed
while there are interruprtions during _packet_reception_phase_. What it
Interruption notification in kernel (I mean increase of interruptions
counters) does not cost anything (and cycles count varies around some
And what it means, that while copying some data from kernel->user (during
packet forwarding) there is some increase in interruptions count (kernel
mode) but NONE in instructions count and in cycles count (kernel mode too).