From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754249AbcIQE1E (ORCPT ); Sat, 17 Sep 2016 00:27:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44600 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbcIQE05 (ORCPT ); Sat, 17 Sep 2016 00:26:57 -0400 Date: Sat, 17 Sep 2016 09:56:45 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Rientjes , Anshuman Khandual CC: Dave Hansen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH V4] mm: Add sysfs interface to dump each node's zonelist information References: <1473150666-3875-1-git-send-email-khandual@linux.vnet.ibm.com> <1473302818-23974-1-git-send-email-khandual@linux.vnet.ibm.com> <57D1C914.9090403@intel.com> <57D63CB2.8070003@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16091704-0040-0000-0000-000001E16DB1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16091704-0041-0000-0000-00000A816753 Message-Id: <57DCC605.10305@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-17_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609170058 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/12/2016 11:43 PM, David Rientjes wrote: > On Mon, 12 Sep 2016, Anshuman Khandual wrote: > >>>>> after memory or node hot[un]plug is desirable. This change adds one >>>>> new sysfs interface (/sys/devices/system/memory/system_zone_details) >>>>> which will fetch and dump this information. >>> Doesn't this violate the "one value per file" sysfs rule? Does it >>> belong in debugfs instead? >> >> Yeah sure. Will make it a debugfs interface. >> > > So the intended reader of this file is running as root? Yeah. > >>> I also really question the need to dump kernel addresses out, filtered >>> or not. What's the point? >> >> Hmm, thought it to be an additional information. But yes its additional >> and can be dropped. >> > > I'm questioning if this information can be inferred from information > already in /proc/zoneinfo and sysfs. We know the no-fallback zonelist is > going to include the local node, and we know the other zonelists are > either node ordered or zone ordered (or do we need to extend > vm.numa_zonelist_order for default?). I may have missed what new > knowledge this interface is imparting on us. IIUC /proc/zoneinfo lists down zone internal state and statistics for all zones on the system at any given point of time. The no-fallback list contains the zones from the local node and fallback (which gets used more often than the no-fallback) list contains all zones either in node-ordered or zone-ordered manner. In most of the platforms the default being the node order but the sequence of present nodes in that order is determined by various factors like NUMA distance, load, presence of CPUs on the node etc. This order of nodes in the fallback list is the most important information derived out of this interface.