From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v6 08/10] xen/arm: Add relinquish_p2m_mapping to remove reference on every mapped page Date: Wed, 18 Dec 2013 16:48:36 +0000 Message-ID: <52B1D1E4.6060701@linaro.org> References: <1387297678-17762-1-git-send-email-julien.grall@linaro.org> <1387297678-17762-9-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VtKIa-0001hp-T7 for xen-devel@lists.xenproject.org; Wed, 18 Dec 2013 16:48:41 +0000 Received: by mail-ea0-f171.google.com with SMTP id h10so3653096eak.16 for ; Wed, 18 Dec 2013 08:48:39 -0800 (PST) In-Reply-To: <1387297678-17762-9-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.campbell@citrix.com Cc: xen-devel@lists.xenproject.org, Julien Grall , ian.jackson@eu.citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 12/17/2013 04:27 PM, Julien Grall wrote: > @@ -343,12 +353,35 @@ static int create_p2m_entries(struct domain *d, > > memset(&pte, 0x00, sizeof(pte)); > write_pte(&third[third_table_offset(addr)], pte); > + count++; > } > break; > } > > if ( flush ) > flush_tlb_all_local(); > + > + /* Preempt every 2MiB (mapped) or 32 MiB (unmapped) - arbitrary */ > + if ( op == RELINQUISH && count >= 0x2000 ) > + { > + if ( hypercall_preempt_check() ) > + { > + p2m->next_gfn_to_relinquish = maddr >> PAGE_SHIFT; Oops, I made a mistake in this patch. It should be addr instead of maddr. As it's already in staging, I will send a fix right now. -- Julien Grall