News for hackers. Stuff that matters.
Re:Fuchsia: a new operating system by desdiv on Friday March 31, 2017 @02:29PM (#14006604)
>They are drawing everything in userspace with fast graphics render...

Dumb question, does this mean that it's limited to software rendering only? You need to go through the kernel to talk to the GPU, right?

Re:Fuchsia: a new operating system by rayiner on Friday March 31, 2017 @02:50PM (#14006895)
What happens these days is that GPU buffers are mapped into user space, where they are filled with textures and drawing commands. Then, they are submitted to the kernel GPU scheduler for execution. See e.g. https://lwn.net/Articles/283798.
Re:Fuchsia: a new operating system by monocasa on Saturday April 01, 2017 @05:11PM (#14014211)
These days you don't even submit them via a kernel call these days; you've got your own GPU MMU context so you can kind of just go to town within your own process.

That's sort of the whole point behind Mantle/Vulkan/Metal/DX12.

Re:Fuchsia: a new operating system by ClashTheBunny on Friday March 31, 2017 @03:07PM (#14007093)
In addition to the other comments, I would be excited about a graphics driver not being able to take out my system.
Re:Fuchsia: a new operating system by stouset on Friday March 31, 2017 @08:17PM (#14009543)
Does this actually happen with enough regularity to care?

In the cases where it does, I imagine it's a situation where you're actually doing 3D-accelerated renders of the user interface. In which case, when the graphics subsystem craps out, hasn't your running system been rendered effectively unusable anyway?

I get that this is a nice idea in theory, but does it actually improve anything practical in practice?

Re:Fuchsia: a new operating system by Torgo on Friday March 31, 2017 @10:07PM (#14009978)
Yes? I haven't played games in a while, but when I did, crashes were frequent enough to be annoying, and ~100% of the time it was video drivers.
Re:Fuchsia: a new operating system by rwmj on Saturday April 01, 2017 @08:53AM (#14011866)
The Linux i915 driver manages to hard freeze my laptop every few days without any 3D games or even a compositing window manager ... It would be lovely to take it out of the kernel and isolate it with IOMMU.
Re:Fuchsia: a new operating system by stouset on Friday March 31, 2017 @11:20PM (#14010212)
Right, but that's my point. You're playing a game and the display crashes — I guess it's nice in theory that the rest of your system stayed up, but you're still more than likely just going to reboot, no?

If not, how exactly do you plan to restart the graphics process?

Re:Fuchsia: a new operating system by wmf on Saturday April 01, 2017 @12:29AM (#14010429)
Windows automatically restarts the GPU driver after a crash; the screen goes black for a few seconds and then all the windows come back up. It can also upgrade the GPU driver without a reboot. It's not used often but it's pretty handy.
Re:Fuchsia: a new operating system by taneq on Saturday April 01, 2017 @10:30AM (#14012276)
I think that was the moment I realised I liked Windows 7 more than XP. Installed new graphics drivers, expected "you must reboot your system", instead the screen went black (I had a moment of 'oh crap') and then came back up with 'installation complete.' Very impressive if you're used to XP.
Re:Fuchsia: a new operating system by dEnigma on Saturday April 01, 2017 @08:32AM (#14011806)
This impressed me a lot a couple of months ago, when my GPU driver started crashing about every 5 seconds while playing a game, and Windows kept restarting it, without even killing the game. The performance was abysmal of course, but still pretty neat.
Re:Fuchsia: a new operating system by thomastjeffery on Saturday April 01, 2017 @12:04AM (#14010342)
Lot's of options here:

ssh from my phone and restart the driver.

Go to a fallback ui, and restart the driver.

Have a system util notice the driver is misbehaving incorrectly, and restart it.

Re:Fuchsia: a new operating system by mwcampbell on Saturday April 01, 2017 @09:23AM (#14011981)
If the OS itself doesn't automatically recover the graphics process, you could always fire up your OS's built-in screen reader and use it like a blind person until you can get the graphics back up and running.
Re:Fuchsia: a new operating system by peter-m80 on Friday March 31, 2017 @02:49PM (#14006873)
"The graphics drivers for Fuchsia also exist as user-space services. They are logically split into a system driver and an application driver. The layer of software that facilitates communication between the two is called Magma, which is a framework that provides compositing and buffer sharing. Also part of the graphics stack is Escher, a physically-based renderer that relies on Vulkan to provide the rendering API"
Re:Fuchsia: a new operating system by deaddodo on Friday March 31, 2017 @05:41PM (#14008565)
Depends on the OS design. It's really not a good design, but you could run everything in ring0 (x86), supervisor mode (ARM), etc. However, now any fault (user or OS) could halt your system and you have no memory protection or process separation.
Re:Fuchsia: a new operating system by monocasa on Saturday April 01, 2017 @05:13PM (#14014216)
You've also have Singularity style software isolated processes where the OS statically verifies memory safety so that it can safely run all of the code in ring 0.
Re:Fuchsia: a new operating system by andrewmchen on Monday April 03, 2017 @11:24AM (#14023436)
You only have to run the privileged process that talks to the GPU in ring0 right?
Re:Fuchsia: a new operating system by mankash666 on Friday March 31, 2017 @02:47PM (#14006846)
No. GPUs typically work over the PCIE bus, and one can talk to PCIE via user space as well. In legacy systems like Linux the mapping of virtual to physical address and generation of scatter-gather-lists (SGLs) resided in the kernel. If one moves the same functionality to the user space without loss in performance (which is what magenta seems to do), there's no benefit to kernel GPU drivers.

Then there's the whole "GPL mafia" in the Linux world who'd like to force vendors to open up their drivers by moving as much of the critical pieces to the kernel as possible. In theory, you cannot write a kernel driver without violating the GPL. Fuchsia will have no such impositions. If someone wants to open their driver up, they could. If they believe their offering is superior, and a secret sauce needs protecting, they can keep it closed

Re:Fuchsia: a new operating system by makomk on Friday March 31, 2017 @04:38PM (#14007958)
Having control over the virtual to physical address mapping and scatter-gather lists for GPUs is effectively equivalent to kernel-level access anyway, though, because it lets you carry out DMA to and from arbitrary physical memory addresses. Some proprietary drivers for mobile GPUs have even given this level of access to untrusted user processes in the past leading to privilege escalation to root.
Re:Fuchsia: a new operating system by rwmj on Friday March 31, 2017 @05:41PM (#14008567)
Not with IOMMU (Intel VT-d and similar).
Re:Fuchsia: a new operating system by monocasa on Saturday April 01, 2017 @05:09PM (#14014190)
And GPUs these days have their own MMUs too.
Re:Fuchsia: a new operating system by thomastjeffery on Saturday April 01, 2017 @12:01AM (#14010334)
Unfortunately, the GPL mafia is right, and hardware vendors will continue to abuse their users with proprietary blobs unless they are forced into change.
Re:Fuchsia: a new operating system by TheOtherHobbes on Saturday April 01, 2017 @02:39AM (#14010868)
How long has the GPL Mafia been saying this?

Do you see many vendors being forced into change?

Re:Fuchsia: a new operating system by thomastjeffery on Saturday April 01, 2017 @02:34PM (#14013427)
AMD is finally changing. Unfortunately, The amdgpu-pro limbo right now is not ideal... but I am very excited for the future.

AMDGPU is already very usable. I remember ~5-10 years of waiting to use my Radeon 9600 with a recent kernel until the free Radeon driver was finally up to snuff. Catalyst and fglrx were awful.

Proprietary drivers just don't make sense. They are practically unmaintainable.

Re:Fuchsia: a new operating system by bonzini on Saturday April 01, 2017 @11:44AM (#14012635)
For GPUs, AMD is changing and even nVidia is using Nouveau for some chipsets.

For non-GPUs, only some WiFi drivers are out-of-tree (Realtek and Broadcom).

Re:Fuchsia: a new operating system by frozenport on Saturday April 01, 2017 @04:32AM (#14011185)
Typically only big vendors can afford not to change
Re:Fuchsia: a new operating system by michaelmrose on Friday March 31, 2017 @04:09PM (#14007666)
You make open source drivers sound like a bad thing.
Re:Fuchsia: a new operating system by cbsmith on Friday March 31, 2017 @04:28PM (#14007865)
No, but pushing that agenda via architectural level changes is not exactly a way to get a good architecture.
Re:Fuchsia: a new operating system by icebraining on Friday March 31, 2017 @06:48PM (#14009071)
An architecture is a structural design made to achieve certain goals. They just happen to have another goal to achieve.
Re:Fuchsia: a new operating system by cbsmith on Friday March 31, 2017 @07:40PM (#14009410)
It's even bad by that standard. When you compromise the function of the system to achieve that kind of goal, you end up losing out on both.
Re:Fuchsia: a new operating system by mankash666 on Friday March 31, 2017 @05:56PM (#14008693)
offering no alternative but "open source" on Linux is certainly not the most business friendly way to go about it.
Re:Fuchsia: a new operating system by ageofwant on Friday March 31, 2017 @09:42PM (#14009892)
It certainly is. "Business" just needs to internalize the fact that baking a bigger cake gets you more cake than fighting like a starved peasant over crumbs.
Re:Fuchsia: a new operating system by michaelmrose on Friday March 31, 2017 @10:16PM (#14010006)
Why would I or anyone care if it's business friendly. The people who just want to sell hardware should have no qualms about open source.
Re:Fuchsia: a new operating system by milesrout on Friday March 31, 2017 @06:06PM (#14008758)
Being business-friendly is not a goal, and shouldn't be a goal.
Re:Fuchsia: a new operating system by dragonwriter on Friday March 31, 2017 @08:28PM (#14009579)
> Being business-friendly is not a goal

Sure, it is, for lots of people. Even, apparently, the FSF, hence the reason non-consumer products are not subject to anti-tivoization rules in GPLv3.

Re:Fuchsia: a new operating system by petre on Saturday April 01, 2017 @04:32AM (#14011187)
I wonder why the BSDs haven't caught on for embedded appliances and phones while Linux did with a more restrictive and less business friendly license. Sure some companies like iXSystems and Juniper adopted BSDs, but the vast majority used Linux.
Re:Fuchsia: a new operating system by galacticpony on Saturday April 01, 2017 @05:47AM (#14011389)
The manpower behind Linux is superior. Not sure if it's the "vast majority", but for many business cases following the GPL(v2) rules simply is not a problem.

Both the PS4 and the Nintendo Switch run on FreeBSD, by the way.

Re:Fuchsia: a new operating system by gribbly on Saturday April 01, 2017 @08:17AM (#14011772)
>Both the PS4 and the Nintendo Switch run on FreeBSD, by the way.

Not exactly from what I've read, the PS4 runs 'Orbis OS' which is based upon FreeBSD 9, meanwhile the Nintendo Switch is using the network stack from FreeBSD, but also stuff from Android and the custom OS they wrote for 3DS.

Re:Fuchsia: a new operating system by dragonwriter on Saturday April 01, 2017 @11:46AM (#14012651)
Linux was available under a free license earlier (and alone) and as such developed a huge lead in community that no free OS has caught up with; that has quality, choice, and skill availability impacts that generally dwarf licensing issues for businesses.
Re:Fuchsia: a new operating system by milesrout on Saturday April 01, 2017 @02:54AM (#14010920)
Being business-friendly is not and should not be anyone's goal in licensing software. Being business-friendly is shit.
Re:Fuchsia: a new operating system by fauigerzigerk on Saturday April 01, 2017 @05:16AM (#14011306)
In my opininon, any particular license can only be friendly or unfriendly towards particular business models but not towards business in general.

Some businesses feel threatened by some open source licenses and other businesses are using the same open source licenses to do the threatening.

The funding for many important open source projects comes from global corporations that use it as part of their strategy, sometimes dominating entire industries based on open source.

A large number of small consulting businesses are based entirely on open source software as well.

Open source is not meant to be anti-commercial, nor would that make any sense, because "commercial" is what most of us do to make a living. That is not what takes away anyone's freedoms.

What does take away many freedoms is the fact that none of the widely used open source licenses fulfill their original purpose.

Linking rights to distribution once meant that users of the software got those rights. Now, in the age of the data center, end users get no rights at all and software can be modified freely by those who run the data centers without granting anyone access to those modifications.

Software has become more opaque than it has ever been before since the dawn of the PC age. Even without access to source code we had more control over Microsoft Excel than we now have over anything that runs in a data center, regardless of whether it is nominally "open source" or not.

Re:Fuchsia: a new operating system by NoGravitas on Saturday April 01, 2017 @12:00PM (#14012709)
As to your last point, this is what the AGPL is intended to solve.
Re:Fuchsia: a new operating system by fauigerzigerk on Saturday April 01, 2017 @01:09PM (#14013049)
I know, but almost no one uses it.
Re:Fuchsia: a new operating system by mankash666 on Friday April 07, 2017 @04:12PM (#14063133)
"Being business-friendly is shit". --> Who pays your bills mate? Fairies or a business who employs you, pays you a salary and you know, the inherent Darwinist biological urge to move up the food (value) chain to survive built into all living beings?
Re:Fuchsia: a new operating system by andrepd on Saturday April 01, 2017 @12:11PM (#14012759)
The "GPL mafia", how dare they demand their software's license be respected!?