help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [PATCH] embedded: Allow to disable the prefetching.


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [PATCH] embedded: Allow to disable the prefetching.
Date: Sat, 18 May 2013 12:27:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 17/05/2013 14:40, Holger Hans Peter Freyther ha scritto:
> Disabling the prefetching is a win on arm9 (arm926ejs, e.g. TI
> Davinci DM644x). This was benchmarked using the simple Bench.st
> benchmark.
> 
> 2013-04-28  Holger Hans Peter Freyther  <address@hidden>
> 
>       * libgst/gstpriv.h: Allow to disable the DO_PREFETCH.
> ---
>  libgst/ChangeLog   |    4 ++++
>  libgst/gstpriv.h   |    7 +++++--
>  libgst/md-config.h |    1 +
>  3 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/libgst/ChangeLog b/libgst/ChangeLog
> index 4a51cee..3812850 100644
> --- a/libgst/ChangeLog
> +++ b/libgst/ChangeLog
> @@ -1,5 +1,9 @@
>  2013-04-28  Holger Hans Peter Freyther  <address@hidden>
>  
> +     * libgst/gstpriv.h: Allow to disable the DO_PREFETCH.
> +
> +2013-04-28  Holger Hans Peter Freyther  <address@hidden>
> +
>       * libgst/cint.c: Bind link, fsync, sync for additional C level access.
>  
>  2013-04-25  Holger Hans Peter Freyther  <address@hidden>
> diff --git a/libgst/gstpriv.h b/libgst/gstpriv.h
> index 7127438..7ffe37b 100644
> --- a/libgst/gstpriv.h
> +++ b/libgst/gstpriv.h
> @@ -115,6 +115,7 @@
>  #endif
>  
>  #include "gst.h"
> +#include "md-config.h"
>  
>  /* Convenience macros to test the versions of GCC.  Note - they won't
>     work for GCC1, since the _MINOR macros were not defined then, but
> @@ -175,7 +176,9 @@
>  #define PREF_T2 8
>  #define PREF_NTA 12
>  
> -#if GNUC_PREREQ (3, 1)
> +/* the prefetch is a loss on on a ARM9 (TI Davinci), hack it out */
> +#if !defined(DISABLE_PREFETCH) && GNUC_PREREQ (3, 1)
> +#warning "ENABLE PREFETCH"
>  #define DO_PREFETCH(x, distance, k) \
>    __builtin_prefetch (((char *) (x)) \
>                     + (((k) & PREF_BACKWARDS ? -(distance) : (distance)) \
> @@ -183,6 +186,7 @@
>                     (k) & PREF_WRITE, \
>                     3 - (k) / (PREF_NTA / 3))
>  #else
> +#warning "DISABLE PREFETCH"

Remove the warnings and it's ok.

Paolo

>  #define DO_PREFETCH(x, distance, kind) ((void)(x))
>  #endif
>  
> @@ -556,7 +560,6 @@ extern OOP _gst_nil_oop
>  #include "socketx.h"
>  #include "strspell.h"
>  #include "alloc.h"
> -#include "md-config.h"
>  #include "avltrees.h"
>  #include "rbtrees.h"
>  
> diff --git a/libgst/md-config.h b/libgst/md-config.h
> index 862fdfd..b8ba5bf 100644
> --- a/libgst/md-config.h
> +++ b/libgst/md-config.h
> @@ -74,6 +74,7 @@
>  # define __DECL_REG3 __asm("r6")
>  # define BRANCH_REGISTER(name) register void *name __asm("r7")
>  # define L1_CACHE_SHIFT 4
> +# define DISABLE_PREFETCH
>  #endif
>  
>  #if !defined(__DECL_REG1) && defined(__alpha__)
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]