

This was truly a wtf moment of the month.
Last time I spent time watching him was when he freaking fixed the kexec syscall for IBM PowerPCs. for free
I mean no harm.
you have seen nothing.


This was truly a wtf moment of the month.
Last time I spent time watching him was when he freaking fixed the kexec syscall for IBM PowerPCs. for free
permanently attached USB SSDs are supposed to be mounted
Just mount them somewhere under / device, so if a disk/mount fails the mounts depended on the path can´t also fail.
I keep my permanent mounts at /media/ and I have a udev rule, that all auto mounted media goes there, so /mnt stays empty. A funny case is that my projects BTRFS sub-volume also is mounted this way, although it is technically on the same device.
For example, the new .config directory in the home directory.
I hope slowly but surely no program will ever dump its config(s) as ~/.xyz.conf (or even worse in a program specific ~/.thisapp/;
The ~/.config/ scheme works as long as the programs don’t repeat the bad way of dumping files as ~/.config/thisconfig.txt. (I’m looking at you kde folks…) A unique dir in .config directory should be mandatory.
If I ever need to shed some cruft accumulated over the years in ~/.config/ this would make it a lot easier.


nohz_full confusingly also helps with power usage… if the cpu doesn’t have anything to run, no point waking it up with a scheduler-tick IPI… but also no point trying to run the scheduler if a core is peaking with a single task… With nohz the kernel overheard basically ceases to exist for a task while the it is running. (Thought the overhead just moves to non-nohz cpu cores)


To be fair, there should be some heuristics to boost priority of anything that has received input from the hardware. (a button click e.g.) The no-care-latency jobs can be delayed indefinitely.


Why can Windows do it when Linux can’t?
Windows lies to you. The only way they don’t get this problem is that they are reserving some CPU bandwidth for the UI beforehand. Which explains the 1-2% y-cruncher worse results on windows.


I agree that UI should always take priority. I shouldn’t have to do anything to guarantee this.
I have HZ_1000, tickless kernel with nohz_full set up. This all has a throughput/bandwidth cost (about 2%) in exchange for better responsiveness by default.
But this is not enough, because the short burst UI tasks need near-zero wake-up latency… By the time the task scheduler has done its re-balancing the UI task is already sleeping/halted again, and this cycle repeats. So the nice/priorities don’t work very well for UI tasks. Only way a UI task can run immediately is if it can preempt something or if the system has a somewhat idle CPU to put it on.
The kernel doesn’t know any better which tasks are like this. The on-going EEVDF, sched_ext scheduler projects attempt to improve the situation. (EEVDF should allow specifying the desired latency, while sched_ext will likely allow tuning the latency automatically)


No, I definitely want it to use as many resources it can get.
taskset -c 0 nice -n+5 bash -c 'while :; do :; done' &
taskset -c 0 nice -n+0 bash -c 'while :; do :; done'
Observe the cpu usage of nice +5 job: it’s ~1/10 of the nice +0 job. End one of the tasks and the remaining jumps back to 100%.
Nice’ing doesn’t limit the max allowed cpu bandwidth of a task; it only matters when there is contention for that bandwidth, like running two tasks on the same CPU thread. To me, this sounds exactly what you want: run at full tilt when there is no contention.


“The kernel runs out of time to solve the NP-complete scheduling problem in time.”
More responsiveness requires more context-switching, which then subtracts from the available total CPU bandwidth. There is a point where the task scheduler and CPUs get so overloaded that a non-RT kernel can no longer guarantee timed events.
So, web browsing is basically poison for the task scheduler under high load. Unless you reserve some CPU bandwidth (with cgroups, etc.) beforehand for the foreground task.
Since SMT threads also aren’t real cores (about ~0.4 - 0.7 of an actual core), putting 16 tasks on a 16/8 machine is only going to slow down the execution of all other tasks on the shared cores. I usually leave one CPU thread for “housekeeping” if I need to do something else. If I don’t, some random task is going to be very pleased by not having to share a core. That “spare” CPU thread will be running literally everything else, so it may get saturated by the kernel tasks alone.
nice +5 is more of a suggestion to “please run this task with a worse latency on a contended CPU.”.
(I think I should benchmark make -j15 vs. make -j16 to see what the difference is)
If I had published a popular library under LGPL, and then found out that a chip company stole my code by ignoring/removing the license (change to less restrictive in attribution) I would perhaps go as far as subtly block my code from ever properly functioning on the company’s chips, until the license is respected.
People might have forgot what happened in linux kernel with the “nvidia shim module”. Those were actually banned, non-gpl compatible kernel module cannot use gpl-only symbols from the kernel. What happened here is even worse, straight up violating the license from the authors.
GPL license should have a version that could cheaply be defended by the victim of the license violation, if a verbatim violating copy is found. Some €€/month bill could pileup while a violating copy is proven to be distributed.
edit: minor fixes.