2

What locking a page (i.e. lock_page() or try_lock_page()) is supposed to do? Can the process reference a memory location in a locked page or it has to wait until that lock is released?

I will be writing some tests and run them to see what actually happens. But I would like to know what should I expect.

Also, is there any way to prevent a process from accessing particular page? something other than read/write protect. I want something to work on the page level.

Thanks.

1 Answer 1

3

lock_page defends struct page fields from concurrent access. It has no business with memory location which this page struct describes. To avoid page "X" allocation for concrete process you may try to modify __alloc_pages_nodemask function in order to get any but not "X" page from the free list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.