From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 04/21] xenpaging: populate paged-out pages unconditionally Date: Fri, 26 Nov 2010 14:49:05 +0100 Message-ID: <20101126134902.806049636@aepfle.de> References: <20101126134901.384130351@aepfle.de> Return-path: Content-Disposition: inline; filename=xen-unstable.xenpaging.populate_only_if_paged.patch List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Populate a page unconditionally to avoid missing a page-in request. If the page is already in the process of being paged-in, the this vcpu will be stopped and later resumed once the page content is usable again. This matches other p2m_mem_paging_populate usage in the source tree. Signed-off-by: Olaf Hering --- xen/common/grant_table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- xen-unstable.hg-4.1.22433.orig/xen/common/grant_table.c +++ xen-unstable.hg-4.1.22433/xen/common/grant_table.c @@ -156,10 +156,11 @@ static int __get_paged_frame(unsigned lo if ( p2m_is_valid(p2mt) ) { *frame = mfn_x(mfn); - if ( p2m_is_paged(p2mt) ) - p2m_mem_paging_populate(p2m, gfn); if ( p2m_is_paging(p2mt) ) + { + p2m_mem_paging_populate(p2m, gfn); rc = GNTST_eagain; + } } else { *frame = INVALID_MFN; rc = GNTST_bad_page;