>> However, I think what is more interesting is the layout of the >> structure, i.e., >> the relative position of the fields. Are they positioned such that hot >> fields >> are separated from cold fields to minimize the number of cachelines that >> need to be loaded into the cache for the most common operations? > > Hmmm, that does bring up an interesting use of perfmon. On ia64 perfmon > could be > set up to do sampling on memory references (or cache misses). Match the > samples > up with the task_struct fields would give developers some insight into > problems > with the task_struct layout. This would give the kernel developers a > vested > interest in perfmon support being incorporated into the kernel. > > Jesse Beu, a ECE student at NCSU has developed some techniques to collect > memory > reference information using the PEBS hardware on the P4. The current > implementation of the software only works on one userspace thread. Maybe > that > could be extended to work for kernel space. Jesse should be able to fill > in the > details on how this was implemented. Jesse, is there some way that your > master's > thesis can be made available?
Here is a link to my master's thesis: http://tinyurl.com/l37kc Currently it can map P4 cache miss samples to addresses and those addresses to the corresponding malloc reference (if it missed in a dynamic object). When this is detected, the offset into the malloc reference is provided in addition to the miss address. As a result, if the programmer knows the layout of the objects within the malloc block, then he or she can deduce what field within the object caused the miss. Providing direct field names rather than offsets, however, is somewhat difficult to implement since type information is not available (at least not presently). Further, large blocks of memory can be partitioned internally by the programmer, adding more challenges. I am in the process of cleaning the code so it is more effcient, readable, etc., inorder to provide it to the open source community soon. We are also looking into adding additional features to make it an all-around more useful tool, but will probably release an initial version. Hopefully my course-work doesn't interfere with this too process much :) - Jesse _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
