dde_linux: set max timeout for rcu_needs_cpu

Adhere to include/linux/rcutiny.h behaviour, which sets the max timeout
for rcu_needs_cpu. Without the commit, in the most cases the timeout value
is zero (or random since the pointer is on stack uninitialized), which leads
to programming very short timeouts again and again, making the system never
idle.

Issue #4540
This commit is contained in:
Alexander Boettcher 2022-06-28 10:18:50 +02:00 committed by Christian Helmuth
parent a23f6209ae
commit 757fdba9fd

View File

@ -12,6 +12,7 @@
*/
#include <linux/types.h>
#include <linux/time64.h> /* KTIME_MAX */
extern void __rcu_read_lock(void);
void __rcu_read_lock(void) { }
@ -22,5 +23,7 @@ void __rcu_read_unlock(void) { }
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
{
if (nextevt)
*nextevt = KTIME_MAX;
return 0;
}