The 'hend' is already THP-aligned, so the proper check should be
exclusive. This fixes forcing 64kB THP pages for the last 2MB of each
process memory area.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0b2187f1e045bc61207122f0162fdb145214ddad
BUG();
while (khugepaged_scan.address < hend) {
- if (khugepaged_scan.address + hpage_size >= hend) {
+ if (khugepaged_scan.address + hpage_size > hend) {
if (khugepaged_scan.address + HPAGE_CONT_PTE_SIZE < hend) {
hpage_size = HPAGE_CONT_PTE_SIZE;
hpage_nr = HPAGE_CONT_PTE_NR;