News for hackers. Stuff that matters.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by yadco on Monday November 02, 2020 @04:19PM (#24973508)
BSD subsystem for Linux.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by loeg on Monday November 02, 2020 @04:32PM (#24973672)
Pretty much. Long predates WSL1, though, and facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor (WSL2).
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by moonchild on Monday November 02, 2020 @04:48PM (#24973824)
> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor

How's that?

WSL had serious performance issues due to design differences between linux and NT. Linux and freebsd both being unices, there is no such impedance. Some features (like cgroups) remain unimplemented, true, but there haven't been any big difficulties afaik.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by tony on Monday November 02, 2020 @06:20PM (#24974635)
Also interested in the response to the parent (loeg)

> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor

If by difficulties, you mean implementing system calls, this is being kept tabs on here: https://wiki.freebsd.org/Linuxulator

One that comes to mind is FreeBSD's kqueue, which opens a file descriptor for every file watched [1]

So inotify, inotify_add_watch, inotify_rm_watch isn't started. Lots of applications need watching of changes on directories. Even plain old FreeBSD gets messed since a large webpack project is going to chew up way too much.

If you're interested in this type of system call across operating systems check out https://github.com/emcrisostomo/fswatch

On WSL1/2:

Namely in WSL1, there were serious issues with package systems like npm, node_modules/ would have file descriptors get clogged, and it took a full system reboot to get WSL working again: https://github.com/microsoft/WSL/issues/1529. WSL2 Fixes it.

[1] https://emcrisostomo.github.io/fswatch/doc/1.8.0/fswatch.htm... See Freebsd -> kqueue -> Peculiarities

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by loeg on Monday November 02, 2020 @08:39PM (#24975492)
Sure, "BSL" doesn't have all the same difficulties as Windows WSL1 had. There are still design mismatches between FreeBSD and Linux that make implementing Linux features difficult (just for example, compare Linux clone() to FreeBSD fork()), and there are many, many features that remain unimplemented (inotify, cgroups, namespaces, ...).

I agree it's largely "just" a matter of implementing the missing functionality, which has a large surface area and requires building novel infrastructure in the FreeBSD kernel.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by trasz on Tuesday November 03, 2020 @05:37AM (#24978305)
I'd say it doesn't have ~90% of the difficulties WSL1 had. From what I remember WSL1 had problems with even most basic functionality, like the filesystem semantics, and never got to support eg DRI for X11.

Regarding clone() - it's rfork(2) you want to compare to, not fork(2). Not the same, sure, but much closer.

(Disclaimer: I'm one of the people working on it, so I'm obviously biased.)

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by andoriyu on Monday November 02, 2020 @06:15PM (#24974593)
Not just performance issues. WSL1 had so many limitations that it was silly.

WSL2 gives you pretty much the whole linux environment. A truly future of Linux of desktop...

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Monday November 02, 2020 @05:25PM (#24974199)
Linux subsytem for FreeBSD you mean?
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by meatmanek on Monday November 02, 2020 @08:02PM (#24975258)
That would make more grammatical sense, but the parent comment is presumably referencing Windows Subsystem for Linux[1], which is a subsystem for Windows that runs Linux.

1. https://docs.microsoft.com/en-us/windows/wsl/about