[openib-general] RFC: [PATCH untested] IB/uverbs: optimize registration for huge pages
Michael S. Tsirkin
mst at mellanox.co.il
Wed Aug 16 10:15:21 PDT 2006
Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: RFC: [PATCH untested] IB/uverbs: optimize registration for huge pages
>
> Michael> How does this look? Is this the intended usage?
>
> Looks OK, although I would like to see test results too. However I
> wonder what get_user_pages() does with a huge page region -- does it
> give back huge pages or does it waste a lot of effort creating 4KB
> pages to cover the region?
It creates 4KB pages.
> Also, this
>
> > + u32 mask = 0;
>
> and this
>
> > + mem->page_size = ffs(mask) ? 1 << (ffs(mask) - 1) : (1 << 31);
>
> makes me think that maybe we should change mem->page_size to an
> unsigned long, since it's quite possible that a memory region spans
> more than 2GB physically contiguous (especially if support for GB
> pages on amd64 is added).
We can, although I don't know how practical it is, and ffs only works on int :(
--
MST
More information about the general
mailing list