From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752929AbcBZB0r (ORCPT ); Thu, 25 Feb 2016 20:26:47 -0500 Received: from mail-by2on0055.outbound.protection.outlook.com ([207.46.100.55]:21526 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752535AbcBZB0o (ORCPT ); Thu, 25 Feb 2016 20:26:44 -0500 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Message-ID: <56CFA9CA.6090803@caviumnetworks.com> Date: Thu, 25 Feb 2016 17:26:34 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Rob Herring CC: David Daney , Will Deacon , , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , , Ard Biesheuvel , Frank Rowand , Grant Likely , Catalin Marinas , Matt Fleming , , Ganapatrao Kulkarni , Robert Richter , , David Daney Subject: Re: [PATCH v11 08/10] dt, numa: Add NUMA dt binding implementation. References: <1455930799-5371-1-git-send-email-ddaney.cavm@gmail.com> <1455930799-5371-9-git-send-email-ddaney.cavm@gmail.com> <20160223193651.GA8491@rob-hp-laptop> In-Reply-To: <20160223193651.GA8491@rob-hp-laptop> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BLUPR07CA070.namprd07.prod.outlook.com (25.160.24.25) To DM3PR07MB2138.namprd07.prod.outlook.com (25.164.4.144) X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2138;2:JT5e7K09BWX2z9mv07OlNI1pE0TPSc4zt2m7gxt9kkbM4wyGi5dKbcShGHrncbtFqUiX7SIwHPMdGgZA09utyJQ61Fx/kF1h6PikkHLmp6N3JMWvxfQkotX4yRjusl6Yk/T1tJlW6wNMYdcTkKqrqA==;3:ty131z6UXDtat3hf2jX/ZY14wuZy70mf0LZ+oLtMFEDGFVCtrSS1n8gluuXisrvO04xgzCo5eQi0n+xPuVwWwS79iXhr0uZ0t36x67bgTW9vucpd3jbALWxYsHV7mhMv;25:IWOB1oWLEJtyLquDChs8fD3s6oTTg1CbrJHwc2Lk+b8f9CmrKQn5WcHjCnhWKdzqywKYWNzImxSNnaeS+PoKJwhhHqyf9xdRIp22su1WQ9PJ+bpy9wcDhkoz+MPGgXw00lKWT+TkRoAaYa1XrlgTd2d3bUZcBSZF5D0gh88ciHoE21CEAsxZtJxb8bgqKD4M6ZKmcX6A7PqIV+JwUExOrb/+qT5735RPSe3+nfjGnFiRBtxatEPhyAEueMgLERnEL65Nh6icKcDYbet/7pzPZj16+xeJ50oJBCp0jFctYdeSfVERNGZKby94Ik1ce4VsDWEJQMFLoaPjPEwI4XPpgg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2138; X-MS-Office365-Filtering-Correlation-Id: 5966afd6-a9bd-4ba0-a553-08d33e4be160 X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2138;20:FjygqzfrTMQSGdUEgpMi4HRkCl16kchAUOC/GvIysn0vMDewmOzJYE1s8+Q4CJr+et+J/JMl26LxG7vgXlRn+CiNKiYGoDMOYCeE3HL4fIJLP8LUOT/PtcD6tK8JLcgNSc16OF0j1m8HMnM21uuGhM9F6+RQHZB18W3I9xNizZQXzzbzjzhazjbSZWlffKdVG5XDDeBerc9ypTjTPsFEbbHdCnAFZcTxXjirE9exJRCjmcACQ98oTFjc4Sdadkit5+sfMW7zv9sNp0Rn7ZCdAu7sMraAgcUNskeEz5UTTNeXSaTJYs+mH0zZP4a6zhrVzgpSHvzDWBnCS/ikFpigDcWpN7P5s7h7edG2v3LIEm3LxKyeB4yCbYHsFcFrZ1dLxcwvM/iQbE+7IUu2QmGf5js5YgdOGLWzubj4Kf/Acai/Bl7UO1a2Vt/Ykgzbu//Xh3yG61jesZ/Rv9/uX8g2Qk/YvrP/9wR5Mlx3hwUMPYK3uah87+qC4OrUcvYg/5Sw7wLAw/rp+goSh3LRTh9ezjzwQgUklTMgGfrVp5Ym0ETrZHa6Mo7ujXnFlx5Dwzi9tElfj9OQGrFUxF2AnS1FPtNaJwhNj2kqcqV0McQr5es= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:DM3PR07MB2138;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2138; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2138;4:W1RqI821pUNkYg22BqHuX1Jl25WtsH4/3eV7Y+vgnqEss/dd5TupNAy1PDgwxgXw/nSx4hByVkOpNC/lfVOsdetob+fllR8jkOAE7w87I9NnIDjdApJLiYjyM+TVQnNsSfyiwp++31GYoCSFSMN9dXOHKq/4T6EaLnINW/sFrHp2gPMLLunYPMw2PyzVZpH2aljMCzFKbfgW4soGION61F0PNvK9bSkPw2bSLeYbTDbhxXZIUqkdwA+eo0uKu9zidbLJrX/1Y1moqaWYrpFNzVomYEVFzz7udxw1vXEhvZ5QQtQi7b2cIa4BBBY21MlxyRQHWtWbsXyJ3k0oRpL2SDlr5uTU01BEkwLA7046AwCBJJg5n8Gk0MS5ZwbYGl/n X-Forefront-PRVS: 0864A36BBF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(377454003)(479174004)(24454002)(586003)(66066001)(33656002)(1096002)(3846002)(6116002)(5004730100002)(230700001)(5008740100001)(50466002)(2950100001)(2906002)(80316001)(110136002)(64126003)(4326007)(19580405001)(23756003)(19580395003)(5001960100002)(77096005)(36756003)(122386002)(40100003)(87976001)(53416004)(47776003)(92566002)(189998001)(65816999)(54356999)(59896002)(76176999)(87266999)(50986999)(65806001)(42186005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2138;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;DM3PR07MB2138;23:EM1Ojkfup0Z+OhGe5J4GHSxDKxMhOwyuiuV6Fgz?= =?iso-8859-1?Q?dXlcztWKa86EOxwORacjWyDVLpyp6QnYD6RwQUrxixSoHxeJQupFqaIaCJ?= =?iso-8859-1?Q?2mnLS7Q/ujnNmhSqMegzU+IUXp4xHFlkqwlNOFN0Vx2C/kRXI22jledUPR?= =?iso-8859-1?Q?F1Bi/lNvNxRy+Pa7x1P5PqNwy6fGlsVw0seY3NXVRrZ2hR9KSyS3W44zNx?= =?iso-8859-1?Q?MwdE30W9qbizYIz4QDfa5iYGyk21zRDZa2KQQB6aSTQmhASTqH1D198Wpa?= =?iso-8859-1?Q?T8Wap7sG6GDwtkpWxFatvgB+rwFm4U/QQMv3D3EhgRMtJx3P1z0zH3eNSx?= =?iso-8859-1?Q?YijvkeygDMQq9GYkq8uLjyndHEgvZvTCLwMDqXc316ywSRiBRZfB7cAqU1?= =?iso-8859-1?Q?0MYuyQyF2UjiPXnXv3UXqJnj2vxRyufvIgdg9g/qQPF8xy9dBzlQltHoqy?= =?iso-8859-1?Q?6qqWCm0ZI9FeSYc9j6x2LxEOK9N7e9iAi5wOR2PrV+CE2PYxhsQsDrmc/3?= =?iso-8859-1?Q?HbtcJ4R8VEbouutR+1SlzHEGlPj/kvuX0yOCbmJwL2hgM+HGQh64wBNe+R?= =?iso-8859-1?Q?WbKFdzyCVha/pJeo7Nyy/h5/OisWcamIuk0qtJawV2WJ97lRQN8XRbCtRj?= =?iso-8859-1?Q?tYw5F0bpv2U9JI8hKjl5aaCu+yrqr/CuY8c2eVPliBj2IivFlRYcZZZR9x?= =?iso-8859-1?Q?OgpimFaIn/VOCNDMzB5FwfZ6Ging4VdGMULBQrsur6dKw75vhVs5bLhcY+?= =?iso-8859-1?Q?DtNm0CuzjS6ImaE/bFblRVz/ejW6rl7sDtIX8aTh2Hc4HhMdoJeX7NsVxc?= =?iso-8859-1?Q?c8jEmCE/zLsgPc1elZHPoDe3IiKslHFQ7+raryNxc4y3TY3z/CreRQm39j?= =?iso-8859-1?Q?gIGhRFIy7svWRtqlpjiRiDD01Tm2fpYxxf1EEwnA4Q4OV7f7UgiqAFkk0s?= =?iso-8859-1?Q?8aX3wbDFlCQ1gZJyVPmNyu8nR6x2iRuWPeq+Alu4K/TWaZxYessfELHjxC?= =?iso-8859-1?Q?x5tB2aMmzHxB6AhhRFJf67NMB1GvTJ2LQy9D0h8EDLGRNEpiTqKK3ZhlBS?= =?iso-8859-1?Q?EbI1BDAtbyHY2/XGgnH5eXL0+T1He5tl4NW+TeNLEy9V+AaJMtsHXXiGIc?= =?iso-8859-1?Q?CPOEPKEkgclKaXmmKh99KQHslR2gZrFSN8g4BBmmAaGV4/9U=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2138;5:eWExmyFj3qb65szMBY11HH7ofnJ1ljAbbcdecJh0eOd148ewMdeHOGN8QcjOuHdTL5yw0rzrR9BS+rx9eROBKdqdcXTB4w06/IPJ6uQApVbrLZcEQ+JHfh2TPuHe5DIYYV+XDJY78Xyjs7v6hJpQIQ==;24:zXd7KVxamUt1tryii5NCtfQCtwuHHydmDvS4UkxCE2S4WYw4tZ24sIEhcVYium0pLSefRc7SKbdDooznev69tIKWeujM4Th8AEav5pcKcfo= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2016 01:26:38.8579 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2138 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/23/2016 11:36 AM, Rob Herring wrote: > On Fri, Feb 19, 2016 at 05:13:17PM -0800, David Daney wrote: >> From: Ganapatrao Kulkarni >> >> ADD device tree node parsing for NUMA topology using device >> "numa-node-id" property distance-map. > > I still want an adequate explanation why NUMA setup cannot be done with > an unflattened tree. PowerPC manages to do that and should have a > similar init flow being memblock based, so I would expect arm64 can too. Many things could be done. Really, we want to know what *should* be done. In the context of the current arm64 memory initialization we (more or less) do: 1) early_init_fdt_scan_reserved_mem(); 2) memory_present() 3) sparse_init() 4) other things 5) unflatten_device_tree() We are already reading information out of the FDT at #1. This patch set adds a step between 1 and 2 where we read NUMA information out of the FDT. Hypothetically, it might be possible to rewrite the arm64 setup code so that the ordering was different, and the NUMA setup was done on the unflattened tree, but that would certainly be a much more invasive patch. If the arm64 maintainers would like a rewrite of: arch/arm64/kernel/setup.c arch/arm64/mm/init.c arch/arm64/mm/mm/mmu.c . . . we can discuss doing NUMA setup with the unflattened tree. With the current memory initialization code, I think it makes more sense to parse the NUMA information out of the flattened form. David Daney From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: [PATCH v11 08/10] dt, numa: Add NUMA dt binding implementation. Date: Thu, 25 Feb 2016 17:26:34 -0800 Message-ID: <56CFA9CA.6090803@caviumnetworks.com> References: <1455930799-5371-1-git-send-email-ddaney.cavm@gmail.com> <1455930799-5371-9-git-send-email-ddaney.cavm@gmail.com> <20160223193651.GA8491@rob-hp-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160223193651.GA8491@rob-hp-laptop> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: David Daney , Will Deacon , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ard Biesheuvel , Frank Rowand , Grant Likely , Catalin Marinas , Matt Fleming , linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ganapatrao Kulkarni , Robert Richter , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Daney List-Id: devicetree@vger.kernel.org On 02/23/2016 11:36 AM, Rob Herring wrote: > On Fri, Feb 19, 2016 at 05:13:17PM -0800, David Daney wrote: >> From: Ganapatrao Kulkarni >> >> ADD device tree node parsing for NUMA topology using device >> "numa-node-id" property distance-map. > > I still want an adequate explanation why NUMA setup cannot be done with > an unflattened tree. PowerPC manages to do that and should have a > similar init flow being memblock based, so I would expect arm64 can too. Many things could be done. Really, we want to know what *should* be done. In the context of the current arm64 memory initialization we (more or less) do: 1) early_init_fdt_scan_reserved_mem(); 2) memory_present() 3) sparse_init() 4) other things 5) unflatten_device_tree() We are already reading information out of the FDT at #1. This patch set adds a step between 1 and 2 where we read NUMA information out of the FDT. Hypothetically, it might be possible to rewrite the arm64 setup code so that the ordering was different, and the NUMA setup was done on the unflattened tree, but that would certainly be a much more invasive patch. If the arm64 maintainers would like a rewrite of: arch/arm64/kernel/setup.c arch/arm64/mm/init.c arch/arm64/mm/mm/mmu.c . . . we can discuss doing NUMA setup with the unflattened tree. With the current memory initialization code, I think it makes more sense to parse the NUMA information out of the flattened form. David Daney -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: ddaney@caviumnetworks.com (David Daney) Date: Thu, 25 Feb 2016 17:26:34 -0800 Subject: [PATCH v11 08/10] dt, numa: Add NUMA dt binding implementation. In-Reply-To: <20160223193651.GA8491@rob-hp-laptop> References: <1455930799-5371-1-git-send-email-ddaney.cavm@gmail.com> <1455930799-5371-9-git-send-email-ddaney.cavm@gmail.com> <20160223193651.GA8491@rob-hp-laptop> Message-ID: <56CFA9CA.6090803@caviumnetworks.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 02/23/2016 11:36 AM, Rob Herring wrote: > On Fri, Feb 19, 2016 at 05:13:17PM -0800, David Daney wrote: >> From: Ganapatrao Kulkarni >> >> ADD device tree node parsing for NUMA topology using device >> "numa-node-id" property distance-map. > > I still want an adequate explanation why NUMA setup cannot be done with > an unflattened tree. PowerPC manages to do that and should have a > similar init flow being memblock based, so I would expect arm64 can too. Many things could be done. Really, we want to know what *should* be done. In the context of the current arm64 memory initialization we (more or less) do: 1) early_init_fdt_scan_reserved_mem(); 2) memory_present() 3) sparse_init() 4) other things 5) unflatten_device_tree() We are already reading information out of the FDT at #1. This patch set adds a step between 1 and 2 where we read NUMA information out of the FDT. Hypothetically, it might be possible to rewrite the arm64 setup code so that the ordering was different, and the NUMA setup was done on the unflattened tree, but that would certainly be a much more invasive patch. If the arm64 maintainers would like a rewrite of: arch/arm64/kernel/setup.c arch/arm64/mm/init.c arch/arm64/mm/mm/mmu.c . . . we can discuss doing NUMA setup with the unflattened tree. With the current memory initialization code, I think it makes more sense to parse the NUMA information out of the flattened form. David Daney