From: Caspar Z. <ca...@ca...> - 2011-09-29 11:26:42
|
Sorry, this one is deprecated. I'll re-submit an updated version shortly. On 09/19/2011 02:45 PM, Caspar Zhang wrote: > > thp02 - detect mremap bug when THP is enabled. > > There was a bug in mremap THP support, sometimes crash happened > due to the following reason according to developers: > > "alloc_new_pmd was forcing the allocation of a pte before calling > move_huge_page and that resulted in a VM_BUG_ON in move_huge_page > because the pmd wasn't zero." > > There are 4 cases to test this bug: > > 1) old_addr hpage aligned, old_end not hpage aligned, new_addr > hpage aligned; > 2) old_addr hpage aligned, old_end not hpage aligned, new_addr not > hpage aligned; > 3) old_addr not hpage aligned, old_end not hpage aligned, new_addr > hpage aligned; > 4) old_addr not hpage aligned, old_end hpage aligned, new_addr not > hpage aligned. > > Signed-off-by: Caspar Zhang<cz...@re...> > --- > runtest/mm | 1 + > testcases/kernel/mem/thp/thp02.c | 133 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 134 insertions(+), 0 deletions(-) > create mode 100644 testcases/kernel/mem/thp/thp02.c > |