From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: 'Hugh Dickins' <hugh@veritas.com>, 'Andrew Morton' <akpm@osdl.org>
Cc: linux-mm@kvack.org
Subject: Hugetlb pt sharing - v4 changelog
Date: Tue, 3 Oct 2006 03:28:37 -0700 [thread overview]
Message-ID: <000301c6e6d6$b0566680$bb80030a@amr.corp.intel.com> (raw)
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>
reply other threads:[~2006-10-03 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000301c6e6d6$b0566680$bb80030a@amr.corp.intel.com' \
--to=kenneth.w.chen@intel.com \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox