[PATCH 6/9] kernel/x86: enable x32 support for amd64

Elliott Mitchell ehem+openwrt at m5p.com
Fri Apr 28 19:58:49 PDT 2023


On Thu, Apr 27, 2023 at 11:27:30AM +0200, Thibaut wrote:
> 
> > Le 27 avr. 2023 à 02:00, Elliott Mitchell <ehem+openwrt at m5p.com> a écrit :
> > 
> > On Thu, Apr 27, 2023 at 12:46:49AM +0200, Stefan Lippers-Hollmann wrote:
> > 
> >> While I might understand (understand, not support) a desire for this 
> >> as a dedicated subtarget (to appease the virtualization crowd), 
> >> although I still don't see a reason or sufficient uptake in more 
> >> conventional Linux environments. I would not be happy (at all) to 
> >> lose 'normal' x86_64 support (on real hardware) for this exotic 
> >> fringe hybrid. I can imagine that actually building for this 
> >> environment (with a 32 bit userland) might lead to 'funny' results 
> >> as well (as in major toolchain changes necessary to get it working 
> >> as expected).
> > 
> > I'm not proposing removing amd64 support, I'm proposing x32 is likely a
> > more valuable target.
> 
> Do you mean to actually introduce an x86_x32 userspace target in OpenWrt?
> If so, I suggest you take a look at [1] to get an idea of the can of worms you might be opening there.
> 
> I do not think OpenWrt has the resources to handle this level of breakage for such an exotic, barely upstream supported target.

It seems worthy experimention at least.  Enabling the kernel option adds
somewhere between 1-8191 bytes (kernel build grew 1 page).  If this
reduces memory usage by 10% and increases performance by 10% that seems
notable.

My hope is that others have flushed most of the bugs out by now.  If
there are still too many bugs at this point, it can be left unreleased.

> >  Yet what you're describing reads like your desire
> > is for OpenWRT/x86 to simply be yet another desktop Linux distribution.
> > 
> > Unless you feel a networking device really needs 256GB of memory, virtual
> > machines are precisely what OpenWRT/x86 *should* target.  I think it is
> > reasonable to also have a jumbo/desktop build, but using an entire x86
> > machine doesn't seem to match OpenWRT's main theme.
> 
> You seem to ignore perfectly capable so-called « mini pc » routers which are in use out there. They don’t need a « jumbo/desktop » build and they don’t have 256GB RAM, yet they work perfectly well with the current OpenWrt image.

That is indeed a better choice for consideration.  What type of
installation do you think OpenWRT should target for such devices?  I'm
unsure how much memory such devices typically have.  I was able to find
listings for SO-DIMMs from 4GB to 32GB.

Most recent devices will include an IOMMU and 4GB is more than enough to
usefully use a hypervisor.  In such a case it might well make sense to
use 128MB for handling the network and devote the rest to other tasks.
With a system that size, there is rather MORE urgency to keep VMs small.

Alternatively do you feel a router needs 4GB of memory?  Thing is this
turns OpenWRT into simply another desktop Linux distribution.  At which
point why not go with a Linux distribution designed for the desktop and
has all the desktop features?


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445





More information about the openwrt-devel mailing list