Messages in this thread | | | Date | Thu, 18 May 2006 12:13:50 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [PATCH] Fix do_mlock so page alignment is to hugepage boundries when needed |
| |
On Wed, 17 May 2006, Eric Paris wrote: > > This patch still solves the problem of the kernel currently being more > restrictive on what we accept from userspace for the length of the mlock > if it is a hugepage rather than a regular page. With a regular page we > will round the value from userspace and happily go about our business of > mlocking. For a hugepage it just rejects it if userspace doesn't align > it themselves. This allows the kernel to do the same work for hugepages > that it does for normal pages.
You do have a point that there's an inconsistency there. But we could argue a long time what's inconsistent with what - I'd say it's mlock being inconsistent with mprotect, munmap, msync, madvise, etc. I don't see an outright reason to change from the current behaviour.
You do realize that there's almost no point in mlocking a hugepage area anyway? (I wrote that first without the "almost", but now with hugepage faulting, it does provide another way to fault in all the pages at once.)
Hugh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |