Received: by 10.192.165.148 with SMTP id m20csp3482518imm; Mon, 30 Apr 2018 00:31:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoOiL/1fd4AA0lO9TOhe0bCXkek+ELy3pbxe5YnvDhwbLFLx85LsB3LA3We/2cG/GyvhdS1 X-Received: by 10.98.152.203 with SMTP id d72mr11009378pfk.98.1525073503308; Mon, 30 Apr 2018 00:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525073503; cv=none; d=google.com; s=arc-20160816; b=DyqlohgNffnIOekyFmrgYy3bmM17x7ON+zklF43lDiZQzIR5D4HS7k6bRPLyOcihXz ufgIze20hN6gyTTJLxcK2OGCuBBo/21FzH1t9t9I6ajs+04xwm++XK4UuRI+QQGqv3Lo umagb/whaJMaO4eeplryYtPFlKHHH8wpS9QQZDwpzvkaTV3Xv1VdX5Q8q5tXnToBYjvi 88Q2HwwTdF8pX+EYcVSMa4XcamITU+1hz0NL0iqnECh1b0j08R2CiGvXFKZqt5fmZ4Dq 9bwK+nVpIsk9zYK1ws4BsA79rXafpI4cCXGYIPftI0UmYCV75/k4YaPtJK/aqXVSc4pq 92WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=YiIDGmM5ikkf35oXSHwgMpMBtvNL6q8NKPnRl2kB404=; b=OtEUBUxEQOKTw4j2Bujo3ZRP4POrPAFDZvPg1+9EYsW8an1jq/XuWJ6y/7AXXQjscf dvjUVrWHefPrpT1DhqAWbRYWlEoXAnjor9BNUftu9dazoQnX/+tUPD++o8fC+VGPabtd zh9OAPLPns3VjCZykJOemdteGMGOOWcHnDwmduyYaEp1yH70owaIRC94O0tOUWwNV4WO +Mpxyyj3anbuFBMm//tcvzwEZINEe+OiXgdGL1NMkBYl54Mrnh9Aqw2RcgGsJ5e9Ie6n WUIxADfItHDQ3OtlUy0/VvlQi93/rzEN0hQYuy5AjkOgVxD/RZ1B8R5cFttpgoSwMuAW 91fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ROHCmDOz; dkim=pass header.i=@codeaurora.org header.s=default header.b=Rwv9NWnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5-v6si5327888plo.113.2018.04.30.00.31.29; Mon, 30 Apr 2018 00:31:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ROHCmDOz; dkim=pass header.i=@codeaurora.org header.s=default header.b=Rwv9NWnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbeD3HbP (ORCPT + 99 others); Mon, 30 Apr 2018 03:31:15 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34606 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbeD3HbL (ORCPT ); Mon, 30 Apr 2018 03:31:11 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4A8C260558; Mon, 30 Apr 2018 07:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525073471; bh=OCvQtupik9szarAIWJd5DAHKUyfblVd8uQnOvyhEbWc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ROHCmDOzFSzxZaA42jsSqT7GvY9VxZEzQtAtfx/Nc3rSrO789ADrI16X3SkrhgVI5 z5SFqL6nZDoZvNvsGrKfLfZigf/mS5LsI+P0SMqOVltpLqpO0UiPtiHiwr3a5IyQQx Qihy6BHOORggqzU+VsS+2yb31F712AXdhdtey3+0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1732060271; Mon, 30 Apr 2018 07:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525073469; bh=OCvQtupik9szarAIWJd5DAHKUyfblVd8uQnOvyhEbWc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Rwv9NWnXvDcYcTLs+pcFP9lWD1lhrJfLp/YC2pHwBduq+LTJlJjNx0mnHzvKTqtc3 AEKWI0Nh6jnUfKuMdq/vTTdd7+Nb1g8rjhzNIu6WNlI6Nh1qzxK+fH1Gzydvumjkbp 8mUO5IbilcQkow+Y7oBoTo2LcKwxA2MB7Sf4pc6Q= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1732060271 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH v2 2/2] x86/mm: implement free pmd/pte page interfaces To: "Kani, Toshi" , "joro@8bytes.org" Cc: "Hocko, Michal" , "hpa@zytor.com" , "wxf.wang@hisilicon.com" , "catalin.marinas@arm.com" , "x86@kernel.org" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "linux-mm@kvack.org" , "mingo@redhat.com" , "willy@infradead.org" , "guohanjun@huawei.com" , "tglx@linutronix.de" , "bp@suse.de" , "akpm@linux-foundation.org" , "linux-arm-kernel@lists.infradead.org" References: <20180314180155.19492-1-toshi.kani@hpe.com> <20180314180155.19492-3-toshi.kani@hpe.com> <20180426141926.GN15462@8bytes.org> <1524759629.2693.465.camel@hpe.com> <20180426172327.GQ15462@8bytes.org> <1524764948.2693.478.camel@hpe.com> <20180426200737.GS15462@8bytes.org> <1524781764.2693.503.camel@hpe.com> <20180427073719.GT15462@8bytes.org> <1524839460.2693.531.camel@hpe.com> <20180428090217.n2l3w4vobmtkvz6k@8bytes.org> <1524948829.2693.547.camel@hpe.com> From: Chintan Pandya Message-ID: Date: Mon, 30 Apr 2018 13:00:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524948829.2693.547.camel@hpe.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/29/2018 2:24 AM, Kani, Toshi wrote: > On Sat, 2018-04-28 at 11:02 +0200, joro@8bytes.org wrote: >> On Fri, Apr 27, 2018 at 02:31:51PM +0000, Kani, Toshi wrote: >>> So, we can add the step 2 on top of this patch. >>> 1. Clear pud/pmd entry. >>> 2. System wide TLB flush <-- TO BE ADDED BY NEW PATCH >>> 3. Free its underlining pmd/pte page. >> >> This still lacks the page-table synchronization and will thus not fix >> the BUG_ON being triggered. > > The BUG_ON issue is specific to PAE that it syncs at the pmd level. > x86/64 does not have this issue since it syncs at the pgd or p4d level. > >>> We do not need to revert this patch. We can make the above change I >>> mentioned. >> >> Please note that we are not in the merge window anymore and that any fix >> needs to be simple and obviously correct. > > Understood. Changing the x86/32 sync point is risky. So, I am going to > revert the free page handling for PAE. Will this affect pmd_free_pte_page() & pud_free_pmd_page() 's existence or its parameters ? I'm asking because, I've similar change for arm64 and ready to send v9 patches. I'm thinking to share my v9 patches in any case. If you are going to do TLB invalidation within these APIs, my first patch will help. > > Thanks, > -Toshi > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project