Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756041AbcLPRKm (ORCPT ); Fri, 16 Dec 2016 12:10:42 -0500 Received: from mail-sn1nam01on0073.outbound.protection.outlook.com ([104.47.32.73]:6313 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753493AbcLPRKd (ORCPT ); Fri, 16 Dec 2016 12:10:33 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; Date: Fri, 16 Dec 2016 18:10:16 +0100 From: Robert Richter To: Ard Biesheuvel CC: "linux-arm-kernel@lists.infradead.org" , Will Deacon , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Catalin Marinas , Andrew Morton , Hanjun Guo , Yisheng Xie , James Morse Subject: Re: [PATCH 2/2] arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA Message-ID: <20161216170947.GD4930@rric.localdomain> References: <1481706707-6211-1-git-send-email-ard.biesheuvel@linaro.org> <1481706707-6211-3-git-send-email-ard.biesheuvel@linaro.org> <20161215153930.GA8111@rric.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [92.229.89.225] X-ClientProxiedBy: HE1P192CA0018.EURP192.PROD.OUTLOOK.COM (10.171.121.156) To BL2PR07MB2337.namprd07.prod.outlook.com (10.167.101.15) X-MS-Office365-Filtering-Correlation-Id: 2dc1d49b-0616-4ddc-58ce-08d425d67057 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BL2PR07MB2337; X-Microsoft-Exchange-Diagnostics: 1;BL2PR07MB2337;3:/Fe3ZjXAG/FNYiSzvpAU9kk7fz4pcrlOHuXG5CNWxwlmA9do3lTKeaBx1aWopEDQav2Pdxxg7m59rhERwo/4+LRVxH45VugEfj7q6F/cQZg8Ro+Q5/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KSpY7/sRd7sxIS1ZioqkKCBhZTLOh/ICmTonMFNr6h4ONtVJzST2xdqgUFptd4VlkLcDBOfHywLL/UrmrHYhhWXVIECmKQMDwiv83j547Z6rnKKgDotqrDcK+W1JtRbiLg1qadxHk4PjqmNAozXSbLAL19iQkmuTqqj71JK/g3IfxUYKDCWL/FfKeR6gqyDIYxIuVdxGOgZ2gVdmLIvZSbfrqLfx/Cru6GfCBPOcxuhdNzfuXnOeGoKpcu/LBsRAOBRBfPqMnnbgHisinrV6EVvLX4WwL4ourv30kU2+ideH6i6CbXNKhyte4rWnl6YIUTJafKTx/rnZZflj7pl8fXl2SDARludH7ERMqXP/bQKFrSeZcXctwxNCDYa1wfAKsQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123558021)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148);SRVR:BL2PR07MB2337;BCL:0;PCL:0;RULEID:;SRVR:BL2PR07MB2337; X-Microsoft-Exchange-Diagnostics: 1;BL2PR07MB2337;4:/XBN2orx3nANKQ6L2kBratw3wJTMWKZUFVJgoIvQJXF4XxRwvkHKD/ukPXhn3Wd0w2NVBnW1LVXokY5bnI9tR1Hb8uV8i8gEpM96C6cyHAFoMaTn1R9HcuiReEiQ7zgQrTpBL5ZwpnCRTJni3cDCLX90g+4xp+wLpPRrlD4AdOggylkaF3n6FWLTeg4++Sp9hp4xsjgF+QWkGE0E5Y1m3Hd8a4pn7mwYYxgNvjiMTfPn/TIQQ7RIDgxGZFGuiP8gj7r7VHV+zcTiA1xcSNE49X2E/Tj7OOCK7ueARHUytPr7Gm+hUEApW3vTT+MRwz6MPrHSNFOIEfxAWrUlCjmGMtnWcgoeVmugxht1XX3BRYMWccnl8p3jgZSPtmlsqGKRoAwyHJZRZOU0LMEavJO+25OR8IvGghXRlZWKG7I+gTwtiSNThktFai2oV3/2s2fxOykOczFME7xg/3ubRuqM/tNPCqb3bWXshfuj+UlDiVUM47lls/2TmDMgoLPHVVewrn48Qvp6aFwWGmQWrvhd3punqDtS/xgr2ciZCMldE8pJdMN70fdtLhL1ZDOC7LYCKpSPyfhwsQGkc5bXGxpBPkIE57EAidLFMPKaxy4tbLg= X-Forefront-PRVS: 01583E185C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(39410400002)(39830400002)(39450400003)(189002)(199003)(24454002)(5660300001)(76176999)(7416002)(81166006)(2950100002)(9686002)(305945005)(6916009)(81156014)(92566002)(8676002)(4001350100001)(38730400001)(7736002)(6506006)(229853002)(93886004)(86362001)(6666003)(68736007)(106356001)(25786008)(42186005)(50466002)(4326007)(105586002)(83506001)(110136003)(54356999)(97756001)(1076002)(3846002)(6116002)(23726003)(189998001)(50986999)(33656002)(46406003)(2906002)(97736004)(101416001)(66066001)(47776003)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2PR07MB2337;H:rric.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR07MB2337;23:hy9j+VzbnBdLHhXartle60WkKBRTft99FxzyIS62g?= =?us-ascii?Q?IU/kPMD04LOV1914iaxnNeXvaUNhVe23ZGtrmFutzHPruihYtsprNt9No/fS?= =?us-ascii?Q?6R1oSfYFc5AxH8WqDwnpOGV96pwEPx2H39p+OOKbSWspr5Dva/gBkz4ERmCB?= =?us-ascii?Q?fqsX/sI0mEfPCrT5uDli2d21KZJTrRJY/yyHdukNutTe0f9Pa0InFPioWGaQ?= =?us-ascii?Q?z25GY8G5I17rDXcNXy6H826WF2gFHRKdly4mwPyDZQ5TSiwOyQRYHxjt7Ee+?= =?us-ascii?Q?Ohb5W4OsnTSd38YRy3pN+fCBBjLVEkCfLKAAdKLAz0esGWCtF2v9iSVlWJiC?= =?us-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sl/PSityfZAA17?= =?us-ascii?Q?mxo3u/33eC74+EuRLNjO+RceBBTHVskIYA2wxCFTSXc2AG7EbdNAlo/t9bs2?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR07MB2337;6:h1sFtH7xBl4ylsd9A8AAK9J/AHXYGBgLPRe+7/3yTIkxWGjHa6gGDxhkKMsLz5lGSAq6OEgsvFRVh/gk4XpkwTjiv6Rcp8h6Lfu0UECivUeiMwAGry8DFw3ayQLp+OJJgykqBCtTcNiIOmZPF11xibdlhuKaXc6XnShhJxLy7WmlXqbZRUGP8k143Vo2nWoi+IIaqLrJtmNN/f1Fg+SGcn88GPY46NeIsdCo1ThbqzAKD9fT8FC5sLli/wf2bK3PcqSnIG+deyDa2c3FJLVY4c+TPAfxrUTFxYEUeCrcSpWD5e/R8T8Z01VbKyY/awLez9IXl37QrujpBNrky+dv7SffDGCyWrc/bRsHidVPpDhM479nQmkwPUhir2eFrO6nUJAogVYBJ/DRmwv/QH+LN0sjEV+qPHfUqADZTKZ9l94=;5:G2MdAsVbtf7akY/D0XJY7J9gJ4gQXHQvYpY/b0q2GpzCLSrogPFvRHYNI8jWjaNPifkC3Oh+uUOiL/7cE+SwqbXcieCA7WU0HWgjqsjYnyyDiHewX0GuHLPGPmqXNJot1FohzSTFjlQvdABlS/CSyA==;24:ZGUmnUwUCRcqU6PISXU07yGKwn5led6JXqZwdcoLOqKoa+BpT+151gQIBB8ZZX67DmHPLrqj4jQNXxlQX6Wsy+RVk0uFOYdhfR49gccuJQk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR07MB2337;7:AWG7Z3Ws3QbzDMpRB9ButVIVrYSEk7hgNNHZ2tJY7bCNdcad7rB61ce1WSxAvYITFrLXQJMJSEvvenWsrp+2E5IhMP7p1vhNO1M430EkJ+f6hiN7wokwdUpbdvTQm4ZVh+8Zgv0fHmk7tyPWEiCOtvmJJQlLSSKKnlQjNNdgMGprtoywbnHW4Q3x+YZm3bW9TPi1ZkxZ2UEkxz/F+rOHNGLTwO2CNCcP5K4gYELpFfxfPEy687dZaJWupoiHWybjfsBXmlQt88J9tiQzpGNOyzUFnpOq6hKkE9tACM+nHe8Atw/8QOFktES01aaEJRWGXZYBbHcF5Sei8b5L6zOe5hC/My5bjOQV5MxSVRupJUJfCOEc5yGuu5YUPbp5vHN5wxMsy+bnbgPkuS0HxlMW7WeVvN3os3TTRV5TvVAoLheW9uO5uAy2RbbTM2Dq4yBPKCL01xnVj37J+qTZrZQTPA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 17:10:28.3407 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR07MB2337 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1765 Lines: 45 On 15.12.16 16:07:26, Ard Biesheuvel wrote: > On 15 December 2016 at 15:39, Robert Richter wrote: > > I was going to do some measurements but my kernel crashes now with a > > page fault in efi_rtc_probe(): > > > > [ 21.663393] Unable to handle kernel paging request at virtual address 20251000 > > [ 21.663396] pgd = ffff000009090000 > > [ 21.663401] [20251000] *pgd=0000010ffff90003 > > [ 21.663402] , *pud=0000010ffff90003 > > [ 21.663404] , *pmd=0000000fdc030003 > > [ 21.663405] , *pte=00e8832000250707 > > > > The sparsemem config requires the whole section to be initialized. > > Your patches do not address this. > > > > 96000047 is a third level translation fault, and the PTE address has > RES0 bits set. I don't see how this is related to sparsemem, could you > explain? When initializing the whole section it works. Maybe it uncovers another bug. Did not yet start debugging this. > > > On 14.12.16 09:11:47, Ard Biesheuvel wrote: > >> +config HOLES_IN_ZONE > >> + def_bool y > >> + depends on NUMA > > > > This enables pfn_valid_within() for arm64 and causes the check for > > each page of a section. The arm64 implementation of pfn_valid() is > > already expensive (traversing memblock areas). Now, this is increased > > by a factor of 2^18 for 4k page size (16384 for 64k). We need to > > initialize the whole section to avoid that. > > > > I know that. But if you want something for -stable, we should have > something that is correct first, and only then care about the > performance hit (if there is one) I would prefer to check for a performance penalty *before* we put it into stable. There is nor risk at all with the patch I am proposing. See: https://lkml.org/lkml/2016/12/16/412 -Robert