From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933587AbcLNWLs (ORCPT ); Wed, 14 Dec 2016 17:11:48 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:45711 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933530AbcLNWLq (ORCPT ); Wed, 14 Dec 2016 17:11:46 -0500 Date: Wed, 14 Dec 2016 23:07:52 +0100 (CET) From: Thomas Gleixner To: "Kirill A. Shutemov" cc: Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mm: drop unused argument sync_global_pgds() In-Reply-To: <20161212135731.196255-1-kirill.shutemov@linux.intel.com> Message-ID: References: <20161212135731.196255-1-kirill.shutemov@linux.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Dec 2016, Kirill A. Shutemov wrote: > There's no users that wants sync_global_pgd(.remove=1) sinc af2cf278ef4f > ("x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()"). > > Let's drop 'remove'. The argument is named 'removed' .... > /* > - * When memory was added/removed make sure all the processes MM have > + * When memory was added make sure all the processes MM have > * suitable PGD entries in the local PGD level page. > */ > -void sync_global_pgds(unsigned long start, unsigned long end, int removed) > +void sync_global_pgds(unsigned long start, unsigned long end) > { > unsigned long address; > > @@ -100,14 +100,6 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed) > const pgd_t *pgd_ref = pgd_offset_k(address); > struct page *page; > > - /* > - * When it is called after memory hot remove, pgd_none() > - * returns true. In this case (removed == 1), we must clear > - * the PGD entries in the local PGD level page. > - */ > - if (pgd_none(*pgd_ref) && !removed) > - continue; > - Errm. This continues, when pgd_none(*pgd_ref) is true AND removed is false, i.e. that is NOT the removed == true case which you are aiming to drop. > + if (pgd_none(*pgd)) > + set_pgd(pgd, *pgd_ref); This is whitespace damaged in several ways. Thanks, tglx