Re: [PATCH] hugepage: support ZERO_PAGE()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mel Gorman
Date: Tuesday, September 2, 2008 - 7:22 am

On (02/09/08 10:21), KOSAKI Motohiro didst pronounce:

Also when MAP_NORESERVE is specified, there is not guarantee the huge
pages exist.


I believe the impact is that core dumps could take longer and be of a larger
size than necessary if uninstantiated pages are not skipped.  However, if the
zero page was used for anything other than core dumps, you have to be sure
that only the base pages worth of data is being read. I'm not convinced your
patch is doing that. For example, what happens if you ptrace an application
and read the memory area?


s/supoort/support/


Offhand, I'm not 100% certain but I think it's because a shared mapping
should always fault the page in case another process sharing the mapping
has put real data there.


It's not a bit deal but as you link against libhugetlbfs, you could have
also included the header and called gethugepagesize().


This does not look safe in the ptrace case at all. If I ptrace the app
to read a hugetlbfs-backed region, get_user_pages() gets called and then
this. In that case, it would appear that a 4K page would be put in place
where a hugepage is expected. What am I missing?


-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Wed Aug 27, 10:24 pm)
some problem with "git pull", Peter Teoh, (Wed Aug 27, 10:38 pm)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Thu Aug 28, 7:59 am)
Re: [PATCH] coredump_filter: add hugepage core dumping, Hugh Dickins, (Thu Aug 28, 9:38 am)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Thu Aug 28, 4:35 pm)
Re: [PATCH] coredump_filter: add hugepage core dumping, Hidehiro Kawai, (Sun Aug 31, 11:00 pm)
[PATCH] hugepage: support ZERO_PAGE(), KOSAKI Motohiro, (Mon Sep 1, 6:21 pm)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Mon Sep 1, 7:18 pm)
Re: [PATCH] hugepage: support ZERO_PAGE(), Mel Gorman, (Tue Sep 2, 7:22 am)
Re: [PATCH] hugepage: support ZERO_PAGE(), Mel Gorman, (Tue Sep 2, 8:13 am)
Re: [PATCH] hugepage: support ZERO_PAGE(), Mel Gorman, (Tue Sep 2, 9:27 am)
Re: [PATCH] hugepage: support ZERO_PAGE(), Adam Litke, (Tue Sep 2, 10:27 am)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Fri Sep 5, 1:06 am)
Re: [PATCH] coredump_filter: add hugepage core dumping, Hidehiro Kawai, (Sun Sep 7, 6:51 pm)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Tue Sep 9, 4:20 am)
Re: [PATCH] coredump_filter: add hugepage core dumping, Roland McGrath, (Tue Sep 9, 11:04 pm)
Re: [PATCH] coredump_filter: add hugepage core dumping, KOSAKI Motohiro, (Tue Sep 9, 11:53 pm)