November 11, 2003

DevCon:Windows Driver Performance

Well, I can say with confidence that most driver developers CARE about performance in their code. How can I tell? Well, I think every friggin developer was in this session, squished like sardines all over the room. There wasn't a single seat, or space on the wall. Ok, so maybe it wasn't every developer, but this is a HUGE room (St. Helen's room in Building 33) and there is nowhere to sit. Thankfully it was the same room as the last presentation, so I am sitting pretty with power and a table.

This presentation is just awesome. The slide dec is 66 slides, which is huge for an hour of the session, but the presenter is managing by skipping slides to keep on topic.

There is SO much information to absorb here. Its hard to keep up. But every moment is chalk full of good information, supported by the slides which I have on hard copy to review later.

Some notes:


  • Syncro issue: lock data not code
  • Partition shared data by CPU or thread or natural data boundary
  • Improve behaviour of nested locks by using TryToAcquire
  • Limited spinning is better than blocking.
  • Interlock operations are least expensive
  • Keep code and data structures cache friendly
  • Context switching hurt cache locality!
  • A cache line is 32 bytes up to a P3, 64 bytes for P4.
  • A reference that crosses a cache line can pay a penalty of 10-20 cycles on recent systems!
  • In general, avoid threading in drivers.
  • Perfmon is an excellent starting point for evaluating basic system performance characterisitcs
  • Kernrate is a great profiler for tracking CPU utilization (part of resource kit)
  • Kernrate Viewer is a new tool from Microsoft that imports Kernrate data and plot and graph information for easier analysis.

Posted by SilverStr at November 11, 2003 04:21 PM | TrackBack