* Re: 2.6.22-rc4-mm1 [not found] <20070606020737.4663d686.akpm@linux-foundation.org> @ 2007-06-07 12:47 ` KAMEZAWA Hiroyuki 2007-06-07 15:34 ` 2.6.22-rc4-mm1 Andrew Morton 0 siblings, 1 reply; 3+ messages in thread From: KAMEZAWA Hiroyuki @ 2007-06-07 12:47 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel, clameter, linux-mm Question. While writing memory unplug, I noticed this code. == static int fixup_anon_page(pte_t *pte, unsigned long start, unsigned long end, void *priv) { struct vm_area_struct *vma = priv; struct page *page = vm_normal_page(vma, start, *pte); if (page && PageAnon(page)) page->index = linear_page_index(vma, start); return 0; } static int fixup_anon_pages(struct vm_area_struct *vma) { struct mm_walk walk = { .pte_entry = fixup_anon_page, }; return walk_page_range(vma->vm_mm, vma->vm_start, vma->vm_end, &walk, vma); } == I think that 'pte' passed to fixup_anon_page() by walk_page_range() is not guaranteed to be 'Present'. Then, vm_normal_page() will show print_bad_pte(). If this never occur now, I'll add my own check code for memory migration by kernel here. (Sorry, I can't find who should be CCed.) -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.6.22-rc4-mm1 2007-06-07 12:47 ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki @ 2007-06-07 15:34 ` Andrew Morton 2007-06-08 0:31 ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki 0 siblings, 1 reply; 3+ messages in thread From: Andrew Morton @ 2007-06-07 15:34 UTC (permalink / raw) To: KAMEZAWA Hiroyuki Cc: linux-kernel, clameter, linux-mm, Matt Mackall, David Rientjes On Thu, 7 Jun 2007 21:47:06 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > Question. > > While writing memory unplug, I noticed this code. > == > static int > fixup_anon_page(pte_t *pte, unsigned long start, unsigned long end, void *priv) > { > struct vm_area_struct *vma = priv; > struct page *page = vm_normal_page(vma, start, *pte); > > if (page && PageAnon(page)) > page->index = linear_page_index(vma, start); > > return 0; > } > > static int fixup_anon_pages(struct vm_area_struct *vma) > { > struct mm_walk walk = { > .pte_entry = fixup_anon_page, > }; > > return walk_page_range(vma->vm_mm, > vma->vm_start, vma->vm_end, &walk, vma); > } I assume the above is your code - it's not in the tree? > > I think that 'pte' passed to fixup_anon_page() by walk_page_range() > is not guaranteed to be 'Present'. yup - the pagewalker only checks for !pte_none(). > Then, vm_normal_page() will show print_bad_pte(). > If this never occur now, I'll add my own check code for memory migration by kernel here. Yes, you'll need to perform additional filtering where appropriate. > (Sorry, I can't find who should be CCed.) Matt and David did most of the work here. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.6.22-rc4-mm1 2007-06-07 15:34 ` 2.6.22-rc4-mm1 Andrew Morton @ 2007-06-08 0:31 ` KAMEZAWA Hiroyuki 0 siblings, 0 replies; 3+ messages in thread From: KAMEZAWA Hiroyuki @ 2007-06-08 0:31 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, clameter, linux-mm, Matt Mackall, David Rientjes On Thu, 7 Jun 2007 08:34:58 -0700 Andrew Morton <akpm@linux-foundation.org> wrote: > > I assume the above is your code - it's not in the tree? > Ah, that code was disappeared in -mm2. But it informed me that I should consider memory unplug v.s. sys_mremap case... Thanks, anyway. -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-08 0:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20070606020737.4663d686.akpm@linux-foundation.org>
2007-06-07 12:47 ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki
2007-06-07 15:34 ` 2.6.22-rc4-mm1 Andrew Morton
2007-06-08 0:31 ` 2.6.22-rc4-mm1 KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox