~/talk

Copy On Write, Get User Pages, and Mysterious Counters

links:none on file
slides:none on file

Introduces a kernel flag called page on exclusive that prevents anonymous pages from being pinned while shared, so get_user_pages operations either trigger an unsharing (create a read-only private copy) or reuse a page only when folio map count is one. Uses a multi-page pin count (not available for single base pages) and a refcount heuristic (>1024) for pinned single pages. Works upstream but still breaks for THP, get_user_pages_fast races, and needs io_uring pin API changes and more selftests.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 0:44Background on Copy On Write
  3. 3:13Why share anonymous pages
  4. 6:24Mysterious counters in memory
  5. 8:54Copy On Write issues with get_user_pages
  6. 12:26Problems with existing solutions
  7. 13:49Introducing page_is_exclusive
  8. 17:21Current limitations and fixes
  9. 19:31Open discussion and questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.