/srv/irclogs.ubuntu.com/2022/09/14/#ubuntu-kernel.txt

henrybucherHi got a question about compiling kernel 5.15.0 on 20.04.5. Is this the right room?01:18
sarnoldit's not wrong, but there be something better .. might as well start in on it and see what happens01:20
sarnold(this channel can be very quiet for a very long time)01:20
henrybucherIt's really a newbie question. I am compiling 5.15.0-48 from git://kernel.ubuntu.com/ubuntu/ubuntu-focal.git branch origin/hwe-5.15.0-next, modifying a few configs (tickless kernel) and generating the .deb files.01:23
henrybucherIm using devscripts, tryign to follow by the book. I edit the changelog file with `debchange` then recompile with `debian/rules binary`01:24
henrybucherThe first time it added the +nohz suffix that I added in the changelog. However when I recompile the suffix is not there anymore. What could I possibly be doing wrong? 01:25
henrybucher"suffix not there" meaning that the .deb files are not being generated with the suffix anymore01:25
sarnold"recompile" .. was that a similar debian/rules binary   run? or something else?01:25
henrybucheryes by the book, with `LANG=C fakeroot debian/rules binary`01:26
henrybucherWait I think I used `binary-generic` instead. Does it matter?01:26
henrybucherI just dont want to use the lowlatency kernel01:27
sarnoldsorry, no idea there :/01:27
henrybucherI'd think this would be something that happens to everyone?01:28
sarnoldalmost no one rebuilds their kernels..01:30
sarnoldand most people who build kernels go with the kernel.org ones instead01:30
sarnold(to be clear I'm not saying you're wrong, i just know that there's a lot of extra stuff in our package builds that you don't need to deal with when using the kernel.org ones; and usually people who want their own builds are trying to get a feature from a brand new kernel that isn't in our packages yet)01:31
henrybucherThe only reason why I'm recompiling the kernel is that Ubuntu does not offer a tickless kernel (nohz_full) and I have a few experiments that need it01:40
sarnoldwe've got something like 60 kernels I can't believe one of them isn't tickless :) heh01:40
henrybucherFor real there is none. 01:41
henrybucherEven the lowlatency kernel is not.01:41
sarnoldhonestly that's not a real surprise, I'd kind of expect removing ticks to increase the latency of responses01:42
sarnoldhmm, what's the kernel config setting for this?01:44
sarnoldI see a bunch of kernels built with: CONFIG_HAVE_TIF_NOHZ=y01:44
henrybucherCONFIG_NOHZ_FULL01:46
henrybucherThe use for it is to remove every single LOC interrupt from isolated cores. 01:46
sarnoldheh, I didn't even spot that with an rg NOHZ .. I wonder if that was introduced to the kernels after my most recent config sync..01:46
henrybucherCONFIG_NO_HZ_FULL01:48
henrybucherthis is not a new feature for sure01:49
henrybucherThis is extremely important for low latency trading01:49
henrybucherWe basically on a machine with 24 cores, we isolate 20 of them and leave 4 to handle everything else. On the 20 isolated there must be absolutely zero interrupts01:52
henrybucherAnd preempts01:53
sarnoldhenrybucher: hmm, maybe inspect one of the azure kernels to see if it meets your needs? https://termbin.com/rzd001:57
henrybucherHmm that means I will have to reinstall the OS on my boxes... dont want to do that01:58
henrybucheris that kernel available straight from apt? 01:59
henrybucherDo I need to add any line in to apt/source? 01:59
sarnoldmaybe something like apt install linux-image-azure linux-image-generic-02:02
sarnold(please test on an appropriate machine :D02:02
henrybucherlike a burner02:03
henrybucherthing is im just so close, the kernels are compiling fine and I'm even typign this from within one of them02:05
henrybucherits just this damn suffix02:06
sarnoldoh hmmm when you're *that* close to your goal..02:06
henrybucher:) I will keep digging but thanks a bunch for the tips02:07
henrybucherI think it's something with the order of clean/distclean/debchange/binary02:08
sarnoldI suspect most kernel package builds go through sbuild or similar, something with a bit more process behind it. getting *that* set up is of course also a bit of work..02:11
henrybucherI got it to compile. I think I was running `clean` after `debchange` so my changes were being overwritten. Looks like `clean` means more than `make clean`, it regenerates everything from scratch.03:45
sarnoldsweet!!03:45
sarnoldthanks for reporting back :D03:45
henrybucherIm very thankful for you hanging in there and helping out03:46
sarnoldmy pleasure :)03:47
henrybucherThe final product: https://lucisqr.substack.com/p/compiling-a-tickless-kernel-on-ubuntu?sd=pf03:54
sarnoldoh that's *cool*03:56
henrybucherif you find anything wrong in there, please let me know03:57
sarnoldnice writeup; I'm a bit confused how the isolated cpus are selected; does the kernel automatically set aside two? three? for handling interrupts and nothing else?04:02
henrybucherkernel command line04:03
henrybucheryou pass "isol_cpus=21-23" 04:03
sarnoldaha; is that inclusive at both endpoints or inclusive at one and exclusive at the other?04:05
sarnoldwhat do those cpus wind up *doing* if there's no processes on them that are submitting IOs and so on?04:05
henrybucherwe do have special "pinned" processes that eventually run on them. We plan and pair threads and cores04:41
henrybucherIn a real production machine the ratio would be more 4 cpus for general use and 20 cpus for trading04:42
henrybucherwe move all IRQs to these 4 "system" CPUs04:42
henrybucherIO on the isolated cores is pretty much done with kernel bypass04:42

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!