From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751765AbdCDIVz (ORCPT ); Sat, 4 Mar 2017 03:21:55 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40263 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750721AbdCDIVy (ORCPT ); Sat, 4 Mar 2017 03:21:54 -0500 Subject: Re: [patch v2] mm, vmstat: print non-populated zones in zoneinfo To: David Rientjes , Andrew Morton References: <4acf16c5-c64b-b4f8-9a41-1926eed23fe1@linux.vnet.ibm.com> Cc: Anshuman Khandual , Vlastimil Babka , Mel Gorman , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Anshuman Khandual Date: Sat, 4 Mar 2017 13:51:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 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: 17030408-0024-0000-0000-000003ACAFFC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030408-0025-0000-0000-0000112995E9 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-04_04:,, 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-1702020001 definitions=main-1703040065 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/04/2017 04:23 AM, David Rientjes wrote: > Initscripts can use the information (protection levels) from > /proc/zoneinfo to configure vm.lowmem_reserve_ratio at boot. > > vm.lowmem_reserve_ratio is an array of ratios for each configured zone on > the system. If a zone is not populated on an arch, /proc/zoneinfo > suppresses its output. > > This results in there not being a 1:1 mapping between the set of zones > emitted by /proc/zoneinfo and the zones configured by > vm.lowmem_reserve_ratio. > > This patch shows statistics for non-populated zones in /proc/zoneinfo. > The zones exist and hold a spot in the vm.lowmem_reserve_ratio array. > Without this patch, it is not possible to determine which index in the > array controls which zone if one or more zones on the system are not > populated. > > Remaining users of walk_zones_in_node() are unchanged. Files such as > /proc/pagetypeinfo require certain zone data to be initialized properly > for display, which is not done for unpopulated zones. > > Signed-off-by: David Rientjes Reviewed-by: Anshuman Khandual