Ha! ktest.pl
already does this!
Thank you Masayoshi Mizuma! You only added this feature back in 2019 🤪
Except, it looks like it overwrote the default kernel, making my machine not able to boot the normal kernel. Had to play magic to get it back booting again.
Grub2 tries to make it so easy that it makes it suck for simply things.
@oleksandr I have several test boxes that have various boot loaders. This one I haven’t touched in a while, and is the first time I noticed it. It seems to be the default for Fedora (which I’m a Debian guy). I need to get it to work for ktest.pl
anyway, as others may need it.
OK, finally fixed it with:
grubby --add-kernel=/boot/vmlinuz-test --initrd=/boot/initramfs-test.img --title 'Test Kernel'
But now I have to figure out how to have ktest read this shit and know which option to set grub-reboot
to.
I really hate grub2
. Now they hide the menu entries in a separate directory. This really makes it difficult when testing kernels and adding tweaks to the command line. It now doesn’t seem to find my test kernel and I have no idea how to make it do so. 😠
@ptesarik @ljs @vbabka Noted. There’s a lot of bad annotations, and most of them I ignore because they are not obvious that they are indeed wrong. Things like “stats” use to be unlikely (before they were switched over to static_branch
). Because they were runtime switches and the idea is “if you have it disabled, you likely want it to be faster”. So having it enabled would be 100% incorrect. But that was indeed the correct outcome.
Before sending any patch to fix or remove a likely/unlikely() I analyze it to understand the reason it is incorrect. I never blindly send a patch because the tool said so. I send it after I understand the situation. A lot of the fixes I have done were because the likely use to be correct, but a change occurred that made it incorrect. One example of this was a case that a condition was added before the unlikely annotation condition to always be true. The added condition exited the function in 90% of the cases that would have caused the unlikely condition to be unlikely. Now when that condition is hit, it was 90% likely.
Here’s an article I wrote while at VMware. Read it now before they take it down (VMware no longer exists!) I need to copy it too.
@ljs @vbabka This tooling has been around for over a decade. During the month of December, I figure I can run it on my server and workstation as this month is usually slower than other months. But I recently upgraded my server (28 cores / 56 hyperthreaded) and since the profiling updates a single integer (no locking, I’m looking for estimates not real numbers) but the cache line contention is making it impact this server much harder than my older server. It has actually slowed this down much more. I’m thinking of just running it for one week and not three like I use to.
Anyway, the likely/unlikely can be a big performance increase. I sped up the ftrace ring buffer by around 50% by placing strategic likely and unlikely around.
It’s the month of December. Do you know what that means? It means it’s time to run my workstation and server with branch tracing enabled! https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/compiler.h#n50
[$] Deferred scheduling for user-space critical sections https://lwn.net/Articles/948870/ #LWN
Even though, I disabled suspend, I still get these broadcast notices! 😆
Broadcast message from gdm@bxtest on tty1 (Thu 2023-10-26 00:01:04 EDT):
The system will suspend now!
But nothing happens, as suspend is now a nop.
OK, I just upgraded my baremetal machine from Fedora 33 to Fedora 38 (by stepping through 35 and 37 as in between steps). I haven’t used this machine in a long time as I now do most of my testing with VMs. But I’m doing some performance testing that I wanted to know baremetal numbers.
WTF Fedora! 38 introduced a “suspend in 15 minutes if not logged in”. It doesn’t care if you are ssh’ed in or not! What’s worse is that this machine isn’t even hooked to a monitor (serial console only).
Luckily, I found a link that shows me how to disable that. 😛
Don’t you hate it when you go into one of your git repos to do some updates, and realized you have a large diff of uncommitted code of a work in progress that you left and forgot about! 😛