mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Albert Cahalan" <acahalan@gmail.com>
To: sithglan@stud.uni-erlangen.de, linux-kernel@vger.kernel.org
Subject: Re: AMD64: 64 bit kernel 32 bit userland - some pending questions
Date: Tue, 6 Jun 2006 23:11:19 -0400	[thread overview]
Message-ID: <787b0d920606062011j21083e80v659228a7565ecfab@mail.gmail.com> (raw)

Thomas Glanzmann writes:

> I would like to use an AMD64 Opteron System with a 64 bit Linux Kernel,
> but a 32 bit userland (Debian Sarge). I have a few questions about this:
>
> - Is it possible to give the userland 3Gbyte virtual address
>   space (default for 2.4 and 2.6). But give the Kernel a 64 bit
>   virtual address space so that I get more than 1 Gbyte physical
>   Memory into LOWMEM - say I want 8 Gbyte - without using HIGHMEM
>   at all? If this scenario is possible I would get cheap memory
>   access at the benefit of a well tested userland. I don't have
>   applications that need more than 2 Gbyte virtual address
>   space.

Why do you want cheap memory access? Normally people want this
for performance, but 32-bit apps are noticably slower.

The "well tested userland" is only well tested on a 32-bit kernel.
There are many ways in which a 64-bit kernel fails to correctly
run 32-bit apps. I just found one the other day, in the way signal
handler info gets translated from 64-bit to 32-bit. Some of your
userspace would be something I wrote, which I happen to know will
not run 100% correctly and I just don't care to "fix" it for your
wildly abnormal configuration.

I suspect you have a Windows mindset. In the Windows world, almost
nothing is 64-bit clean. Nearly every Linux app is well-tested in
64-bit form. This is because Linux was ported to the Alpha CPU
back around 1994, give or take a year. That's over a decade of
64-bit experience. It's mainly the proprietary apps that don't
run in 64-bit mode. The one big exception is OpenOffice, which
was also proprietary until Sun opened it up.

Just forget the old 32-bit crud if at all possible. Hopefully
you won't have even one 32-bit library or executable. Make it
your goal to eliminate this buggy cruft. You can use chroot()
or VMWare as needed, but cleaning house is so much nicer.

> - If the above scenario works out like I imagine it, does this
>   add some additional overhead I am not aware of when I switch
>   for example from 32 bit userland to 64 bit kernel space which
>   would override the performance gain I get from the huge LOWMEM
>   virtuall address space?

Of course there is overhead. There are also bugs, some of which
won't ever get fixed.

The bigger problem is that 32-bit code has fewer CPU registers.
(nobody has done an ILP32 ABI for long mode) This is slow.

             reply	other threads:[~2006-06-07  3:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07  3:11 Albert Cahalan [this message]
2006-06-07  4:08 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2006-06-06  9:34 Thomas Glanzmann
2006-06-06 10:42 ` Andi Kleen
2006-06-06 10:49   ` Thomas Glanzmann
2006-06-06 11:51   ` Rafael J. Wysocki
2006-06-06 11:55     ` Andi Kleen
2006-06-06 11:56       ` Marcus Meissner
2006-06-06 12:11         ` Rafael J. Wysocki

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=787b0d920606062011j21083e80v659228a7565ecfab@mail.gmail.com \
    --to=acahalan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sithglan@stud.uni-erlangen.de \
    /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

all inboxes | Powered by JetHome®