From: Evgeny Voevodin <e.voevodin@samsung.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, blauwirbel@gmail.com,
kyungmin.park@samsung.com, edgar.iglesias@gmail.com,
aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx
Date: Wed, 24 Oct 2012 08:07:44 +0400 [thread overview]
Message-ID: <50876990.2010209@samsung.com> (raw)
In-Reply-To: <508709B7.7090503@twiddle.net>
On 10/24/2012 01:18 AM, Richard Henderson wrote:
> On 2012-10-23 16:21, Evgeny Voevodin wrote:
>> We will use this pointer from functions where we don't have an
>> interface to pass tcg_ctx as a parameter.
> I don't think this is worthwhile. It'll just make the whole thing slower,
> passing around unnecessary pointers.
>
>
> r~
>
1. I didn't noticed any slow-down of kernel boot process. Maybe it's
worth to make more
tests with self modifying code but I don't think so, because
2. The most intensive usage of tcg_cur_ctx is in tcg/tcg-op.h functions.
If we look carefully at
them then we will see that there are only few functions for which single
excessive dereferencing
of a pointer leads to any significant slow-down. These functions are
those which make just one
or two operations and exit. And we should keep in mind that there is
only single dereference of
a pointer since it is stored in the register for further operations.
Of course some slow-down should present but I found it negligible
(actually I didn't find it at all).
If there are some common tests for TCG generation speed I can try to run
them and report results.
Also we can specify tcg_cur_ctx as const and in that case I guess that
dereferencing of tcg_cur_ctx
should not lead to any slow-down.
Also I can drop tcg_cur_ctx and use tcg_ctx.xxx instead as was in the
first series.
What about the rest patches?
--
Kind regards,
Evgeny Voevodin,
Technical Leader,
Mobile Group,
Samsung Moscow Research Center,
e-mail: e.voevodin@samsung.com
next prev parent reply other threads:[~2012-10-24 4:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 6:21 [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 1/7] tcg/tcg.h: Duplicate global TCG variables in TCGContext Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx Evgeny Voevodin
2012-10-23 21:18 ` Richard Henderson
2012-10-24 4:07 ` Evgeny Voevodin [this message]
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 3/7] TCG: Use gen_opc_ptr from context instead of global variable Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 4/7] TCG: Use gen_opparam_ptr " Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 5/7] TCG: Use gen_opc_buf " Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 6/7] TCG: Use gen_opparam_buf " Evgeny Voevodin
2012-10-23 6:21 ` [Qemu-devel] [PATCH v2 7/7] TCG: Remove unused global variables Evgeny Voevodin
2012-10-23 8:38 ` [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up Evgeny Voevodin
2012-10-25 3:06 ` Evgeny Voevodin
2012-10-25 3:17 ` 陳韋任 (Wei-Ren Chen)
2012-10-25 3:41 ` Evgeny Voevodin
2012-10-25 6:45 ` Evgeny Voevodin
2012-10-26 6:32 ` Evgeny Voevodin
2012-10-27 14:34 ` Blue Swirl
2012-10-29 6:27 ` Evgeny Voevodin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50876990.2010209@samsung.com \
--to=e.voevodin@samsung.com \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.