HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
The new Windows subsystem for Linux architecture: a deep dive - BRK3068

Microsoft Developer · Youtube · 151 HN points · 5 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Microsoft Developer's video "The new Windows subsystem for Linux architecture: a deep dive - BRK3068".
Youtube Summary
The WSL community has given amazing feedback on how we can improve through platforms like Twitter, Github, and UserVoice. Our team has taken that feedback to heart. In this session, they’ll be showing off how the new WSL architecture will improve your development environment with: faster file performance speed, Linux file access from Windows, better support for Linux applications, and more.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
May 06, 2020 · lower on Initial Impressions of WSL 2
> It seems the obvious way to do this was to have SMB mounts on either side and optimize the hell out of the already existing SMB implementations on both OSes to get the performance close enough to disk.

That's basically what they're doing, only that it's not SMB but 9p protocol servers.

Here is a video where they discuss the WSL2 architecture. The link is time-stamped to go to an overview picture of the architecture.

https://www.youtube.com/watch?v=lwhMThePdIo&t=2435

https://www.youtube.com/watch?v=lwhMThePdIo&t=2818s

WinNT Kernel and Linux Kernel are running on top of Hypervisor platform side-by-side .... not one-in-the-other.

Jan 22, 2020 · mikepurvis on Wine 5.0
If you're interested, the Build talk where WSL2 was introduced is pretty in-depth and does a great job of talking about the motivation. See starting around this point: https://youtu.be/lwhMThePdIo?t=1070
Jun 29, 2019 · pjmlp on Microsoft's Linux Kernel
WSL2 does use 9P, here is the BUILD session about it.

"The new Windows subsystem for Linux architecture: a deep dive - BRK3068"

https://www.youtube.com/watch?v=lwhMThePdIo

It’s happening at the hypervisor level, and in this case it’s Type 1, so I guess you could but I don’t know how. My ops colleagues are hanging their heads at me right now.

You can learn more about the architecture of WSL2 in this video from Build https://youtu.be/lwhMThePdIo

May 09, 2019 · 130 points, 107 comments · submitted by bruxis
jchw
I was initially very excited for WSL2, but I do worry it will require Hyper-V to be enabled. I use VMWare Workstation and it’s a true pain to switch Hyper-V on and off. Also, I cant help but worry that this will somehow be a downgrade in some way... will it be just as integrated? Windows Firewall worked on WSL Pico processes for example.
skrebbel
if it needs hyper-v, then what's the point? how is it fundamentally different from just running ubuntu in virtualbox with a shared network drive, then? except where the terminal window is?
orf
The tight integration of course. And not having to use Virtualbox.
anon4242
Well, you won't be able to use Virtualbox anymore.. at least for 64 bit OSes :(
chrisdfrey
Because Hyper-V is a type 1 hypervisor, VMs that use it can be faster; I've found using docker in virtualbox is a lot slower than using docker for Windows (which uses Hyper-V).
sorz
> Windows Firewall worked on WSL Pico processes for example.

In WSL1 they share the same IP addresses and TCP/UDP port space, while WSL2 has an separated IP address. I suppose there is some NAT to make the network working in WSL2.

At the end of Q&A part they mentioned that sharing localhost, IP addresses, and port number space (which is a WSL1 feature) may be done in future, but they have no roadmap for it right now.

wnevets
Yeah one of the big selling points of WSL1 was the lack of VM.
resters
why is that? performance?
Skunkleton
VMs give near-native performance, and it's not like WSL1 was particularly fast.
Tuna-Fish
WSL1 was notably slow, because the windows file system stack is much slower on metadata than Linux.
wnevets
The last time I checked virtualbox and hyper v can't run at the sametime.
nikbackm
VirtualBox 6.0 should support it. Still considered an experimental feature though.

https://docs.oracle.com/cd/E97728_01/F12470/html/hyperv-inte...

CWuestefeld
Hyper-V and VMWare don't work well together. If your machine is running on VMWare (as do our development workstations), then you won't be able to use Hyper-V. This already prevents us from using Docker on the dev workstations themselves (which are Win10).
Skunkleton
The mechanism by which this kernel is virtualized remains to be seen. It may be heavily paravirtualized, and not rely on hardware virtualization at all. If it doesn't rely on hardware virtualization, then there will be no issue running it alongside other hypervisors.
OkGoDoIt
I hate the way HyperV messes up networking with its virtual network adapters. It gets complicated with a VPN or LTE connection really quickly. Maybe I’m just doing it wrong, but I’ve never found networking to work properly on a machine with HyperV enabled.

Switching to a virtualization model feels like a step backwards. If I wanted a virtualized Linux on Windows, I’d run a virtual Linux on Windows. WSL is special because it’s a middle ground.

zamadatix
For PC use you should use the default NAT switch that way your adapters stay physical.
eatonphil
Switched to Windows from Linux on my work laptop 6 months ago. First-class support for Zoom, Office, screen-sharing, presenting, etc. is good. General terminal-based development is not fantastic, but WSL made it possible at all. I can run all but my most Linux-specific programs (e.g. dependent on procfs).

Aside from not have some Linux pseudo-filesystems the bigger issue has been the speed of file operations. I dread having to run `dep ensure` and `yarn install`.

Why not just Hyper-V? Every few weeks I try to figure out how to set up a static IP but I cannot for the life of me. So it takes 1-2 minutes every time I want to reconnect because not only does it get a dynamic IP by default, it is reset every day or so. Need to go into the VM via Hyper-V, get the current IP address, reset /etc/hosts within WSL, reset /etc/hosts within Windows, SSH into VM within WSL. It drives me nuts.

Really looking forward to WSL2 for faster file operations and being able to run all my programs.

benou
Count me in.

Regarding the networking issue, I sort of solved it by using VMBus between my VM and Windows. Shameless plug: https://github.com/bganne/hvnc

brianpgordon
Are there any plans to support graphical guest applications running in a native Windows window, like VMWare Fusion? Their client/server VS Code demo where only the UI runs in Windows seems really bizarre to me. Why not just run X? I suppose you could pipe X over SSH but it would be nice to get built-in support without the hassle or performance penalty.
kevin_thibedeau
Cygwin Xorg does this.
Scarbutt
Their equivalent of vmware fusion is hyperv.
phishfi
Is it? I didn't think Hyper-V allowed separated windows. The only resource I've found that does this effectively is X410.
Tepix
After using Linux on the desktop for around two decades, I'm forced to use Windows 10 since a few months.

WSL is what makes it somewhat bearable. I look forward to Windows Terminal and WSL2.

copperx
Why are you being forced to use Windows? Doesn't that decrease your productivity dramatically?
hs86
This seems to run on a VM that dynamically adjusts its RAM size according to the current usage. Does a VM like this have any kind of file cache?
monocasa
I'm pretty sure the Linux side owns it's own FS cache. The whole point of this release is just to run a real Linux kernel in a VM in order to increase FS perf. I'm not sure how you do that and divorce it from the Linux kernel's FS cache.
benou
This is already supported in HyperV VM, and the concept is old: it is called ballooning.

Basically a driver in the Linux guest (hv_balloon for HyperV, but you have the same things for KVM, VMWare etc.) can artificially "inflates" its memory use when detecting too much unused memory and give it back to the host. When the guest needs more memory, the balloon driver will give the memory back. Couple with hotplug memory support and things can be pretty dynamic.

Not sure if they do something more sophisticated for WSL2 though.

1wd
I'm surprised, is integrating a Linux kernel with Windows not a GPL violation? Is this a "mere aggregation" situation? Are the Linux kernel and other closed source Windows code at no point linked, or exchanging complex internal data structures?
_wmd
The interpretation around what "linking" means in the context of the GPL is a full-time job. At the least, the literal interpretation I was raised with has never been the official position of the FSF. For example, just because you link a library statically doesn't mean you're GPL-violating. You need to for example, swap complex data structures in some complex control flow to cross the line.

Even then there are still more exceptions for 'runtimes' and suchlike where while in a literal sense, the final assembled program when executing is linked against GPL source the result is not considered to be covered by the GPL.

None of this stuff is actually part of the license text -- it's built on precedence and common understanding. These things are a lawyer's job, we're just engineers

rolleiflex
It’s just another app that runs on Windows. They’re moving from a white-box implementation written by Microsoft of Linux kernel with no GPL code, to just shipping the thing in a VM and be done with it. I can’t say I blame them, WSL always had its rough edges and it breaks in unexpected ways.
ezoe
I was thinking about this issue on binary blob driver like nvidia's.

GPL is a clever hack of copyright law. It grant derivative works a copyright permission under the condition of accepting the same license.

Now, Windows kernel and Nvidia's binary blob driver exist without relying on Linux kernel at all. How could they be considered as a derivative work in terms of copyright law? Since GPLv2 relies on copyright law, it has no effect on situation where copyright law doesn't allow exclusive right.

For Nvidia's driver, Nvidia released a thin shim wrapper code as GPL which interface between Linux API and Nvidia binary blob driver API. But the core Nvidia binary blob driver existed independently from Linux kernel, it can't be a derivative work of Linux kernel.

For WSL2 case, Microsoft may take the same approach. They may release a thin shim wrapper which interface Linux kernel and Windows as GPL. But Windows kernel itself cannot be a derivative work of Linux kernel if it's separated well.

At least, that's my conclusion. I'm not a lawyer.

xorcist
> But the core Nvidia binary blob driver existed independently from Linux kernel, it can't be a derivative work of Linux kernel.

Many kernel developers are of a different opinion, and consider Nvidia in breach of their license. The fact that nobody has sued does not mean that they are in the clear. Don't consider the use of a thin shim to be some sort of license firewall.

Anyone other than a select few multinationals probably shouldn't consider legal disagreements with their partners a valid business strategy.

micmil
Why would it be? There are specific things you have to do for your code to be considered "integrated" with GPL code and as long as you avoid that there's no issue.
jahewson
Given that it requires HyperV it’s running in a manner similar to a VM. That doesn’t require linking and any I/O occurs via the normal channels (CPU interrupts, serial console, etc).

This is similar to how running a userland application on Linux doesn’t require the application to be GPL’d because it’s not directly linked to the kernel. While it interacts with the kernel it is not derived from it.

_wmd
This is fairly classic engineer thinking and what I was referring to in my comment below.. you can wrap a GPL library in its own program, put that program on a separate VM on a separate physical host in a separate physical building, talk to it only over a network interface and your program's resulting interaction with it might still be construed as linking.

Similarly, your program might statically link against a GPL'd library, but only pass bulk data through a programming interface in a coarse manner, and the result may not be considered linking. The FSF FAQ even explicitly addresses this case.

GPL leaves these kinds of mechanisms blurry and ill-defined (I presume intentionally), it's just that as engineers we are commonly only taught how violations manifest in the usual case.

billziss
I think I agree with your overall understanding. It would be interesting to learn what FSF's position is regarding WSL2.
jpeeler
I'd be interested to see a Microsoft backed Wayland implementation to support GUI apps. Basically very similar to how Chrome OS has done it with Crostini. If you're interested too vote here:

https://wpdev.uservoice.com/forums/266908-command-prompt-con...

arcboii92
That's all cool, but I just learned you can type an exe into Windows Explorer's address bar to open it in the current directory. MIND BLOWN.
Narishma
Since it uses Hyper-V, does that mean it won't work anymore on the Home editions of Windows 10?
arcboii92
Probably not. But you can get legit Win 10 Pro keys from ebay for like $5
Narishma
Yeah, I'd rather pay 0$ and use VirtualBox or VMWare instead.
adolfojp
I asked @craigaloewen that question on reddit and he said the following:

"It'll be available on all SKUs that run WSL currently including windows home!"

yarg
I'd really like for this to support accelerated graphics - unfortunately I imagine that would require a comprehensive solution to GPU virtualisation at the DirectX level, which would at least need to be implemented in drivers - if not also supported at the hardware level.

Without that, then the main reason that I'd even be using the subsystem - GPU compute - is unavailable, and I'll need to actually boot into Linux if I want to do anything useful.

monocasa
Sounds like Docker for Mac for Windows. Might have some of the same shared FS consistency issues from running two full kernels with their own FS caching hierarchies.
unilynx
Here's to hoping Docker for Windows will rebase on WSL2 and make the same jump in quality as Docker for Mac did when they dropped virtualbox
pdonis
Why would I want to run a proprietary, closed-source implementation of what is supposed to be an open source operating system?
fesoliveira
Their kernel implementation will actually be open source and hosted on Github in the close future.
kristianp
Because things like sleep and hibernate work on Windows?
WalterGR
You personally? Hard to say since we don’t know your needs.

But other people seem to have a reason, based on the comments here and in every submission about WSL.

What are your needs?

xfer
This way ZOL also works on windows. Might make me switch to windows where i occasionally play windows only games.
taf2
Why isn’t windows just built on Linux at this point are there reasons for MS to maintain their own kernel? There must be people inside of MS asking this just like how edge is now built on chromium...
packet_nerd
It'd be awesome if nmap and other network tools work in WSL2.
apotatopot
Just release Office for Linux and this wouldn't be necessary at all.
logicchains
How's Office for Linux going to help my laptop reliably wake from hibernation?
mbrumlow
What hardware do you use?

I use Linux exclusively on all my systems, and have not had any problems at all. So I always wonder what hardware is being used that does not work...

For my laptops I use Think pads and various Dell systems. The only thing I always try to make sure when buying a laptop though is it is a Intel CPU with integrated inlet GPU -- just doing that and I have never really had any problems.

In any case, I am looking for the exact model you are using that has the problem -- so I can maybe find a cheap one on ebay and mess around with it.

logicchains
Dell XPS with Fedora (work laptop). I don't think it's specific to the model because my colleagues don't all have the same model but most have the same problem.
nogridbag
I believe Linux does not support the "modern standby" sleep state: S0 which allows PCs to behave like your smartphone.

It's probably more of a problem with the hardware manufacturers than Linux, but regardless the end result is that it only works on Windows.

For example, my Surface Book, when it's working, resumes instantly.

v_lisivka
It looks like you right: sleeping in S0 is not supported by Linux, only Windows does this:

ACPI Sleep States (S0 - S5)

•S0: Normal Powered-On state

•S1 Standby

•S2: Not supported

•S3 Suspend to Ram

•S4 Suspend to Disk

sk0g
That's incredibly short sighted, isn't it?

I like to record audio, and use DAWs and plugins/ VSTs.

What about artists who use graphic design or video editing programs? Is your use case the only valid one, for whatever reason?

alex7o
Repaer also works natively even on a Raspberry Pi.
erikbye
Have you tried Bitwig on Linux?
sk0g
Haven't heard of it, no.

Looks like a DAW, right? DAWs aren't really the problem - Reaper is on Linux as well, and it's perfectly serviceable. The issue is proprietary software like Helix Native/ HX Edit, and VSTs that have tough DRMs would be borderline impossible to set up. I assume.

I kinda gave up on Linux when I got my XPS 15 though, because there just didn't seem to be a way to have good switchable graphics without reboots, because that's just dumb and impractical, decent battery life, and the OS not freezing every time the touch screen was activate (mainly an issue with Ubuntu and derivatives, for whatever reason). Oh and the fingerprint sensor wouldn't work. Per display scaling seemed finicky in some desktop environments, etc.

Might try it again soon with Pop_os! or something of that sort, but I need this to be a stable machine for work, so dunno :|

kevingadd
How does Office for Linux solve the problem of doing Linux development or using Linux applications on Windows?
29athrowaway
Windows is the problem.
vetinari
It solves it by not needing Windows at all. You can then do Linux development and use Linux applications on Linux.
seanc
I've been using Ubuntu on my primary work laptop for years now, and the only real sticking point is video conferencing. Skype for Business and Webex barely work. Google hangouts is n't bad, but often runs into audio trouble with pulse and alsa.

And the real trouble is that you can't just go find the one that works. If your co-workers all use webex then you're stuck.

sameoldfears
I agree. We just moved to 365. I am thinking about wiping my work win10 and just installing Linux and using all the web versions.
emptyfile
I disagree, when I finally got the option of running a Postgresql server in WSL in Windows 10, I uninstalled Linux and never look back.

Linux on desktop is a bad joke.

SubiculumCode
Funny. I think my Mate Desktop works pretty damn well.
mixmastamyk
Postgres has been working on Windows forever, I used it from 2007 or so.

Also, my Ubuntu Mate has been working flawlessly on the desktop for 5 years, 10+ if you count the gnome2 days. No privacy invasion or helpful ads either.

tssva
I assume any compatibility issues with Chromium will soon disappear given Edge's migration to being Chromium based but how well do the web versions work with Firefox?
markild
I've used it a bit, though not extensively, and I've seen no issues.
isbjorn16
MSFT employee here.

My workstation that I use almost exclusively is Mint. I am one of those people who are, to put it politely, not keen on Google's ad and data sponge tentacles in every last item on the planet, and so I use Firefox as my primary browser.

O365 has yet to show me many problems with the O365 suite. The only problem I do have is a complete and utter lack of desktop notifications. I'm late to meetings a lot. For someone who values punctuality, it's a major flaw in my view.

We also use Teams a lot, and there the Firefox + Linux story is significantly worse. You lose all teleconference capabilities - and that's true for Chrome or Chromium as well. The chat functionality is acceptable and weirdly, the notifications on Teams work without any problems. Someone on that team needs to show the O365 team how to do it.

I have a VM for when I absolutely have to do something in Windows. For everything else, there's ~~mastercard~~ linux.

mixmastamyk
I put all notifications on my mobile device, it works well. A web app should be able to send OS notifications however, e.g. slack does on my copy of Ubuntu. Believe I had to enable permission once.
isbjorn16
That's a good idea; it probably wouldn't matter for me since my phone is muted all day long and I only use my phone if I'm on a coffee quest, but most people are a lot more attached to their phones than I am
mixmastamyk
I don't mute mine but put it in airplane mode, so no interruptions that I didn't program. Also strobes the flash when an alarm goes off.
scardine
While all my servers are Linux, on the Desktop it is my last choice. Interesting enough I used to love customizing the window manager to death but I'm older now and I just want something that is consistent and works out of the box.

Macs work really well out of the box but with some tweaks WSL makes Windows a quite decent development workstation.

Currently I'm using Windows + WSL and I'm quite satisfied. Looks like with the new version some of the tweaks to use docker are not necessary anymore. Great work, Microsoft, keep the pace.

apotatopot
I don't tweak anything after installing Debian/RHEL at work or at home. They're stable and flexible. IMO, the folks who spend hours customizing their desktops are usually the ones who don't know linux well and want to feel like they do.
aptanstjarna
Now, that's cynical, isn't it.

I do have several setups, each for a separated task. It depends on what you do. E.g. doing creative stuff, it can be annoying when you get constantly derailed by one darn ugly UI like Gnome3. Now, you don't need to dabble with eyecandy every full moon, but there is nothing wrong with setting it up once for a specific workflow, is there?

sergiosgc
Same here. Even when I switched laptop it was a painless: copy homedir, apt-get the same packages I had in the old one, let it cook for a while, and I was up and running with not a hiccup.

The only secret is to use hardware you know beforehand is well supported.

tapoxi
A more positive perspective, they want to learn what they can do. I remember trying every distribution, DE, and window manager when I started with Linux. These days I stick with stock GNOME on Fedora.
danbolt
When I was a teenager, my father brought an Ubuntu 6.06 CD home from his workplace. It didn’t interest him much, but he let me play with it on an old family computer. Once the setup finished I spent as much time as I could playing with the colour scheme, figuring out how to install Compiz for the cube animation, and making Kingdom Hearts wallpapers. Those activities were mostly playful, but they ended up helping me get exposure to tools like cd, ls, and apt-get.

Today I feel a lot more confident in using Linux (or any Unix, really), but that’s likely 100% due to having time to spend playing and being curious.

There’s a lot of discussion about an education in computing helping people get ahead economically, but part of me wonders how much proficiency comes from being a child on a Commodore 64 than learning express+mongodb in a few weeks (not that being the latter is a bad thing, either!).

29athrowaway
> Customizing your window manager to death

That is not required to use a Linux desktop.

scardine
My pet peeve is the default clipboard behavior, personally I hate when I select text and it overrides the previous content in the clipboard.
bitwize
There are two clipboards in X11. One is the middle-click-paste, selection clipboard that gets clobbered when you highlight something. But C-x, C-c, and C-v (in CUA applications) operate on a different clipboard altogether that doesn't exhibit this behavior.
vbezhenar
And that is awesome feature that I miss a lot in other operating systems.
bitwize
It's a wart of X11, which is obsolete and deprecated. Wayland has a single clipboard which behaves in mostly the standard way.
mixmastamyk
clipboard and selection buffer are separate, though I think there is a situation that co-mingles them.
jhasse
That's not the default in all Linux desktops I've seen.
erikbye
> Macs work really well out of the box but with some tweaks

Really? I don't know your definition of tweaks, but I've always found macOS requires a bunch of third party apps (often only paid alternatives) to be useful for a power user. Last I checked even its window management support was awful, and in a lot of situations it's impossible to get to where you want without touching the mouse.

KDE works much better out the gate, and is actually an advanced desktop environment in terms of possible customization if that is your bag.

bwat49
> I used to love customizing the window manager to death but I'm older now and I just want something that is consistent and works out of the box.

it's called GNOME

CoolGuySteve
I have the same motivation as you, I just want shit that works.

But Windows is the absolute last place I find that. All I get are updates that break my setup, constant inane interruptions from Cortana or the desktop or wherever, advertisement tiles in the fucking start menu, forced updates that can't be done in the background, Windows Activation disappearing after hardware upgrades, etc.

I feel like I'm in the Stepford Wives with all these people coming out of the woodwork to proclaim how majestic the Windows experience is.

A few years back I switched from Mac to Ubuntu for the faster, cheaper, diverse hardware and I have to say, it's pretty much perfect in the "Just Works" department on the 3 laptops + 2 desktops I've installed it on. But I'm also one of those people that actually liked Unity so I don't have to mess with it much after installing.

scardine
Interesting, may be I have some setting that prevents Cortana from annoying me and prevents windows from placing ads on the start menu. Not that I use the start menu often, generally I just hit the search box and start typing the name of the app I want (if it is not pinned to the task bar already).

I'm using Windows 10 Pro (Insider Preview fast track) and not seeing the annoyances you are experiencing.

phishfi
In my experience, the ads are only present at initial setup. Once you remove the shortcuts (and disable suggested apps), they don't show up again.
ccffph
as usual, the pirated enterprise editions with telemetry disabled work really well.
la_barba
Just to add my own anecdote here, I have been getting months of uptime on Windows, since Windows 7. I have a W7 Laptop and a W10 dev workstation that are currently at over 4 months of uptime. https://imgur.com/a/U8fGpCi

Edit: Oops looks like someone rebooted my W7 laptop.. :'(

billziss
Although many people seem to be receiving the WSL2 news well, I am one of the few that feels that we will be missing something important with this new direction.

WSL1 was pushing the boundaries of OS research: - a method for having multiple syscall interfaces in a mainstream OS - processes in WSL1 were real NT processes (even if lacking some of the NTOS environment) - direct integration with the rest of the OS without an awkward VM separation layer.

In comparison WSL2 is basically an optimized VM with some fancy guest additions. Color me underwhelmed.

I understand the argument that WSL2 is faster than WSL1 in file system operations. I expect this will only be true for their root file system ("VolFs") and that performance will remain same or suffer for Windows drives ("DrvFs"). I am certain that they could fix "VolFs" performance by moving the file system of NTFS and into a raw disk partition or VHD. (Note: I write file systems both in and out of kernel.)

Finally WSL2 will be distributed with Windows which raises some licensing questions (IANAL) if not in the letter of the GPL license at least in spirit. I write GPL'ed software myself and I would be somewhat miffed if I saw my software used in a similar manner (i.e. "via a VM", but still distributed with non-GPL code).

dragonwriter
> Finally WSL2 will be distributed with Windows which raises some licensing questions (IANAL) if not in the letter of the GPL license at least in spirit. I write GPL'ed software myself and I would be somewhat miffed if I saw my software used in a similar manner (i.e. "via a VM", but still distributed with non-GPL code).

Mere aggregation of non-GPL code with (“distributed with”) GPL code expressly is consistent with the GPL, it is contrary to neither letter nor spirit of the license.

billziss
But is it really just "aggregation"?

https://www.gnu.org/licenses/gpl-faq.html#MereAggregation https://www.gnu.org/licenses/gpl-faq.html#AggregateContainer...

I do not know, but I can see arguments on both sides. This is why I would love to hear the opinion of the FSF on this.

schwede
I agree that WSL1 was a fascinating project. It’s too bad all that work has gone to waste.
dragonwriter
> I agree that WSL1 was a fascinating project. It’s too bad all that work has gone to waste.

Has it? WSL1 and WSL2 seem to be parallel alternatives, the latter isn't replacing the former now, and it's not clear that it is intended to.

billziss
Perhaps you are right, but to me this feels more like Microsoft hedging their bets, rather than a genuine interest in having two parallel products doing effectively the same thing (from a user perspective).

I asked the same question on their GitHub issues: https://github.com/microsoft/WSL/issues/4022

rjsw
Multiple syscall interfaces is how Linux emulation has been done in the BSD world for many years.
billziss
Yes, I am aware of the Linux emulation in FreeBSD and elsewhere.
rjsw
How is it pushing the boundaries of OS research then ?
billziss
Which systems do you think are more similar: Windows and Linux or FreeBSD and Linux?

Presenting a Linux syscall interface on top of Windows is a hard task. The systems have fundamentally different approaches to many OS functionalities. In general you cannot just 1:1 map syscalls between the two. I am very familiar with the Windows kernel and fairly familiar with the Linux kernel and I am 100% convinced of this.

This is not to minimize the FreeBSD achievement. However I expect that mapping from Linux to FreeBSD and back would be an easier task. I should note here that I only know generalities about the FreeBSD kernel and would be willing to be educated if that is not the case and done in good faith.

mey
As described in the Video, they could not keep up with feature parity of syscalls in Linux and some concepts are simply incompatible with the two systems. They reference the concept of open file handles and moving folder structures.

I think they found the boundary of OS research in this case, and a better product is using the actual Linux kernel.

billziss
> They reference the concept of open file handles and moving folder structures.

I think this comment may have been disingenuous on their part. The reason is that this problem more than likely still exists in WSL2 for the /mnt/c, /mnt/d file systems (i.e. what they used to call "DrvFs" in WSL1).

WSL1 comes with (at least) 2 file systems. "VolFs" which is the file system that they use for the Linux root file system and "DrvFs" which is the file system that they use to access Windows drives (C:, D:, ...).

In WSL1 VolFs was implemented as a layer on top of NTFS, so it comes with all the Windows file system and NTFS baggage. In WSL2 they will replace this file system with a native ext4 formatted partition on a VHD file, thus eliminating the Windows I/O stack (except for READ/WRITE I/O to the VHD file).

My contention is that they could have instead replaced VolFs with a native WSL1 file system that uses a disk partition or VHD as its backend storage, thus eliminating the Windows I/O stack in the same way. They could then have implemented proper Linux file system semantics without any baggage.

> I think they found the boundary of OS research in this case

Unlikely. It would not surprise me if the changes we are seeing are less technical and more political.

nikbackm
> My contention is that they could have instead replaced VolFs with a native WSL1 file system that uses a disk partition or VHD as its backend storage, thus eliminating the Windows I/O stack in the same way. They could then have implemented proper Linux file system semantics without any baggage.

But that would require them to implement a new file system from scratch wouldn't it? VolFs in WSL1 relied on NTFS to do the heavy lifting.

Far easier to just let the Linux kernel handle it.

billziss
> But that would require them to implement a new file system from scratch wouldn't it? VolFs in WSL1 relied on NTFS to do the heavy lifting.

You are correct.

May 08, 2019 · 21 points, 0 comments · submitted by tmkbry
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.