unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e
       [not found] <E1QI6rh-0003ck-EO@vcs-noshell.in.savannah.gnu.org>
@ 2011-05-07 18:27 ` Ludovic Courtès
  2011-05-07 23:30   ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2011-05-07 18:27 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hello!

"Andy Wingo" <wingo@pobox.com> writes:

> commit a2a6c0e319b5c146c484cb1fe8ffc9b14b9a9876
> Author: Andy Wingo <wingo@pobox.com>
> Date:   Fri May 6 00:17:35 2011 +0200
>
>     avoid tls gets when handling interrupts in the vm
>     
>     * libguile/__scm.h (SCM_ASYNC_TICK_WITH_CODE): Redefine to take a
>       scm_i_thread* as well.  OK to do because it's within a
>       BUILDING_LIBGUILE block.
>     
>     * libguile/vm-engine.c (vm_engine): Cache the scm_i_thread* instead of
>       the dynstate, so we can use the thread for ticks.
>     
>     * libguile/vm-engine.h (VM_HANDLE_INTERRUPTS): Tick with the
>       scm_i_thread* local var, to avoid excessive tls calls.
>     
>     * libguile/vm-i-system.c: Fix dynstate users to use
>       current_thread->dynamic_state.

What effect does it have on performance?  Registers are scarce on x86...

Message <877hv9a5z5.fsf@gnu.org>
(aka. <http://thread.gmane.org/gmane.lisp.guile.devel/9444>) might be
relevant.

Thanks,
Ludo’.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e
  2011-05-07 18:27 ` [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e Ludovic Courtès
@ 2011-05-07 23:30   ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-05-07 23:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

On Sat 07 May 2011 20:27, ludo@gnu.org (Ludovic Courtès) writes:

>>     * libguile/vm-engine.c (vm_engine): Cache the scm_i_thread* instead of
>>       the dynstate, so we can use the thread for ticks.
>
> What effect does it have on performance?  Registers are scarce on x86...

I did this because there were several million __tls_getaddr calls when
compiling psyntax.scm, which presumably are more expensive than either a
cached memory ref or a register.  In any case it's not more local vars
than before...

But that's not your question.  Answer: I'm pretty sure it's an
improvement, but it would be good to see numbers :)

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-07 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1QI6rh-0003ck-EO@vcs-noshell.in.savannah.gnu.org>
2011-05-07 18:27 ` [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e Ludovic Courtès
2011-05-07 23:30   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).