CPU underload

Warner Losh imp at bsdimp.com
Tue Nov 10 03:09:35 UTC 2015


> On Nov 9, 2015, at 10:46 AM, Ian Lepore <ian at FreeBSD.org> wrote:
> 
> On Tue, 2015-11-10 at 00:42 +0700, Eugene Grosbein wrote:
>> On 10.11.2015 00:39, Ian Lepore wrote:
>>> On Sun, 2015-11-08 at 11:23 -0800, Adrian Chadd wrote:
>>>> ok, what's the l1 cache size reported at boot up?
>>>> 
>>>> I think I may just bump them all to 64.
>>> 
>>> 64 is not some kind of magic panacea.  The value needs to be set to
>>> the
>>> cache line size for the runtime platform.  If the right value is
>>> 32,
>>> then setting it to 64 will just waste memory.

If we ever have a universal kernel, 64 could run on either 32 or
64 byte cache lines. Since we don’t, this is largely correct. It was
mostly a quick and easy to test suggestion, it doesn’t matter since:

>>>> L1 d-cache: 4 ways of 256 sets, 32 bytes per line

>> Is it for instruction cache or for data cache?
> 
> Only the data cache size matters for USB_HOST_ALIGN.

Since we’re flushing the data cache, and we don’t want the
device visible part of the USB buffers to share a cache line
with other data for the host to use about the device. Making
it too big doesn’t help, and costs memory. Making it too small
is fatal: usb simply won’t work.

Why we don’t have a panic when the cache line size is larger
than usb_host_align, and a warning when it is smaller is
beyond me...

Warner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20151109/1f2d32a5/attachment.bin>


More information about the freebsd-mips mailing list