From: Zbigniew Jędrzejewski-Szmek Date: Mon, 11 Oct 2021 07:40:43 +0000 (+0200) Subject: Merge pull request #20744 from yuwata/udev-netlink X-Git-Tag: v250-rc1~539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54ccd706badc4319a5491028efb2772b7ffdfe90;p=thirdparty%2Fsystemd.git Merge pull request #20744 from yuwata/udev-netlink udev: use netlink more aggressively I'm pasting the comment from https://github.com/systemd/systemd/pull/20744#issuecomment-934485287 which is quite informative. The code wasn't changed significantly since then: atenart commented 6 days ago: > I ran tests without (93caec7) and with this PR (06735f2) on Fedora, having a few udev rules > using attributes eligible to be cached and creating 50 veth on 4 CPUs. Although the time spent > running the test is variable between runs, I generally saw an improvement when using this PR, e.g: > > 249-910-g93caec7: > real 0m3.691s > user 0m0.022s > sys 0m1.338s > > 249-920-g06735f2: > real 0m2.950s > user 0m0.005s > sys 0m0.399s > > On a different system than the one used above, I even saw a 40% improvement; results depend > on many parameters (distro, udev rules, concurrent daemons accessing sysfs, etc.). > > Because it's quite hard to measure the improvement here (as the kernel behave differently between > the two test cases), I also ran tests using a modified kernel not hitting the trylock logic. There was > an improvement with this PR as well. (Take this with a grain of salt though, as the kernel was > modified not using patches approved upstream). --- 54ccd706badc4319a5491028efb2772b7ffdfe90