Date: Mon, 10 May 2021 09:28:55 +0100 From: David Chisnall <theraven@theravensnest.org> To: freebsd-current@freebsd.org Subject: Re: WSLg update on 1-5-2021 - BSD / WSL Message-ID: <d5d708b0-b4d2-0ce8-268c-e10276e63943@theravensnest.org> In-Reply-To: <CA%2Bt49PJ5pxU_Y3-p3u=bwiRn1AST9isjaSYUB=-NdRCXYLMKJA@mail.gmail.com> References: <CAA-K0n%2BsJ%2BKmc3LitPiX_RLxcKv8aUcY9=cRiM7mx58NY5xs-A@mail.gmail.com> <0b3d6049-f6eb-f9d4-5f20-f09ac666e949@nomadlogic.org> <92a81582-7bd4-b9f1-04b6-cbcd5eb77893@FreeBSD.org> <CA%2Bt49PJ5pxU_Y3-p3u=bwiRn1AST9isjaSYUB=-NdRCXYLMKJA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/05/2021 04:55, Daniel Nebdal wrote: > On Thu, 6 May 2021 at 19:05, David Chisnall <theraven@freebsd.org> wrote: >> [ Disclaimer: I work for Microsoft, but not on WSL and this is my own >> opinion ] >> (...) >> David >> > > Just as a counterpoint to Rozhuk's take, that all sounds sensible > enough to me - FreeBSD would probably gain more from this than MS. > > So the WSL2 TODO would be something like this: > * Ballooning driver. Seems like a proof of concept would be doable > enough - could you model it as an unkillable task (userland or kernel) > that wants to allocate a lot of memory, and anything it gets it hands > back to the host? There's an in-tree Xen balloon driver that works in this way: it allocates pages of memory from the kernel and then returns them to the hypervisor. It appears that Hyper-V actually supports two kinds of dynamic memory, the balloon interface and a mechanism based on hotplug. The balloon mechanism effectively defines a maximum amount of physical memory and lets the guest return some of it. The hotplug mechanism boots with a smaller amount of memory but can dynamically add and remove physical memory. I don't know which is used in WSL2. > * Some sort of boot support. Maybe as a shim that chainloads an > unmodified kernel? Probably finicky, but also self-contained. To start, you could kexec the FreeBSD kernel from a minimal Linux install. > * File systems. Is / also 9p-over-HyperV-channels? If so that's kind > of crucial and perhaps the hardest part. I think WSL2 provides a block device for /, which is why Linux-native filesystem performance is faster than WSL1. It would be great to have a ZFS image instead of ext4 here! > Oh, and how does the terminal work? You support multiple ttys, so I > guess it's not straight emulated serial? I believe that WSL2 uses SSH connections, rather than exposing the serial terminal. David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d5d708b0-b4d2-0ce8-268c-e10276e63943>