qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] sh : performance problem
Date: Tue, 03 Mar 2009 23:28:32 +0100	[thread overview]
Message-ID: <1236119312.4005.13.camel@coalu.atr> (raw)
In-Reply-To: <761ea48b0903031125n5d97462eu15caa552764789d9@mail.gmail.com>

Le mardi 03 mars 2009 à 20:25 +0100, Laurent Desnogues a écrit :
> On Tue, Mar 3, 2009 at 7:57 PM, Lionel Landwerlin
> <lionel.landwerlin@openwide.fr> wrote:
> > Le mercredi 04 mars 2009 à 00:46 +0900, Shin-ichiro KAWASAKI a écrit :
> [...]
> >>   sh4 : 5.8 [seconds]     O(n) utlb search.
> >>   sh4 : 4.6 [seconds]     O(log2(n)) utlb search.
> >>   sh4 : 4.1 [seconds]     O(1) utlb search by Lionel
> >>   arm : 0.8 [seconds]     (-M versatilepb + Debian ARM)
> >>
> >> Your patch has a nice score!
> >
> > Great :) But we're still far from arm :(
> 
> It would be interesting if you could run oprofile of both platforms
> (and even better if that was with call-graph output).
> 
> >> > +#if !defined(CONFIG_USER_ONLY)
> >> > +    /* vpn to utlb entry caches (too much space for user emulation) */
> >> > +    uint8_t utlbs_1k[4194304]; /* 222 => 4 Mb */
> >> > +    uint8_t utlbs_4k[1048576]; /* 220 => 1 Mb */
> >> > +    uint8_t utlbs_64k[65536]; /* 216 => 64 Kb */
> >> > +    uint8_t utlbs_1m[4096]; /* 212 => 4 Kb */
> >> > +#endif
> >> >  } CPUSH4State;
> >>
> >> Isn't it too gorgeous?
> >> How about allocating them on demand?
> >> I guess sh-linux uses only utlbs_4k[], in general.
> >> If so, 4 Mb utlbs_1k[] is waste.
> >>
> >
> > sh-linux can also use huge pages of 64k and 1M.
> >
> > I think it is important to keep the emulation as close as possible from
> > the real the cpu capabilities.
> 
> I think Shin-ichiro was rather pointing a the number of 1k pages,
> which are probably not used.  OTOH I agree being close to
> CPU capabilities is important.

The problem is, when a virtual address space must be resolved, the cpu
emulator is not able to know what page size has been (or not) used to
map the address. Thus we must handle the worst case...

And after all, 5Mb isn't so much, considering the fact that the physical
guest memory, in system emulation, can be mapped anywhere in the host
virtual address space, contrary to the user emulation that have harder
contraints...



By the way, does someone know why there is some kind of "tlb management
code" in exec.c ??

Does the SH4 architecture have special features that can't be handled in
a generic code ? Or are we just rewriting some code that is already
there ... ?


-- 
Lionel Landwerlin <lionel.landwerlin@openwide.fr>

  reply	other threads:[~2009-03-03 22:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 16:28 [Qemu-devel] sh : performance problem Shin-ichiro KAWASAKI
2009-02-28 19:15 ` Lionel Landwerlin
2009-03-01  6:05   ` Shin-ichiro KAWASAKI
2009-03-01 12:46     ` Lionel Landwerlin
2009-03-01 16:10       ` Shin-ichiro KAWASAKI
2009-03-01 17:39         ` Lionel Landwerlin
2009-03-02 14:46           ` Shin-ichiro KAWASAKI
2009-03-02 22:30     ` Lionel Landwerlin
2009-03-03 15:32       ` Shin-ichiro KAWASAKI
2009-03-02 23:58 ` Lionel Landwerlin
2009-03-03  0:09   ` Lionel Landwerlin
2009-03-03 15:46   ` Shin-ichiro KAWASAKI
2009-03-03 18:57     ` Lionel Landwerlin
2009-03-03 19:25       ` Laurent Desnogues
2009-03-03 22:28         ` Lionel Landwerlin [this message]
2009-03-04  2:59           ` Paul Brook
2009-03-04 15:22             ` Shin-ichiro KAWASAKI
2009-03-04 15:39           ` Shin-ichiro KAWASAKI
2009-03-03 23:11     ` Lionel Landwerlin
2009-03-04 15:12       ` Shin-ichiro KAWASAKI

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=1236119312.4005.13.camel@coalu.atr \
    --to=lionel.landwerlin@openwide.fr \
    --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 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 NNTP newsgroup(s).