Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933955AbcCISpv (ORCPT ); Wed, 9 Mar 2016 13:45:51 -0500 Received: from mga11.intel.com ([192.55.52.93]:23511 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933848AbcCISpn (ORCPT ); Wed, 9 Mar 2016 13:45:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,312,1455004800"; d="scan'208";a="933228923" Date: Wed, 9 Mar 2016 13:45:40 -0500 From: Matthew Wilcox To: Andrea Arcangeli Cc: Ingo Molnar , akpm@linux-foundation.org, hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org, Jeremy Fitzhardinge Subject: Re: + x86-add-support-for-pud-sized-transparent-hugepages-checkpatch-fixes.patch added to -mm tree Message-ID: <20160309184540.GC2464@linux.intel.com> References: <56b13381.v0wS03ZQEKxwivVW%akpm@linux-foundation.org> <20160203074835.GB32652@gmail.com> <20160304203018.GC5530@linux.intel.com> <20160309174009.GR14882@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160309174009.GR14882@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1854 Lines: 45 On Wed, Mar 09, 2016 at 06:40:09PM +0100, Andrea Arcangeli wrote: > On Fri, Mar 04, 2016 at 03:30:18PM -0500, Matthew Wilcox wrote: > > I have no idea what it means. This is copy-and-change of the pmd version, > > which was originally commit db3eb96f4e6281b84dd33c8980dacc27f2efe177 by > > Andrea. > > which I also copied from native_ptep_get_and_clear: Hah ;-) > The comment means native_local_pmdp_get_and_clear() couldn't be > called, or the build would break because of preprocessor include order > dependencies. I CC'ed Jeremy just in case, but I've no doubts about > the comment myself. > > See also what native_local_pmdp_get_and_clear does.. > > static inline pmd_t native_local_pmdp_get_and_clear(pmd_t *pmdp) > { > pmd_t res = *pmdp; > > native_pmd_clear(pmdp); > return res; > } > > It'd be sure fine to improve the comment, but a comment, even a short > one, was in order. If a solution is found for the include ordering, > one could call native_local_pmdp_get_and_clear there, so it was good > to keep that in mind. Nothing special about the pmd-THP part, this > build issue originated in the pte. > > In fact even before starting to fix the comment, I would recommend to > try again to call native_local_pmdp_get_and_clear and > native_local_ptep_get_and_clear to verify if it still breaks, just in > case the include ordering got fixed by accident in the meanwhile (that > was a comment in 2.6.25 when arch/x86/include/asm didn't even exist > yet, it was still in include/asm-x86). If it would manage to build > without the manual expansion, the comment could go and the duplication > as well. The ordering problem is still there. native_local_ptep_get_and_clear() is declared at line 726 of asm/pgtable.h and asm/pgtable_64.h is included at line 466 of asm/pgtable.h. I'll have a little play; see if I can resolve this ...