From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K.V" Subject: Re: [PATCH] proc: mm: export PTE sizes directly in smaps (v3) Date: Fri, 02 Dec 2016 21:13:19 +0530 Message-ID: <877f7ie3qg.fsf@linux.vnet.ibm.com> References: <20161129201703.CE9D5054@viggo.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20161129201703.CE9D5054@viggo.jf.intel.com> Sender: owner-linux-mm@kvack.org To: 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 List-Id: linux-arch.vger.kernel.org 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 001b2d01.pphosted.com ([148.163.156.1]:39776 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbcLBPnv (ORCPT ); Fri, 2 Dec 2016 10:43:51 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uB2FZcUL099559 for ; Fri, 2 Dec 2016 10:43:29 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2737vtx83q-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Dec 2016 10:43:28 -0500 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Dec 2016 08:43:27 -0700 From: "Aneesh Kumar K.V" 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 Message-ID: <877f7ie3qg.fsf@linux.vnet.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Hansen , linux-kernel@vger.kernel.org Cc: 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 Message-ID: <20161202154319.yC054LKIqzNczb3SdPlV8YkseL-c62qed0WaXnhAxKk@z> 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 179A16B0038 for ; Fri, 2 Dec 2016 10:43:32 -0500 (EST) Received: by mail-wm0-f70.google.com with SMTP id g23so3798183wme.4 for ; Fri, 02 Dec 2016 07:43:32 -0800 (PST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id l6si5766687wje.169.2016.12.02.07.43.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 07:43:31 -0800 (PST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uB2FZH0X088192 for ; Fri, 2 Dec 2016 10:43:29 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2737w961vm-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Dec 2016 10:43:29 -0500 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Dec 2016 08:43:27 -0700 From: "Aneesh Kumar K.V" 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 Message-Id: <877f7ie3qg.fsf@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Dave Hansen , linux-kernel@vger.kernel.org Cc: 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 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 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 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