History

hrtimer: Use sequence counter with associated raw spinlock

A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_raw_spinlock_t data type, which allows to associate a raw spinlock with the sequence counter. This enables lockdep to verify that the raw spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead.

Ahmed S. Darwish committed 6 years ago

Commit af5a06b1 parent 5c73b9a2 files · +11 −4Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/hrtimer.h+1−1
@@ -159,7 +159,7 @@ struct hrtimer_clock_base { · 158 unmodified lines
159 struct hrtimer_cpu_base *cpu_base;159 struct hrtimer_cpu_base *cpu_base;
160 unsigned int index;160 unsigned int index;
161 clockid_t clockid;161 clockid_t clockid;
162 seqcount_t seq;162 seqcount_raw_spinlock_t seq;
163 struct hrtimer *running;163 struct hrtimer *running;
164 struct timerqueue_head active;164 struct timerqueue_head active;
165 ktime_t (*get_time)(void);165 ktime_t (*get_time)(void);

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