Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 18:33:51 +0000
From:      Attilio Rao <attilio@freebsd.org>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r242402 - in head/sys: kern vm
Message-ID:  <CAJ-FndC7QwpNAjzQTumqTY6Sj_RszXPwc0pbHv2-pRGMqbw0ww@mail.gmail.com>
In-Reply-To: <1351707964.1120.97.camel@revolution.hippie.lan>
References:  <201210311807.q9VI7IcX000993@svn.freebsd.org> <CAJ-FndDRkBS57e9mzZoJWX5ugJ0KBGxhMSO50KB8Wm8MFudjCA@mail.gmail.com> <1351707964.1120.97.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 31, 2012 at 6:26 PM, Ian Lepore
<freebsd@damnhippie.dyndns.org> wrote:
> On Wed, 2012-10-31 at 18:10 +0000, Attilio Rao wrote:
>> On Wed, Oct 31, 2012 at 6:07 PM, Attilio Rao <attilio@freebsd.org> wrote:
>> > Author: attilio
>> > Date: Wed Oct 31 18:07:18 2012
>> > New Revision: 242402
>> > URL: http://svn.freebsd.org/changeset/base/242402
>> >
>> > Log:
>> >   Rework the known mutexes to benefit about staying on their own
>> >   cache line in order to avoid manual frobbing but using
>> >   struct mtx_padalign.
>>
>> Interested developers can now dig and look for other mutexes to
>> convert and just do it.
>> Please, however, try to enclose a description about the benchmark
>> which lead you believe the necessity to pad the mutex and possibly
>> some numbers, in particular when the lock belongs to structures or the
>> ABI itself.
>>
>> Next steps involve porting the same mtx(9) changes to rwlock(9) and
>> port pvh global pmap lock to rwlock_padalign.
>>
>> Thanks,
>> Attilio
>>
>>
>
> Doesn't this padding to cache line size only help x86 processors in an
> SMP kernel?  I was expecting to see some #ifdef SMP so that we don't pay
> a big price for no gain in small-memory ARM systems and such.  But maybe
> I'm misunderstanding the reason for the padding.

I didn't want to do this because this would be meaning that SMP option
may become a completely killer for modules/kernel ABI compatibility.

Also, if you look at the modified list of locks I don't think they
should be too much, I hardly believe ARM UP is going to hurt that much
from loosing some padding in tdq structures or callout.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndC7QwpNAjzQTumqTY6Sj_RszXPwc0pbHv2-pRGMqbw0ww>