Now that we have added breaks in the wait queue scan and allow bookmark on scan position, we put this logic in the wake_up_page_bit function. We can have very long page wait list in large system where multiple pages share the same wait list. We break the wake up walk here to allow other cpus a chance to access the list, and not to disable the interrupts when traversing the list for too long. This reduces the interrupt and rescheduling latency, and excessive page wait queue lock hold time. [ v2: Remove bookmark_wake_function ]
Showing the changes to kernel (1 of 3 files). Show all
Unified · Split
| @@ -165,6 +165,13 @@ void __wake_up_locked_key(struct wait_queue_head *wq_head, unsigned int mode, vo · 164 unmodified lines | ||
| 165 | 165 | } |
| 166 | 166 | EXPORT_SYMBOL_GPL(__wake_up_locked_key); |
| 167 | 167 | |
| 168 | +void __wake_up_locked_key_bookmark(struct wait_queue_head *wq_head, | |
| 169 | + unsigned int mode, void *key, wait_queue_entry_t *bookmark) | |
| 170 | +{ | |
| 171 | + __wake_up_common(wq_head, mode, 1, 0, key, bookmark); | |
| 172 | +} | |
| 173 | +EXPORT_SYMBOL_GPL(__wake_up_locked_key_bookmark); | |
| 174 | + | |
| 168 | 175 | /** |
| 169 | 176 | * __wake_up_sync_key - wake up threads blocked on a waitqueue. |
| 170 | 177 | * @wq_head: the waitqueue |