On 2/8/19 4:38 PM, Jens Axboe wrote: >> Technically, this accounting is probably a bit off; I think if you >> pass in a vector of 4K areas from 1G hugepages, you're going to pin >> factor 0x40000 more memory than you think you're pinning. >> (get_user_pages() counts references against the head page of a >> compound page; nothing in the kernel can tell afterwards which part of >> the hugepage you're using.) I'm not sure how much of a problem that >> is, but it should probably at least be documented. Unless I'm just >> missing something? > > No I think you are right, it doesn't account for the hugepage size if > you pass in huge pages. I'll fix that up. I made a note of it in the man page, I don't think this is unreasonable (or unexpected) behavior. -- Jens Axboe