clear_range_l1, clear_range_middle: Fix handling contiguous PTE

Change-Id: I2609c94d7f9342fe25aa9a5cfc208375274d46fa
This commit is contained in:
Masamichi Takagi
2018-12-13 16:54:05 +09:00
committed by Dominique Martinet
parent c1270cdf6d
commit 641d9f1b39
5 changed files with 97 additions and 98 deletions

View File

@@ -266,17 +266,19 @@ static void shmobj_destroy(struct shmobj *obj)
__FUNCTION__, page->phys);
}
/* Other call sites of page_unmap are:
* (1) MADV_REMOVE --> ... --> ihk_mc_pt_free_range()
* (2) munmap --> ... --> free_process_memory_range()
*/
if (page_unmap(page)) {
size_t free_pgsize = 1UL << obj->pgshift;
size_t free_size = 1UL << obj->pgshift;
ihk_mc_free_pages_user(page_va, npages);
/* Track change in page->count for shmobj.
* It is decremented in here or shmobj_invalidate()
* or clear_range().
*/
dkprintf("%lx-,%s: calling memory_stat_rss_sub(),phys=%lx,size=%ld,pgsize=%ld\n",
phys, __func__, phys, 1UL << obj->pgshift,
1UL << obj->pgshift);
memory_stat_rss_sub(1UL << obj->pgshift,
1UL << obj->pgshift);
phys, __func__, phys, free_size,
free_pgsize);
memory_stat_rss_sub(free_size, free_pgsize);
kfree(page);
}
#if 0