History

rcu: Add diagnostic for misaligned rcu_head structures

The push for energy efficiency will require that RCU tag rcu_head structures to indicate whether or not their invocation is time critical. This tagging is best carried out in the bottom bits of the ->next pointers in the rcu_head structures. This tagging requires that the rcu_head structures be properly aligned, so this commit adds the required diagnostics.

Paul E. McKenney committed 14 years ago

Commit 0bb7b591 parent fe15d701 file · +1 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/rcutree.c+1−0
@@ -1707,6 +1707,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu), · 1706 unmodified lines
17071707 unsigned long flags;
17081708 struct rcu_data *rdp;
17091709
1710+ WARN_ON_ONCE((unsigned long)head & 0x3); /* Misaligned rcu_head! */
17101711 debug_rcu_head_queue(head);
17111712 head->func = func;
17121713 head->next = NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t