Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: enable timestamp static key if CPU

For systems that use CPU isolation (via nohz_full), creating or destroying
a socket with SO_TIMESTAMP, SO_TIMESTAMPNS or SO_TIMESTAMPING with flag
SOF_TIMESTAMPING_RX_SOFTWARE will cause a static key to be enabled/disabled.
This in turn causes undesired IPIs to isolated CPUs.

So enable the static key unconditionally, if CPU isolation is enabled,
thus avoiding the IPIs.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/ZgrUiLLtbEUf9SFn@tpad
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Marcelo Tosatti and committed by
Jakub Kicinski
2f3c7195 34c58c89

+5
+5
net/core/dev.c
··· 77 77 #include <linux/hash.h> 78 78 #include <linux/slab.h> 79 79 #include <linux/sched.h> 80 + #include <linux/sched/isolation.h> 80 81 #include <linux/sched/mm.h> 81 82 #include <linux/smpboot.h> 82 83 #include <linux/mutex.h> ··· 11912 11911 NULL, dev_cpu_dead); 11913 11912 WARN_ON(rc < 0); 11914 11913 rc = 0; 11914 + 11915 + /* avoid static key IPIs to isolated CPUs */ 11916 + if (housekeeping_enabled(HK_TYPE_MISC)) 11917 + net_enable_timestamp(); 11915 11918 out: 11916 11919 if (rc < 0) { 11917 11920 for_each_possible_cpu(i) {