|
|
Subscribe / Log in / New account

Tracking pages from get_user_pages()

Tracking pages from get_user_pages()

Posted Apr 18, 2019 17:13 UTC (Thu) by stevie-oh (subscriber, #130795)
Parent article: Tracking pages from get_user_pages()

I'm assuming that instead of "unsigned long *bv_pfn" the article should read "unsigned long bv_pfn" (which I personally believe ought to be uintptr_t, but that's another story.)


to post comments

Fixed

Posted Apr 18, 2019 17:17 UTC (Thu) by corbet (editor, #1) [Link]

Yes, that was a mistake; fixed now.

Tracking pages from get_user_pages()

Posted Apr 18, 2019 18:28 UTC (Thu) by willy (subscriber, #9762) [Link] (1 responses)

PFNs are most definitely not uintptr_t. For example, on a 32-bit platform with PAE, PFNs can use up to 28 bits, letting us support up to 1TB of memory with a 4kB page size. They really are just an integer.

Tracking pages from get_user_pages()

Posted Apr 18, 2019 19:35 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link]

uintptr_t is just an integer as well. If it exists, it's a typedef name for an unsigned integer type which is large enough to store a pointer value. As page frame numbers are smaller than pointers due to coarser granularity, that's obviously not a property which would be needed here but it wouldn't do any harm, either.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds