Posts
171
Following
27
Followers
336

@qyousef @vbabka Exactly. If you do clean ups in the code that you are modifying then all is OK, because the modifications you are making will cause the backports to fail anyway, so the clean ups do not cause extra work. But if you just have random clean ups in code that hasn’t changed in years, if a bug in that code is found, then the backports are going to be a pain fixing all previous version before the “cleanup”.

1
0
2

@vbabka @qyousef I just wasted over an hour fixing patches that should have gone back automatically without my involvement. I don’t think 1/0 vs true/false is worth it. Note, I’m doing this on my own time, where I have other things I rather be doing.

1
0
0

@qyousef Although, I just hit another patch that did not backport properly because of that change 😛 This means I’m going to NACK all clean up changes from now on, citing that it breaks backports.

1
0
1

@qyousef false better than 0 is more for understanding that the value is a boolean an not to be taken as numeric. Sometimes that makes it easier to understand the logic. I’ve been trying to use boolean in those cases as well. This also is a requirement if you ever plan on using Rust 😉

1
0
0

I don’t mind clean up patches, but this is the reason a lot of Linux kernel maintainers frown on them.

https://lore.kernel.org/all/2023120938-unclamped-fleshy-688e@gregkh/

This failure is because of a clean up patch that converted everything to “bool” where it could be:

https://lore.kernel.org/all/20230305155532.5549-3-ubizjak@gmail.com/T/#u

If I had not accepted that clean up, this backport would have been pulled in automatically with no extra work from myself. But because I added that clean up, I now have to fix this for every stable release before that clean up 🙁

1
0
2

@vbabka But now I have to go look at what came about in 3.13 that got rid of the concept of a normal kernel.

1
0
1

@vbabka Heh, I didn’t mean normal as the kernel itself was normal. I meant normal as in the kernel that Fedora normally boots up by default.

0
0
2

Ha! ktest.pl already does this!

https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git/commit/?h=for-next&id=ac2466456eaa0ff9b8cf647c4c52832024bc929f

Thank you Masayoshi Mizuma! You only added this feature back in 2019 🤪

0
1
0

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.

1
0
0

@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.

0
0
0

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.

2
0
0

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. 😠

2
1
1

@ljs @lkundrak @ptesarik @vbabka Honestly, I didn’t notice until now.

0
0
2

@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.

0
0
3

@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.

1
0
3

And it looks to have found a bug right off the bat!

1
0
3

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

1
1
6

[$] Deferred scheduling for user-space critical sections https://lwn.net/Articles/948870/

0
1
1

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.

0
0
0
Show older