0

enter image description hereFacing below warning message in 5.14 kernel module while taking rcu_read_lock()/unlock(), but the same code is working in 3.14 kernel.

[  +0.000004] Voluntary context switch within RCU read-side critical section!
[  +0.000005] WARNING: CPU: 3 PID: 93953 at kernel/rcu/tree_plugin.h:318 rcu_note_context_switch+0x24d/0x270 

Based on my analysis, found a difference that CONFIG_PREEMPT_RCU=Y is enabled in 5.14 kernel but not in 3.14 kernel. Moreover, current RCU implementation suits to classical RCU which may not require preemption. So planned to disable CONFIG_PREEMPT_RCU=n to make my code work.

But, I don't find the option to disable in make menuconfig. Could some one help me , how to disable the CONFIG_PREEMPT_RCU=n in 5.14 kernel.

user1720713
  • 184
  • 8
  • 1
    If you configure the kernel with `make menuconfig`, then use `/PREEMPT_RCU` for search the option. According to the [code](https://elixir.bootlin.com/linux/v5.14.21/source/kernel/rcu/Kconfig#L17), the option should exist under `RCU Subsystem` submenu. – Tsyvarev Apr 04 '23 at 22:01
  • Thanks for the response, I have added the picture of RCU subsystem in the above post. But i don't see the option to disable. Could you please check and let me know. – user1720713 Apr 04 '23 at 22:11
  • "*I have added the picture of RCU subsystem in the above post.*" -- Add the results of the search that @Tsyvarev requested. However according to the **Kconfig** file that was provided, there is no menu prompt displayed for that item (i.e. there's no prompt string in quotes after `boolean`). [Please do not post images of terminal text](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors) because they are hard to use. Terminal text should be posted directly as plain text in your question. – sawdust Apr 05 '23 at 04:25

0 Answers0