[RFC] 16K page size for kernel thread stack (patch)

Adrian Chadd adrian at freebsd.org
Wed Feb 19 01:58:49 UTC 2014


On 18 February 2014 12:47, Stacey Son <sson at freebsd.org> wrote:
>
> On Feb 18, 2014, at 2:25 PM, Adrian Chadd <adrian at freebsd.org> wrote:
>
>> Hi!
>>
>> On 18 February 2014 08:48, Stacey Son <sson at freebsd.org> wrote:
>>> Hi all:
>>>
>>> For mips64 the current size of 8K is not enough for the kernel thread stack.  For more information, see:
>>>
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=177876
>>>
>>> The following patch increases the size of the kernel thread stack to 16K by using a single 16K sized page.  See the patch at:
>>>
>>> http://people.freebsd.org/~sson/mips/kstack/kstack_large_page.diff
>>
>> Cool! Thanks for that.
>>
>> I'm glad to see the supported pagesize enumeration code going into the
>> kernel. What do you think about committing just that bit to begin
>> with?
>
> Yes, it probes the supported pages sizes (or PageMasks) by writing all one's to the PageMask register and then reading it back as suggested in the MIPS architecture manual.  If an implementation doesn't support all the different page sizes then those bits should not stick.   The various page sizes that are supported are reported the same time the MMU information is printed.
>
> I store the PageMask probe result in cpuinfo.  This way it is easy to check to the make sure the page size that is needed is supported.
>
> Yes, it would be easy to check this in as a separate patch.

Sweet. Well, let's do that so the next set of updates MIPS people do
with their boards will print out the available page sizes. It'll be
good to gather some info on that.


>> This looks like it touches shared code between mips32 and mips64. I'll
>> spin this up on a mips24k and mips74k (mips32r2) board soon to see if
>> it boots fine.
>
> Yes, I have only tested this on an ERL and Qemu.
>
> Do any of your boards support the ULRI?   (See my other patches.)  The ERL/Cavium Octeon CN5020 doesn't seem to support it.

I don't think the mips24k/mips74k cores I have support ULRI.


-a


More information about the freebsd-mips mailing list