Live data from Hacker News

Implement mechanism to wait on any of several futexes

lkml.org

51–60 of 158 posts

Re: Implement mechanism to wait on any of several futexes

#51
post #21

Earlier quoted context omitted.

Depressing to see reviewers waste review bandwidth bringing up issues such as "wasted newline" and "incorrect comment format". Do kernel developers not use auto-formatters?

Patch submitter should use checkpatch, which will warn about many of these issues.

checkpatch isn't as thorough as you might expect. I ran it on the submitted patch and it didn't catch any of the code style mistakes.

Re: Implement mechanism to wait on any of several futexes

#52
post #36
post #29

This looks to me like the main change is to make it easier to create mutexes with timeouts. Isn’t a mutex timing out an indication that: a) a lock wasn’t needed in the first place or b) the program is incorrect? It feels more like they just want the api to match win32 better but most of the multithreaded programming I’ve done lately has just used go’s channels so I totally could be missing something.

Correctness isn't always the right thing to do. Games, in particular, are full of code that approximates the right thing and falls back to less and less correct solutions. It's more important to be fast than right in a lot of cases. Dropping frames can have a significant negative experience for players. Dropping an AI pathing algorithm, particle physics computation, or other background task can often be fine or even…

Approximations, including temporal ones, are also science.

Ever seen a texture pop in instead of a stutter? If a lock would be taken on that load without timeout (very short) it'd either not load on time or load when it's no longer needed.

Re: Implement mechanism to wait on any of several futexes

#53

Earlier quoted context omitted.

Depressing to see reviewers waste review bandwidth bringing up issues such as "wasted newline" and "incorrect comment format". Do kernel developers not use auto-formatters?

For Linux kernel, the first round of review is always style-checking, it's the standard operating procedure. Ideally, the patch submitter should have already used ./scripts/checkpatch.pl and eliminated all formatting issues, but often there are missed ones, or other style issues not identified by the tools as well. To me, it serves as a type of virtue signalling. It's kind of interesting to view the issue from a soci…

Sounds like status signalling, not virtue signalling.

Re: Implement mechanism to wait on any of several futexes

#54
post #38
post #33

Earlier quoted context omitted.

The technical review was great. The tone of the review left a lot to be desired.

The technical review wasn't technical. It was a human roleplaying as a code formatter. The technical content was entirely found in the comment about ABI compatiblity. I didn't see any discussion about tradeoffs, alternative approaches, or a survey of what other systems do for this kind of functionality, or detailed benchmark results. The tone was roughly what I'd want people to give me in a code review -- the only pr…

> The technical review wasn't technical. [...] The technical content was entirely found in the comment about ABI compatiblity.

That review also had a comment about an implicit limit on the number of objects, which is caused by a limit on the amount of physically contiguous memory the kernel memory allocator can obtain at once, and a comment that the code being reviewed would allow for a large increase of the reference count of a couple of important structures. Both appear to be very technical comments to me.

Re: Implement mechanism to wait on any of several futexes

#55
post #46

Personally for me - the problematic part of gaming on Linux has been input(i.e mouse) latency and acceleration profile. I am not sure if this is just my experience but when using libinput on Fedora for example - the cursor movement is not exactly precise. This is not obvious when working but while gaming this is a deal breaker.

There is a "flat" profile that can be toggled in the Gnome Tweak Tool, assuming you're using Gnome in Fedora.

Re: Implement mechanism to wait on any of several futexes

#56
post #32

Linux Gaming with Steam is actually quite nice these days. I spent about 3 years using an Ubuntu desktop for all my gaming at home. Most of the games I played installed via steam and worked great on Linux. The only reason I switched back to a Windows Desktop was that there were just one or two games I specifically wanted to try, but couldn't install to Linux. And once I had switched back (and paid the price for Windo…

I don't have the nerves to bear a native Windows install in my environment, so I turned their LTSC into a "Windows Gaming Container" with VFIO.

Alright, it's a headless VM, but it's pared down with 'unfuck' and other telemetry- and uselessness- neutering projects into something safer. Lookingglass peers into one of my GPU's framebuffers, so it lives inside a window on my Linux host.

It's also been at least a year since I've needed it, though, since Steam and wine cover everything else I'd want to play or run, so it might be time to cut it loose for good.

Re: Implement mechanism to wait on any of several futexes

#57
post #46

Personally for me - the problematic part of gaming on Linux has been input(i.e mouse) latency and acceleration profile. I am not sure if this is just my experience but when using libinput on Fedora for example - the cursor movement is not exactly precise. This is not obvious when working but while gaming this is a deal breaker.

There is a "flat" profile that can be toggled in the Gnome Tweak Tool, assuming you're using Gnome in Fedora.

wow thank you for this comment, for months i've struggled with the annoying acceleration.

Re: Implement mechanism to wait on any of several futexes

#58

The specific proposal (linked to from the article) is https://lkml.org/lkml/2019/7/30/1399

Thanks! Since the submitted title was “Valve proposes Linux kernel changes to improve gaming performance”, we've updated the link from https://steamcommunity.com/games/221410/announcements/detail... to this, which has much more kernel juice.

Re: Implement mechanism to wait on any of several futexes

#59

Earlier quoted context omitted.

In a project like the kernel consistent style is important and the kernel has tools (Coccinelle spatches, checkpatch.pl) to help developers comply with it. There are standards that need to be followed and the bar is the same for everyone.

But why can't the committer just reformat (and otherwise improve) the patch when accepting? Why make the extra round-trips to the submitter?

Do you really suggest that ten reviewers (or however many they may be) do this work each and every one, because it is too much work for the sole submitter to do this once?

It is hard enough to get people to review code as it is. I think everyone would be better off with a little humility and be thankful that other people review their code, even in the cases where the review itself isn't very helpful.

Re: Implement mechanism to wait on any of several futexes

#60

Earlier quoted context omitted.

In a project like the kernel consistent style is important and the kernel has tools (Coccinelle spatches, checkpatch.pl) to help developers comply with it. There are standards that need to be followed and the bar is the same for everyone.

But why can't the committer just reformat (and otherwise improve) the patch when accepting? Why make the extra round-trips to the submitter?

After making those changes, they would need to then retest the code which they might not be able to do as thoroughly as the original author could
Post reply on HN