Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp650828imm; Tue, 15 May 2018 07:12:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp05dySV64oeSBxFFj8m9kxXgI6tJXkrt4didSx4oHr/OpTlI8hiMuaY/wnm1+cNdYiybIO X-Received: by 2002:a63:494:: with SMTP id 142-v6mr8294700pge.179.1526393540917; Tue, 15 May 2018 07:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526393540; cv=none; d=google.com; s=arc-20160816; b=QLm5y5LhPh/dJz5YwtnKJklL5r6gVvPPxYceVqO9SDW4q+I8wv5bjq9BYIR2Sr0z8h ufim/vtWaexAlDfP8KckGUlqyUPxtIsM85C4IHQDYrag+TbkbVwRXYpVkhqC8CV9oIT7 R7YBRazltxkRmJqI+rrQRp86GZbFTW6N339R9ldVGnv9PEkme57HXKcvXd/mhdbsTeZs dFbww6pci2LSLYsUfmp0nPFIedfi4LWnuTnfAhXU/nuDzxu0fs7RKhNy2vqB0Bs70Wfy yfEnfyYLEtpsEUszH24Ke4CwlXatgV7c6qbIAsmXHXuIvkRYNd2DL0ujifSkT+9zsx9V 6Wvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=octjuWHzJQLM+InwMHKXm+S0QWA/7CeWwN2p8xmsafI=; b=BDTFK0rlcrp5qIWSBbA59JFFvRkx7HVM0WPiitcOFng9Kip2Qmm5UW8KrxuoQytIvC P0hjvLL3jXUbi2dOn88xVhNZVd5J7EJlkA8prWWfOJLEwmpLLMnh1sfZb9ILOBdxukMp hLmhYFc0scaE/z8AxwHkuJlgNPu+Pq4Oh0Z7uRubaaaWAAXPRB0nfb+C3li1ik9lMHWB 7W2tt3Kn12oCYyPNnT4eNK3kBkAs9ZUTL4WxofzO8b7g4SErH3Fvg81zN0SDd73Nm2gY WWB/hFecTPKNLDPDP/mqQ5xa3xlKomDnP0JlLa/cGYpYvj79z+c9VUfik6O+u6sSvUEr I1+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=Pxh4qMe8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e187-v6si107837pgc.127.2018.05.15.07.12.07; Tue, 15 May 2018 07:12:20 -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=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=Pxh4qMe8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752893AbeEOOFw (ORCPT + 99 others); Tue, 15 May 2018 10:05:52 -0400 Received: from 8bytes.org ([81.169.241.247]:48228 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbeEOOFu (ORCPT ); Tue, 15 May 2018 10:05:50 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 614E4446; Tue, 15 May 2018 16:05:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1526393149; bh=OL1fIY2b8WwZFi1f570rbHMcIMVsqVilrPuizh4JkHA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pxh4qMe81WAN52uwNZQpsODmyge2Uo8RSEozMiNy3WWcpoSuKneMYKLmPKxbjmMR+ iu8160tldmj4OYQy5ygaeFvDtfM48uAf/2lz78TNntPnZVvYxcBGruwBmrAJ5eYNeE RoDpCcgPyOOgALBVah6tYSSgyBS1EXrHqMVXdQHu4zCXuHLOB0ZGHbMWjGOWyn7Xkm IgG0V1FQc6aZosb/K2oy3fHPOuuqSQfY/tsHYMF9hb8mSTWxlevgukM1iXpSDRvvdW QkOpkYRfJQ1MLeaAyqs6NUmw5ONZxcfAgGY7j+aBaYWClP2g3DxDMEKxo117HLWM7I ZEiOJDAKVlc3Q== Date: Tue, 15 May 2018 16:05:49 +0200 From: Joerg Roedel To: Toshi Kani Cc: mhocko@suse.com, akpm@linux-foundation.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, cpandya@codeaurora.org, linux-mm@kvack.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/3] x86/mm: add TLB purge to free pmd/pte page interfaces Message-ID: <20180515140549.GE18595@8bytes.org> References: <20180430175925.2657-1-toshi.kani@hpe.com> <20180430175925.2657-3-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180430175925.2657-3-toshi.kani@hpe.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 11:59:24AM -0600, Toshi Kani wrote: > int pud_free_pmd_page(pud_t *pud, unsigned long addr) > { > - pmd_t *pmd; > + pmd_t *pmd, *pmd_sv; > + pte_t *pte; > int i; > > if (pud_none(*pud)) > return 1; > > pmd = (pmd_t *)pud_page_vaddr(*pud); > + pmd_sv = (pmd_t *)__get_free_page(GFP_KERNEL); So you need to allocate a page to free a page? It is better to put the pages into a list with a list_head on the stack. I am still on favour of just reverting the broken commit and do a correct and working fix for the/a merge window. Joerg