Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753623AbcLBPny (ORCPT ); Fri, 2 Dec 2016 10:43:54 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44503 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750888AbcLBPnv (ORCPT ); Fri, 2 Dec 2016 10:43:51 -0500 From: "Aneesh Kumar K.V" To: Dave Hansen , linux-kernel@vger.kernel.org Cc: Dave Hansen , hch@lst.de, akpm@linux-foundation.org, dan.j.williams@intel.com, khandual@linux.vnet.ibm.com, vbabka@suse.cz, linux-mm@kvack.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] proc: mm: export PTE sizes directly in smaps (v3) In-Reply-To: <20161129201703.CE9D5054@viggo.jf.intel.com> References: <20161129201703.CE9D5054@viggo.jf.intel.com> Date: Fri, 02 Dec 2016 21:13:19 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16120215-8235-0000-0000-000009BDDAAB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006180; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000193; SDB=6.00788367; UDB=6.00381460; IPR=6.00566043; BA=6.00004937; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013515; XFM=3.00000011; UTC=2016-12-02 15:43:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16120215-8236-0000-0000-000036F168A2 Message-Id: <877f7ie3qg.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-02_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612020245 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 32 Dave Hansen writes: > Andrew, you can drop proc-mm-export-pte-sizes-directly-in-smaps-v2.patch, > and replace it with this. > ..... > diff -puN mm/hugetlb.c~smaps-pte-sizes mm/hugetlb.c > --- a/mm/hugetlb.c~smaps-pte-sizes 2016-11-28 14:21:37.555519365 -0800 > +++ b/mm/hugetlb.c 2016-11-28 14:28:49.186234688 -0800 > @@ -2763,6 +2763,17 @@ void __init hugetlb_add_hstate(unsigned > huge_page_size(h)/1024); > > parsed_hstate = h; > + > + /* > + * PGD_SIZE isn't widely made available by architecures, > + * so use PUD_SIZE*PTRS_PER_PUD as a substitute. > + * > + * Check for sizes that might be mapped by a PGD. There > + * are none of these known today, but be on the lookout. > + * If this trips, we will need to update the mss->rss_* > + * code in fs/proc/task_mmu.c. > + */ > + WARN_ON_ONCE((PAGE_SIZE << order) >= PUD_SIZE * PTRS_PER_PUD); > } This will trip for ppc64 16GB hugepage. For ppc64 we have the 16G at pgd level. -aneesh