From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756525AbbFPOVN (ORCPT ); Tue, 16 Jun 2015 10:21:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:27432 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756161AbbFPOVH (ORCPT ); Tue, 16 Jun 2015 10:21:07 -0400 Message-ID: <5580307F.8050007@oracle.com> Date: Tue, 16 Jun 2015 10:19:43 -0400 From: Boris Ostrovsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Vrabel , Ingo Molnar CC: Ian Campbell , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner , Waiman Long Subject: Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code References: <1434188955-31397-1-git-send-email-mingo@kernel.org> <1434188955-31397-8-git-send-email-mingo@kernel.org> <1434359109.13744.14.camel@hellion.org.uk> <557EA944.9020504@citrix.com> <20150615203532.GC13273@gmail.com> <55802F94.90306@citrix.com> In-Reply-To: <55802F94.90306@citrix.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/16/2015 10:15 AM, David Vrabel wrote: > On 15/06/15 21:35, Ingo Molnar wrote: >> * David Vrabel wrote: >> >>> On 15/06/15 10:05, Ian Campbell wrote: >>>> On Sat, 2015-06-13 at 11:49 +0200, Ingo Molnar wrote: >>>>> xen_mm_pin_all()/unpin_all() are used to implement full guest instance >>>>> suspend/restore. It's a stop-all method that needs to iterate through all >>>>> allocated pgds in the system to fix them up for Xen's use. >>>>> >>>>> This code uses pgd_list, probably because it was an easy interface. >>>>> >>>>> But we want to remove the pgd_list, so convert the code over to walk all >>>>> tasks in the system. This is an equivalent method. >>> It is not equivalent because pgd_alloc() now populates entries in pgds that are >>> not visible to xen_mm_pin_all() (note how the original code adds the pgd to the >>> pgd_list in pgd_ctor() before calling pgd_prepopulate_pmd()). These newly >>> allocated page tables won't be correctly converted on suspend/resume and the new >>> process will die after resume. >> So how should the Xen logic be fixed for the new scheme? I can't say I can see >> through the paravirt complexity here. > Actually, since we freeze_processes() before trying to pin page tables, > I think it should be ok as-is. > > I'll put the patch through some tests. Actually, I just ran this through a couple of boot/suspend/resume tests and didn't see any issues (with the one fix I mentioned to Ingo earlier). On unstable Xen only. -boris From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by kanga.kvack.org (Postfix) with ESMTP id 5349E6B0038 for ; Tue, 16 Jun 2015 10:20:52 -0400 (EDT) Received: by pacyx8 with SMTP id yx8so13804655pac.2 for ; Tue, 16 Jun 2015 07:20:52 -0700 (PDT) Received: from userp1040.oracle.com (userp1040.oracle.com. [156.151.31.81]) by mx.google.com with ESMTPS id gq8si1610920pbc.83.2015.06.16.07.20.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 07:20:51 -0700 (PDT) Message-ID: <5580307F.8050007@oracle.com> Date: Tue, 16 Jun 2015 10:19:43 -0400 From: Boris Ostrovsky MIME-Version: 1.0 Subject: Re: [PATCH 07/12] x86/virt/guest/xen: Remove use of pgd_list from the Xen guest code References: <1434188955-31397-1-git-send-email-mingo@kernel.org> <1434188955-31397-8-git-send-email-mingo@kernel.org> <1434359109.13744.14.camel@hellion.org.uk> <557EA944.9020504@citrix.com> <20150615203532.GC13273@gmail.com> <55802F94.90306@citrix.com> In-Reply-To: <55802F94.90306@citrix.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: David Vrabel , Ingo Molnar Cc: Ian Campbell , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner , Waiman Long On 06/16/2015 10:15 AM, David Vrabel wrote: > On 15/06/15 21:35, Ingo Molnar wrote: >> * David Vrabel wrote: >> >>> On 15/06/15 10:05, Ian Campbell wrote: >>>> On Sat, 2015-06-13 at 11:49 +0200, Ingo Molnar wrote: >>>>> xen_mm_pin_all()/unpin_all() are used to implement full guest instance >>>>> suspend/restore. It's a stop-all method that needs to iterate through all >>>>> allocated pgds in the system to fix them up for Xen's use. >>>>> >>>>> This code uses pgd_list, probably because it was an easy interface. >>>>> >>>>> But we want to remove the pgd_list, so convert the code over to walk all >>>>> tasks in the system. This is an equivalent method. >>> It is not equivalent because pgd_alloc() now populates entries in pgds that are >>> not visible to xen_mm_pin_all() (note how the original code adds the pgd to the >>> pgd_list in pgd_ctor() before calling pgd_prepopulate_pmd()). These newly >>> allocated page tables won't be correctly converted on suspend/resume and the new >>> process will die after resume. >> So how should the Xen logic be fixed for the new scheme? I can't say I can see >> through the paravirt complexity here. > Actually, since we freeze_processes() before trying to pin page tables, > I think it should be ok as-is. > > I'll put the patch through some tests. Actually, I just ran this through a couple of boot/suspend/resume tests and didn't see any issues (with the one fix I mentioned to Ingo earlier). On unstable Xen only. -boris -- 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: email@kvack.org