[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] re-order struct domain fields
>>> On 19.01.15 at 17:25, <Ian.Campbell@xxxxxxxxxxxxx> wrote: > On Mon, 2015-01-19 at 15:42 +0000, Jan Beulich wrote: >> ... to reduce padding holes. >> >> I also wonder whether having independent spin locks side by side is >> really a good thing cache-line-bouncing-wise. > > AIUI the general wisdom is to put each spinlock next to the data it > protects (I suppose on the assumption that after acquiring the lock you > will next touch that data). > > Is the problem is that the domain_lock doesn't actually protect anything > in this struct since it is a more umbrella lock, so there is nothing to > put next to it? Kind of. The more relevant aspect of why I didn't move it right away was that two locks side by side are (on x86) efficient padding-wise. > You could move either it or the page lock below all the page counts > stuff. Yeah, that would apparently be best, albeit I'm not sure it would guarantee them to be on different cache lines in all cases. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |