linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Hugetlb pt sharing - v4 changelog
@ 2006-10-03 10:28 Chen, Kenneth W
  0 siblings, 0 replies; only message in thread
From: Chen, Kenneth W @ 2006-10-03 10:28 UTC (permalink / raw)
  To: 'Hugh Dickins', 'Andrew Morton'; +Cc: linux-mm

Short description of v4 changelog (only major items):

(1) went back to earlier mods using i_mmap_lock for locking pmd
    sharing and unsharing.  I dropped down_read_trylock() in the
    huge_pmd_share().  I think it is safe to do so with just
    i_mmap_lock: even if one mm (call it P1) is performing mprotect,
    changing vm_flags while race with another mm (call it P2) in the
    fault path.  P2 picks up old P1's vm_flags and decided it can
    share, increment ref count on the page table page.  P1 in the
    mean time changes vm_flags, get to hugetlb_change_protection and
    it will detect the page is shared and P1 will simply drop the pmd
    link.  P1 will fault again on the address range that unshared with
    correct protection set in its page table.

    The new unmap_hugepage_range() has to check vma->vm_file, it is
    undesirable.  I hope Hugh is OK with a change in the generic code
    to rearrange the order of unmap and vm_file freeing.

(2) rearranged condition check on shareable page table.  I've now break
    it out into two parts: one to check faulting vma's shareable criteria
    for efficiency reason. Once that is satisfied, we then walk the priority
    tree to search for a suitable target vma (or page table to be precise)
    for sharing.

(3) double checked on the radix and heap index used for searching priority
    tree.  It is sad that there are inconsistency in the page offset used
    by the two trees. The page cache radix tree uses HPAGE_SIZE as one unit
    while priority tree uses normal page size throughout, regardless whether
    it is a hugetlb or normal vma.  Oh well, no big deal.

(4) tested on x86_64.

- Ken

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-03 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-03 10:28 Hugetlb pt sharing - v4 changelog Chen, Kenneth W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox