From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751532AbdFGOuA (ORCPT ); Wed, 7 Jun 2017 10:50:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439AbdFGOtQ (ORCPT ); Wed, 7 Jun 2017 10:49:16 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0E070C0587D8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jglisse@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0E070C0587D8 Date: Wed, 7 Jun 2017 10:49:12 -0400 From: Jerome Glisse To: "Kirill A. Shutemov" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andy Lutomirski , Ingo Molnar , "Kirill A . Shutemov" , Logan Gunthorpe Subject: Re: [PATCH] x86/mm/hotplug: fix BUG_ON() after hotremove Message-ID: <20170607144912.GA6639@redhat.com> References: <20170606173512.7378-1-jglisse@redhat.com> <20170607104715.5niuwk42fhahbftk@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170607104715.5niuwk42fhahbftk@node.shutemov.name> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 07 Jun 2017 14:49:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 07, 2017 at 01:47:15PM +0300, Kirill A. Shutemov wrote: > On Tue, Jun 06, 2017 at 01:35:12PM -0400, Jérôme Glisse wrote: > > With commit af2cf278ef4f we no longer free pud so that we > > do not have synchronize all pgd on hotremove/vfree. But the > > new 5 level page table code re-added that code f2a6a705 and > > thus we now trigger a BUG_ON() l128 in sync_global_pgds() > > > > This patch remove free_pud() like in af2cf278ef4f > > Good catch. Thanks! > > But I think we only need to skip free_pud_table() for 4-level paging. > If we don't we would leave 513 page tables around instead of one in > 5-level paging case. > > I don't think it's acceptable. > > And please use patch subject lines along with commit hashes to simplify > reading commit message. > I sent a v2 that disable free_pud in 4 level page table config. Note that your patchset that allow switching between 4 and 5 at boot time will need to update that code. As this patch is a fix and your boot time switching is an RFC i assume the fix will go in first. Cheers, Jérôme