On Wed, Nov 3, 2010 at 11:55 PM, <[email protected]> wrote: > The basic purpose of this is a to test if it is possible to map and > unmap /dev/zero, and to read and write the mapping. Being inspired by > two bugs in the past, the design of the test was added some variations > based on the reproducers for them. It also accept an option to > mmap/munmap anonymous pages. > > One is to trigger panic with transparent hugepage feature that > split_huge_page is very strict in checking the rmap walk was > perfect. Keep it strict because if page_mapcount isn't stable and just > right, the __split_huge_page_refcount that follows the rmap walk could > lead to erratic page_count()s for the subpages. The bug in fork lead > to the rmap walk finding the parent huge-pmd twice instead of just > one, because the anon_vma_chain objects of the child vma still point > to the vma->vm_mm of the parent. That trips on the split_huge_page > mapcount vs page_mapcount check leading to a BUG_ON. > > The other bug is mmap() of /dev/zero results in calling map_zero() > which on RHEL5 maps the ZERO_PAGE in every PTE within that virtual > address range. Since the application which maps a region from 5M to > 16M in size is also multi-threaded the subsequent munmap() of > /dev/zero results is TLB shootdowns to all other CPUs. When this > happens thousands or millions of times the application performance is > terrible. The mapping ZERO_PAGE in every pte within that virtual > address range was an optimization to make the subsequent pagefault > times faster on RHEL5 that has been removed/changed upstream. > > Signed-off-by: CAI Qian <[email protected]> > --- > v8: add an option to utilize KSM; no need to open /dev/zero for > anonymous page testing. > v7: another "(void)" fix > v6: really use git format; check return from children; cleanup. > v5: add an option to test anonymous pages; move open() into setup(). > v4: comment fix; code cleanup. > v3: really mmap /dev/zero; replace _exit() with exit(); fix patch > format. > v2: incorporate comments from Mike and Garrett.
Looks fine. Please attach the file as a patch and also add a necessary entry in one of the runtest files. If it looks ok Subrata, please commit. Thanks, -Garrett ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
