On 4 May 2016 at 15:40, Bill Fischofer <[email protected]> wrote:
> > > On Wed, May 4, 2016 at 2:35 PM, Mike Holmes <[email protected]> > wrote: > >> >> >> On 4 May 2016 at 12:47, Bill Fischofer <[email protected]> wrote: >> >>> Use a default cache line size of 64 for otherwise unrecognized linux >>> platforms. This resolves bug >>> https://bugs.linaro.org/show_bug.cgi?id=2218 >>> >>> Reported-by: Matias Elo <[email protected]> >>> Signed-off-by: Bill Fischofer <[email protected]> >>> --- >>> platform/linux-generic/arch/linux/odp/api/cpu_arch.h | 10 ++++++++++ >>> 1 file changed, 10 insertions(+) >>> >>> diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h >>> b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h >>> index 1c79f87..29f8889 100644 >>> --- a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h >>> +++ b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h >>> @@ -11,6 +11,16 @@ >>> extern "C" { >>> #endif >>> >>> +/** @ingroup odp_compiler_optim >>> + * @{ >>> + */ >>> + >>> +#define ODP_CACHE_LINE_SIZE 64 >>> >> >> Is this a good number on a 16 bit linux system how about 32 ? >> > > We don't support 16-bit linux. > Yes we do, at least we have to assume so :) - it is called linux-generic it is based on any place linux can run, if some mad Eastern European drinking a gallon of Vodka makes linux run on a 3 and 1/2 bit CPU we currently support it by the default ARCH=linux Additionally nowhere can I find that we state we dont support 16 bit linux. > 32-bit is the minimum for ODP. > This needs to be prominently added to the docs, and then I can agree. > Also, for cache alignment overaligned is better than underaligned, so if > the actual cache line size is 32 then using 64-byte alignment does no harm > since a 64-byte aligned address is also 32-byte aligned. > This gets you a silent degradation in the amount of memory you use on a linux system that happens to be less than 64bits, and also silently an enforced under alignment on a 128 bit system, the very thing you wanted to avoid. I am being nit picky to really get it well defined, I think we assume too much that really ODP is run with the OS=linux, on a 64Bit CPU with posix threading. > > >> >> >>> + >>> +/** >>> + * @} >>> + */ >>> + >>> static inline void odp_cpu_pause(void) >>> { >>> } >>> -- >>> 2.5.0 >>> >>> _______________________________________________ >>> lng-odp mailing list >>> [email protected] >>> https://lists.linaro.org/mailman/listinfo/lng-odp >>> >> >> >> >> -- >> Mike Holmes >> Technical Manager - Linaro Networking Group >> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs >> "Work should be fun and collaborative, the rest follows" >> >> >> > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
