]> git.hungrycats.org Git - linux/commit
[PATCH] hugetlb unmap_vmas() SMP && PREEMPT fix
authorAndrew Morton <akpm@digeo.com>
Sat, 8 Mar 2003 11:26:43 +0000 (03:26 -0800)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Sat, 8 Mar 2003 11:26:43 +0000 (03:26 -0800)
commitf4d55ef3b81d1187f3a2c93b91a87127e5516bd5
tree3d993b3dba32cdc7ee8e0bfd94b7ca97ac1c47da
parent4d5806989828b8d67ee6cec0e99e19c9a05b6fdd
[PATCH] hugetlb unmap_vmas() SMP && PREEMPT fix

Patch from Kevin Pedretti <pedretti@ieee.org>

The unmap_vmas() logic is designed to chew away at all the pages without
holding off preemption for too long.  But with CONFIG_SMP=y and
CONFIG_PREEMPT=y the number of pages which we batch up between rescheduling
opportunities is not a multiple of HPAGE_SIZE.  So unmap_vmas() ends up
calling unmap_hugepage_range() with a poorly aligned&sized region, and it
goes BUG.

Fix that up by ensuring that we always work across hugepage regions in
HPAGE_SIZE chunks.
include/linux/hugetlb.h
mm/memory.c