1__LOCK_PAGE(9) Memory Management in Linux __LOCK_PAGE(9)
2
3
4
6 __lock_page - get a lock on the page, assuming we need to sleep to get
7 it
8
10 void __lock_page(struct page * page);
11
13 page
14 the page to lock
15
17 Ugly. Running sync_page in state TASK_UNINTERRUPTIBLE is scary. If some
18 random driver´s requestfn sets TASK_RUNNING, we could busywait. However
19 chances are that on the second loop, the block layer´s plug list is
20 empty, so sync_page will then return in state TASK_UNINTERRUPTIBLE.
21
23Kernel Hackers Manual 2.6. June 2019 __LOCK_PAGE(9)