Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-05-17 Thread Pradeep Satyanarayana
Pradeep Satyanarayana wrote: Roland Dreier wrote: Maybe we should use the /proc/pid/pagemap and /proc/kpageflags files? These files let a userspace process find out which physical frame each virtual page is mapped to and to get the properties of each page frame including the page

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-05-13 Thread Alex Vainman
Roland Dreier Wrote: In order to avoid adding additional dependency to libibverbs, maybe we should just to enhance the get_huge_page_size() so it will support multiple huge page sizes? I think that does make sense. However see my reply to Alexander Schmidt -- maybe there is something

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-05-13 Thread Roland Dreier
Maybe we should use the /proc/pid/pagemap and /proc/kpageflags files? These files let a userspace process find out which physical frame each virtual page is mapped to and to get the properties of each page frame including the page size. Sounds interesting... the only problem is that

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-05-13 Thread Pradeep Satyanarayana
Roland Dreier wrote: Maybe we should use the /proc/pid/pagemap and /proc/kpageflags files? These files let a userspace process find out which physical frame each virtual page is mapped to and to get the properties of each page frame including the page size. Sounds interesting... the

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-05-06 Thread Roland Dreier
In order to avoid adding additional dependency to libibverbs, maybe we should just to enhance the get_huge_page_size() so it will support multiple huge page sizes? I think that does make sense. However see my reply to Alexander Schmidt -- maybe there is something clever we can do with

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-04-22 Thread Alex Vainman
Roland Dreier Wrote: ibv_reg_mr() fails to register a memory region allocated on huge page and not the default page size. This happens because ibv_madvise_range() aligns memory region to the default system page size before calling to madvise() which fails with EINVAL error.

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-01-17 Thread Roland Dreier
But we couldn't find another one without changing the API or changing the kernel. Changing which API? Changing the kernel is a possibility of course. - R. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-01-15 Thread Roland Dreier
ibv_reg_mr() fails to register a memory region allocated on huge page and not the default page size. This happens because ibv_madvise_range() aligns memory region to the default system page size before calling to madvise() which fails with EINVAL error. madvise() fails because it

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-01-14 Thread Alex Vainman
Hi Eli, Sorry fot the late response. If strtol() fails, you may return with an invalid, non zero value for huge page size. Maybe use some temporary variable to hold the intermediate result. If strtol() fails, for any reason, we always return value = 0 for huge page size. This indicates that

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-01-12 Thread Alex Vainman
Hi Roland, I would like to ask you if you have an estimation for when you will review the patches below? Thanks, AlexV Alex Vainman wrote: Hi Roland, Have you had a chance to look at this patch and at the patch I've sent with this email: Subject: [PATCH] libibverbs: Add huge page

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2010-01-12 Thread Eli Cohen
On Sun, Nov 29, 2009 at 07:08:08PM +0200, Alex Vainman wrote: + p_hpage_val = strstr(buf, label); + if (!p_hpage_val) { + errno = EINVAL; + return -1; + } + p_hpage_val += strlen(label); + + errno = 0; + ret_val = strtol(p_hpage_val,

Re: [PATCH] libibverbs: Add huge page support to ibv_madvise_range()

2009-12-08 Thread Alex Vainman
Hi Roland, Have you had a chance to look at this patch and at the patch I've sent with this email: Subject: [PATCH] libibverbs: Add huge page support to ibv_madvise_range() Sent: Sun, 29 Nov 2009 19:08:08 +0200? Thanks, Alexv Alex Vainman wrote: ibv_reg_mr() fails to register a memory region