svn commit: r242402 - in head/sys: kern vm

Attilio Rao attilio at freebsd.org
Wed Oct 31 18:57:40 UTC 2012


On 10/31/12, Adrian Chadd <adrian at freebsd.org> wrote:
> On 31 October 2012 11:33, Attilio Rao <attilio at freebsd.org> wrote:
>
>>> 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.
>
> Right, but you didn't make it configurable for us embedded peeps who
> still care about memory usage.

How is this possible without breaking the module/kernel ABI?

>> 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.
>
> There's a few million more embedded MIPS boards out there with
> 16mb/32mb of RAM than target PCs for FreeBSD.
>
> Would you mind making the padding part configurable and just default
> it to "do the padding" ?
> That way for the atheros MIPS builds I can turn it off and save on the
> memory overhead.

This means that we will need to put a black cross on the compatibility
between modules and kernel very likely. Changable size locks based on
the options are a very bad idea and if they change the size based on
the availability of SMP or a main option like that (ie. differently
from debugging options) are even a worse idea.

Besides the mtx_padalign mutexes should be not be used often in
general, that's why I ask people to justify their introduction every
time.
And as last point, please consider that right now the locks converted
are the same that were before, so there is no loss for mips or
similar.

All that assuming you can actually prove a real performance loss even
in the new cases.

Attilio


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


More information about the svn-src-head mailing list