Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Nov 2012 10:28:49 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@pdx.rh.CN85.ChatUSA.com>
To:        Juli Mallett <juli@clockworksquid.com>
Cc:        "freebsd-mips@FreeBSD.org" <freebsd-mips@freebsd.org>
Subject:   Re: CACHE_LINE_SIZE macro.
Message-ID:  <201211041828.qA4ISomC076058@pdx.rh.CN85.ChatUSA.com>
In-Reply-To: <CACVs6=_BrwJ19CPj7OqKvV8boHfujVWqn96u3VPUmZ040JpAeQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The size of, geometry of, or even the existance of a cache should never 
appear in any ABI other than an ABI to query such data.

There should also never be a compile time constant of a machine dependent
value like this, it should be determined at boot/config time.

If at all possible the use of this information should be well contained
to a minimal set of code, as it SHALL change over time.  Even if
no MIPS CPU exists today with a 256 byte line, dont mean I won't decide
to build one tomarrow.  I might also decide to build one with a 2 byte line :-)

What ABI is exposing anything about cache parameters or may be come dependent
on such information?

> Fellow FreeBSD/MIPSists,
> 
> CACHE_LINE_SIZE is being used increasingly-much in ways which may have ABI
> implications, etc.  It is currentyl 2^6, whereas at least the Cavium Octeon
> has cache lines that are actually 2^7 bytes in size.  It would be nice to
> expose the correct value to reduce false line sharing, etc., but making it
> dependent on the CPU type raises ABI issues, as well as questions about how
> to reliably get the right value to userland.  It seems to me that
> increasing it to 2^7 is the most viable approach, but I can imagine there
> might be some concerns about that, so I wanted to run it past this list
> first.  Questions, comments, concerns?  Are there MIPS CPUs with 2^8-byte
> or larger cache lines that we support or will support or which are likely
> coming over the horizon?
> 
> Thanks,
> Juli.
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"
> 

-- 
Rod Grimes                                                 freebsd@freebsd.org



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