All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeny Voevodin <e.voevodin@samsung.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: i.mitsyanko@samsung.com, qemu-devel@nongnu.org,
	kyungmin.park@samsung.com, d.solodkiy@samsung.com,
	m.kozlov@samsung.com, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2] TCG: Convert global variables to be TLS.
Date: Thu, 01 Mar 2012 14:57:18 +0400	[thread overview]
Message-ID: <4F4F560E.6060806@samsung.com> (raw)
In-Reply-To: <CAFEAcA8sm7163krL5RKB=tjsuphti=GEDaGwfh2Srpy696hAZA@mail.gmail.com>

On 01.03.2012 12:27, Peter Maydell wrote:
> On 1 March 2012 08:22, Andreas Färber<afaerber@suse.de>  wrote:
>> Am 28.02.2012 04:13, schrieb Evgeny Voevodin:
>>> On 27.02.2012 16:35, Peter Maydell wrote:
>>>> A true multithreaded TCG is a large project, and unless we're
>>>> going to commit to doing that I don't see much value in making
>>>> some variables per-thread when we might instead need to do
>>>> larger refactorings (properly encapsulating the codegen
>>>> caches as qom objects, maybe?).
>>> [...] qomification of translation caches is an interesting suggestion I
>>> think.
>> While I have come to like QOM and am using it for the CPUState, I don't
>> see the benefit in using it for these secondary structures. There are
>> already dedicated monitor commands to inspect them, no?
> Mostly I was thinking about the encapsulation of knowing which data
> structures are associated with a translation cache and letting you
> have more than one of them. You could do that with a plain struct
> but since we have this OO infrastructure now why not use it?
>
> -- PMM
>

Actually, I didn't dive deep enough in QOM and can't see any benefits or 
disadvantages in
such encapsulation. As stands to me now, QOM is mostly an interface, but 
internal things
are still structs :) And if we implement appropriate model for 
multithreading TCG, I believe,
that it could be easily wrapped with QOM, if needed.
Also, there are at least two approaches for cache - unified for all 
VCPUs and exclusive for each VCPU.
First is better when a lot of different threads run in the target, since 
each cache holds
unique code and thread communication is small.
Second is better when a lot of identical threads running since no 
excessive translation of identical code
is made by each VCPU thread, but communication between threads on 
accessing the cache is high.
So, what I'm talking about is if we use unified cache, we may not need 
to have more than one cache instance.

-- 
Kind regards,
Evgeny Voevodin,
Leading Software Engineer,
ASWG, Moscow R&D center, Samsung Electronics
e-mail: e.voevodin@samsung.com

      reply	other threads:[~2012-03-01 10:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 11:06 [Qemu-devel] [PATCH] TCG: Convert global variables to be TLS Evgeny Voevodin
2012-02-27 11:06 ` Evgeny Voevodin
2012-02-27 11:43 ` Evgeny Voevodin
2012-02-27 12:13 ` [Qemu-devel] [PATCH v2] " Evgeny Voevodin
2012-02-27 12:35   ` Peter Maydell
2012-02-28  3:13     ` Evgeny Voevodin
2012-02-28  8:10       ` Peter Maydell
2012-02-29  3:26         ` 陳韋任
2012-02-29  3:43           ` Evgeny Voevodin
2012-02-29  3:46             ` 陳韋任
2012-02-29  4:01               ` Evgeny Voevodin
2012-03-01  7:51         ` 陳韋任
2012-03-02  6:08           ` Evgeny Voevodin
2012-03-01  8:22       ` Andreas Färber
2012-03-01  8:27         ` Peter Maydell
2012-03-01 10:57           ` Evgeny Voevodin [this message]

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=4F4F560E.6060806@samsung.com \
    --to=e.voevodin@samsung.com \
    --cc=afaerber@suse.de \
    --cc=d.solodkiy@samsung.com \
    --cc=i.mitsyanko@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=m.kozlov@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.