From owner-freebsd-hackers@freebsd.org Thu Apr 13 01:26:24 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3795D38DA8 for ; Thu, 13 Apr 2017 01:26:24 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF29DCB for ; Thu, 13 Apr 2017 01:26:23 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qk0-x22a.google.com with SMTP id f133so37619793qke.2 for ; Wed, 12 Apr 2017 18:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=N383ORst11g2PiAMLlRNgwH1Bxa1LHUEDkL69gyEK+g=; b=NGJrwtu2HcImIkgWg/AupeZmZPg22XGB2Hnf4fVc8hiTSmyVfy3Nbx479DvChINQEv etgNJbhVbrkQugs2EWIb9t/kk4B185f3DIiUxO2O3tMw6cUXia7XtWAmdftaXCvZSuKO L88+9L3Cuix3mQJrhdghn2d1YQ0bYtMVAyx9E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=N383ORst11g2PiAMLlRNgwH1Bxa1LHUEDkL69gyEK+g=; b=nnfJninENWqWQGgX2JR1UEVjK42PCPYns6vcj2lUxpOH7ZRGoRHH2J+71N0eCaTNpb OC8PAlVgh/RwIAX6FAi8qznaC5Ak0LOwY//9BmbK/eSS+YWu6fAFaU/k5A11AZxbPlrE ikzlfbB6dI8Bs5g4opFNN1EhaC3lGLluW5Ljbj2ZNqFq04ytznhZsRa2irTvHON7boQ+ 68nA5OcOEASQg0xFGAlaf502V3//9qhgQ46NOIVJLgNoBilB0+25wFKH5Drw8LbcIIiL uJHDQq2j+RyY2qftGBbtFX2pXUB6J0LMaMkhnyzsAIW75GZYXVcUH/sM8Nlno9ra77/7 26CQ== X-Gm-Message-State: AN3rC/7zGUzpA8zheX4hm6O6At+QyxC/hEA4osAHp8plF876ZNc3cl+O HWrVcvS0N4iiuxTL X-Received: by 10.55.102.193 with SMTP id a184mr411486qkc.309.1492046782712; Wed, 12 Apr 2017 18:26:22 -0700 (PDT) Received: from ?IPv6:2804:54:19ef:cc00:c47d:8860:c52b:6c79? ([2804:54:19ef:cc00:c47d:8860:c52b:6c79]) by smtp.googlemail.com with ESMTPSA id q80sm14735457qkq.16.2017.04.12.18.26.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 18:26:22 -0700 (PDT) Subject: Re: The arm64 fork-then-swap-out-then-swap-in failures: a program source for exploring them To: freebsd-hackers@freebsd.org References: <4DEA2D76-9F27-426D-A8D2-F07B16575FB9@dsl-only.net> <163B37B0-55D6-498E-8F52-9A95C036CDFA@dsl-only.net> <08E7A5B0-8707-4479-9D7A-272C427FF643@dsl-only.net> <20170409122715.GF1788@kib.kiev.ua> <9D152170-5F19-47A2-A06A-66F83CA88A09@dsl-only.net> <9DCAF95B-39A5-4346-88FC-6AFDEE8CF9BB@dsl-only.net> <8FFE95AA-DB40-4D1E-A103-4BA9FCC6EDEE@dsl-only.net> <89D6D677-3BE2-45E2-A902-CC6A0305F3F9@dsl-only.net> <585B43F7-D4C8-431A-BFFE-68B48C3214AE@dsl-only.net> <876EA1E4-E5A9-411C-AFFD-989713037C19@dsl-only.net> From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <7adada71-e089-e105-eec8-6136d4b8c083@bsd.com.br> Date: Wed, 12 Apr 2017 22:25:43 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <876EA1E4-E5A9-411C-AFFD-989713037C19@dsl-only.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 01:26:24 -0000 Em 10/04/2017 17:15, Mark Millard escreveu: > On 2017-Apr-10, at 2:51 AM, Mark Millard wrote: > >> On 2017-Apr-9, at 5:10 PM, Mark Millard wrote: >> >>> On 2017-Apr-9, at 10:24 AM, Mark Millard wrote: >>> >>>> On 2017-Apr-9, at 5:27 AM, Konstantin Belousov wrote: >>>>> Hmm, could you try the following patch, I did not even compiled it. >>>> I'll try it later today. >>>> >>>>> diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c >>>>> index 3d5756ba891..55aa402eb1c 100644 >>>>> --- a/sys/arm64/arm64/pmap.c >>>>> +++ b/sys/arm64/arm64/pmap.c >>>>> @@ -2481,6 +2481,11 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) >>>>> sva += L3_SIZE) { >>>>> l3 = pmap_load(l3p); >>>>> if (pmap_l3_valid(l3)) { >>>>> + if ((l3 & ATTR_SW_MANAGED) && >>>>> + pmap_page_dirty(l3)) { >>>>> + vm_page_dirty(PHYS_TO_VM_PAGE(l3 & >>>>> + ~ATTR_MASK)); >>>>> + } >>>>> pmap_set(l3p, ATTR_AP(ATTR_AP_RO)); >>>>> PTE_SYNC(l3p); >>>>> /* XXX: Use pmap_invalidate_range */ >>> >>> Preliminary testing indicates that this fixes the >>> some-pages-become-zero problem for fork-then-swapout/in. >>> >>> Thanks! >>> >>> I'll see if a buildworld can go through without being stopped >>> by the type of issue. But that will take a while. (It is how >>> I originally ran into the problem(s) that others had been >>> reporting on the lists.) >> buildworld buildkernel completed non-stop for the first time >> on a BPI-M3 board. > I had been thinking of the BPI-M3 for other reasons > and typed that instead of the correct: Pine64+ 2GB. > (True elsewhere as well.) I do really mean arm64 > here, not armv7. > >> Looks good for a check-in to svn to me (head and stable/11). >> >> This combined with 2017-Feb-15's -r313772's fix to the fork >> trampline code's updating of sp_el0 makes arm64 far more stable >> for my purposes. >> >> -r313772 was never MFC'd to stable/11. In my view it should be. > === > Mark Millard > markmi at dsl-only.net > Dears Will this patch be committed to HEAD? []'s -Otacilio