All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@googlemail.com>
Subject: Re: [Qemu-devel] Significant performance regression in qemu-system-mips.
Date: Sat, 27 Mar 2010 18:01:39 -0500	[thread overview]
Message-ID: <201003271801.40102.rob@landley.net> (raw)
In-Reply-To: <20100327123241.GG15194@volta.aurel32.net>

On Saturday 27 March 2010 07:32:41 Aurelien Jarno wrote:
> On Fri, Mar 26, 2010 at 04:47:51PM -0500, Rob Landley wrote:
> > On Friday 26 March 2010 14:00:00 Aurelien Jarno wrote:
> > > I am pretty fine applying a correct patch if you send a new one.
> >
> > By which you mean rip out the whole #ifdef block?
>
> Yes.
>
> > Here you go:
>
> This looks much better. Can you please resend it with the changes below
> and a Signed-off-by: ?

If you want the code actually cleaned up instead of minimally changed,
here's a stab at that.  (Unfortunately I haven't got a ppc64 setup to test it
with yet, but ppc32 still works.)

Signed-off-by: Rob Landley <rob@landley.net>

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 682a813..3c3ef21 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -517,31 +517,12 @@ do {                                                                    \
 
 static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
 {
-    abi_ulong pos = infop->start_stack;
-    abi_ulong tmp;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
-    abi_ulong entry, toc;
-#endif
-
     _regs->gpr[1] = infop->start_stack;
 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
-    entry = ldq_raw(infop->entry) + infop->load_addr;
-    toc = ldq_raw(infop->entry + 8) + infop->load_addr;
-    _regs->gpr[2] = toc;
-    infop->entry = entry;
+    _regs->gpr[2] = ldq_raw(infop->entry + 8) + infop->load_addr;
+    infop->entry = ldq_raw(infop->entry) + infop->load_addr;
 #endif
     _regs->nip = infop->entry;
-    /* Note that isn't exactly what regular kernel does
-     * but this is what the ABI wants and is needed to allow
-     * execution of PPC BSD programs.
-     */
-    /* FIXME - what to for failure of get_user()? */
-    get_user_ual(_regs->gpr[3], pos);
-    pos += sizeof(abi_ulong);
-    _regs->gpr[4] = pos;
-    for (tmp = 1; tmp != 0; pos += sizeof(abi_ulong))
-        tmp = ldl(pos);
-    _regs->gpr[5] = pos;
 }
 
 #define ELF_EXEC_PAGESIZE	4096

> > Ok, I agree I was a bit harsh.  (He's the one who introduced his employer
> > into the discussion, but I suspect I read more into that than he meant by
> > it.)
>
> I think you misunderstood him. You were talking about Super-Hitachi
> which is a train [1] from Hitachi (not his employer), while he was talking
> about Super-H which is a CPU [2] from Renesas (his employer).

So essentially he's insisting he works for Freescale, not Motorola, because
Motorola stopped being interested in the m68k and divested itself of its
processor manufacturing operations.  And I'm confusing his product with
something _else_ Motorola used to do.

Only transliterated to Japan.

*shrug*  The "SuperH" chipset was developed by Hitachi.  I thought the H stood
for "Hitachi".  I hadn't actually noticed that Hitachi had divested itself of
its chip design operations, and was trying to avoid referring to it as "sh4"
because that's an architecture generation, not a chip family.  (There used to
be sh3 and similar, and I thought there might be an sh5 someday but now that
I've looked into it I can understand why they don't seem too worried about
that happening.)

My project is trying to get all the architectures Linux and QEMU support to
behave the same way.  Thus I'm no more an sh4 expert than I am a ppc expert, I
just poke at it and look stuff up when it doesn't work (which is frequently).

Speaking of which, qemu-system-ppc in 0.12.3 segfaults accessing /dev/hdc, and
the one in current -git has the missed IRQ issue when accessing /dev/hda.  Is
there any chance of 0.12.4 in the near future?  (I hate to point people
interested in PPC at a random non-current git snapshot.)

> He has the right to not care about trains ;-)

It was more the "I can build it, I don't care if you still can" issue, when
the commit in question was a primarily cosmetic change to code that was only
theoretically broken.  (Not only did it work for me, but it was so broken
nobody actually noticed the issue in question for years.)

I got the impression that the reason he didn't care about my use case was
because I was not a customer of his company.  That he was acting on behalf
of his employer, not in an impartial purely technical capacity.  I have
no commercial interest in sh4, and never did, so I stopped bothering him.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

  reply	other threads:[~2010-03-27 23:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 20:34 [Qemu-devel] Significant performance regression in qemu-system-mips Rob Landley
2010-03-25  9:20 ` Artyom Tarasenko
2010-03-25 17:33   ` Rob Landley
2010-03-25 23:25     ` Aurelien Jarno
2010-03-25 23:57       ` Alexander Graf
2010-03-26  2:44         ` Rob Landley
2010-04-01 13:49           ` Andreas Färber
2010-04-01 23:42             ` Alexander Graf
2010-04-02  8:56               ` Aurelien Jarno
2010-04-03  5:49               ` Rob Landley
2010-03-26  9:53       ` Rob Landley
2010-03-26 19:00         ` Aurelien Jarno
2010-03-26 21:47           ` Rob Landley
2010-03-27 12:32             ` Aurelien Jarno
2010-03-27 23:01               ` Rob Landley [this message]
2010-03-28 14:57                 ` Aurelien Jarno
2010-03-28 18:40                   ` Rob Landley
2010-03-28 16:33 ` [Qemu-devel] " Paolo Bonzini
2010-04-01 21:33 ` [Qemu-devel] " Aurelien Jarno
2010-04-03  4:58   ` Rob Landley

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=201003271801.40102.rob@landley.net \
    --to=rob@landley.net \
    --cc=atar4qemu@googlemail.com \
    --cc=aurelien@aurel32.net \
    --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.