Keir Fraser wrote: > On 08/10/2009 10:35, "Juergen Gross" wrote: > >>> After all, now I think about it, an 'arbitrary' index specified to >>> spinlock_init() is just making our lives more complicated if it will >>> basically *always* be a domid. And knowing at a higher level which locks are >>> actually per-domain could help your pretty printing? >> I thought in this direction, too. >> I would, however, try not to limit it to per domain locks, even if the first >> implementation would support only global locks and per domain locks. >> >> The perfc style declarations should only be necessary for the dynamically >> initialized locks, and those could live near the domain structure definition >> (or any other structure where they are needed). >> >> I think the statically defined locks can be handled via an own data section >> requiring no centrally defined index. > > Okay, well this all sounds an acceptable kind of direction. Worth spinning > another patch. Here it is. I managed to avoid the perfc-like stuff completely. Included are 2 global locks defined for profiling and 2 locks in the domain structure. I've added some comments in spinlock.h how to use the profiling in structures. Tested by compilation and boot of Dom0 with and without profiling enabled. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Technolgy Solutions e-mail: juergen.gross@ts.fujitsu.com Otto-Hahn-Ring 6 Internet: ts.fujitsu.com D-81739 Muenchen Company details: ts.fujitsu.com/imprint.html