From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by kanga.kvack.org (Postfix) with ESMTP id 806656B0069 for ; Sun, 18 Sep 2016 22:43:02 -0400 (EDT) Received: by mail-pa0-f71.google.com with SMTP id fu12so283484481pac.1 for ; Sun, 18 Sep 2016 19:43:02 -0700 (PDT) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com. [58.251.152.64]) by mx.google.com with ESMTPS id xt5si26237785pab.68.2016.09.18.19.43.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 18 Sep 2016 19:43:01 -0700 (PDT) Message-ID: <57DF4FEA.9080509@huawei.com> Date: Mon, 19 Sep 2016 10:39:38 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: [question] hugetlb: how to find who use hugetlb? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linux MM , LKML On my system, I set HugePages_Total to 2G(1024 x 2M), and I use 1G hugetlb, but the HugePages_Free is not 1G(512 x 2M), it is 280(280 x 2M) left, HugePages_Rsvd is 0, it seems someone use 232(232 x 2M) hugetlb additionally. So how to find who use the additional hugetlb? I search every process and find the total hugetlb size is only 1G, cat /proc/xx/smaps | grep KernelPageSize, then account the vma size which KernelPageSize is 2048 kB. Thanks, Xishi Qiu -- 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 mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id 32EFB6B0038 for ; Mon, 19 Sep 2016 22:46:20 -0400 (EDT) Received: by mail-io0-f197.google.com with SMTP id 92so20581552iom.2 for ; Mon, 19 Sep 2016 19:46:20 -0700 (PDT) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com. [119.145.14.66]) by mx.google.com with ESMTPS id h58si22526992otd.125.2016.09.19.19.46.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Sep 2016 19:46:19 -0700 (PDT) Message-ID: <57E0A2EC.7050809@huawei.com> Date: Tue, 20 Sep 2016 10:46:04 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: Re: [question] hugetlb: how to find who use hugetlb? References: <57DF4FEA.9080509@huawei.com> In-Reply-To: <57DF4FEA.9080509@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linux MM , LKML On 2016/9/19 10:39, Xishi Qiu wrote: > On my system, I set HugePages_Total to 2G(1024 x 2M), and I use 1G hugetlb, > but the HugePages_Free is not 1G(512 x 2M), it is 280(280 x 2M) left, > HugePages_Rsvd is 0, it seems someone use 232(232 x 2M) hugetlb additionally. > > So how to find who use the additional hugetlb? > > I search every process and find the total hugetlb size is only 1G, > cat /proc/xx/smaps | grep KernelPageSize, then account the vma size > which KernelPageSize is 2048 kB. > > Thanks, > Xishi Qiu > I kill the processes which use hugetlb, and set 0 to nr_hugepages. My kernel version is v3.10 meminfo: HugePages_Total: 232 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 232 Hugepagesize: 2048 kB "cat /proc/*/smaps | grep KernelPageSize| grep 2048" shows nothing. linux-ZSfbIr:/home # mount | grep hugetlb cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) nodev on /dev/hugepages type hugetlbfs (rw,relatime) linux-ZSfbIr:/home # ll /dev/hugepages/ total 0 linux-ZSfbIr:/home # ll /sys/fs/cgroup/hugetlb/ total 0 -rw-r--r-- 1 root root 0 Sep 13 08:10 cgroup.clone_children --w--w--w- 1 root root 0 Sep 13 08:10 cgroup.event_control -rw-r--r-- 1 root root 0 Sep 13 08:10 cgroup.procs -r--r--r-- 1 root root 0 Sep 13 08:10 cgroup.sane_behavior -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.failcnt -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.limit_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.max_usage_in_bytes -r--r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.usage_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.failcnt -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.limit_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.max_usage_in_bytes -r--r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.usage_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 notify_on_release -rw-r--r-- 1 root root 0 Sep 13 08:10 release_agent -rw-r--r-- 1 root root 0 Sep 13 08:10 tasks linux-ZSfbIr:/home # > > -- 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 mail-io0-f199.google.com (mail-io0-f199.google.com [209.85.223.199]) by kanga.kvack.org (Postfix) with ESMTP id D00EF6B0253 for ; Tue, 20 Sep 2016 00:06:03 -0400 (EDT) Received: by mail-io0-f199.google.com with SMTP id q92so23389429ioi.3 for ; Mon, 19 Sep 2016 21:06:03 -0700 (PDT) Received: from out0-133.mail.aliyun.com (out0-133.mail.aliyun.com. [140.205.0.133]) by mx.google.com with ESMTP id i123si30928885ioa.113.2016.09.19.21.06.02 for ; Mon, 19 Sep 2016 21:06:03 -0700 (PDT) Reply-To: "Hillf Danton" From: "Hillf Danton" References: <57DF4FEA.9080509@huawei.com> <57E0A2EC.7050809@huawei.com> In-Reply-To: <57E0A2EC.7050809@huawei.com> Subject: Re: [question] hugetlb: how to find who use hugetlb? Date: Tue, 20 Sep 2016 12:05:59 +0800 Message-ID: <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Sender: owner-linux-mm@kvack.org List-ID: To: 'Xishi Qiu' , 'Linux MM' > > So how to find who use the additional hugetlb? > > Take a peek please at 5d317b2b653 ("mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status") Hillf -- 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 mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id 92A966B0038 for ; Tue, 20 Sep 2016 00:29:35 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id r126so15388315oib.2 for ; Mon, 19 Sep 2016 21:29:35 -0700 (PDT) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com. [119.145.14.65]) by mx.google.com with ESMTPS id r138si36517917oie.224.2016.09.19.21.29.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Sep 2016 21:29:34 -0700 (PDT) Message-ID: <57E0BB1C.3040104@huawei.com> Date: Tue, 20 Sep 2016 12:29:16 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: Re: [question] hugetlb: how to find who use hugetlb? References: <57DF4FEA.9080509@huawei.com> <57E0A2EC.7050809@huawei.com> <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> In-Reply-To: <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Hillf Danton Cc: 'Linux MM' On 2016/9/20 12:05, Hillf Danton wrote: >>> So how to find who use the additional hugetlb? >>> > Take a peek please at 5d317b2b653 > ("mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status") > > Hillf > Hi Hillf, This patch add the count of hugetlb for each process. If someone use hugetlb, "cat /proc/*/smaps | grep KernelPageSize| grep 2048" will show something, right? But now it is nothing, and /dev/hugepages is empty. Thanks, Xishi Qiu > > > -- 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 mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by kanga.kvack.org (Postfix) with ESMTP id 123CF6B0038 for ; Tue, 20 Sep 2016 02:47:49 -0400 (EDT) Received: by mail-pa0-f70.google.com with SMTP id mi5so16731352pab.2 for ; Mon, 19 Sep 2016 23:47:49 -0700 (PDT) Received: from out4434.biz.mail.alibaba.com (out4434.biz.mail.alibaba.com. [47.88.44.34]) by mx.google.com with ESMTP id q1si33451671paz.267.2016.09.19.23.47.47 for ; Mon, 19 Sep 2016 23:47:48 -0700 (PDT) Reply-To: "Hillf Danton" From: "Hillf Danton" References: <57DF4FEA.9080509@huawei.com> <57E0A2EC.7050809@huawei.com> <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> <57E0BB1C.3040104@huawei.com> In-Reply-To: <57E0BB1C.3040104@huawei.com> Subject: Re: [question] hugetlb: how to find who use hugetlb? Date: Tue, 20 Sep 2016 14:47:33 +0800 Message-ID: <056901d2130a$ddbf53f0$993dfbd0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Sender: owner-linux-mm@kvack.org List-ID: To: 'Xishi Qiu' Cc: 'Linux MM' > > If someone use hugetlb, "cat /proc/*/smaps | grep KernelPageSize| grep 2048" > will show something, right? But now it is nothing, and /dev/hugepages is empty. > With 4.7 or 4.8-rc7? thanks Hillf -- 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 mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 919FA6B0038 for ; Tue, 20 Sep 2016 03:09:31 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id w84so8710454wmg.1 for ; Tue, 20 Sep 2016 00:09:31 -0700 (PDT) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com. [119.145.14.65]) by mx.google.com with ESMTPS id j6si23829267wjv.96.2016.09.20.00.09.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 20 Sep 2016 00:09:30 -0700 (PDT) Message-ID: <57E0E093.6090500@huawei.com> Date: Tue, 20 Sep 2016 15:09:07 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: Re: [question] hugetlb: how to find who use hugetlb? References: <57DF4FEA.9080509@huawei.com> <57E0A2EC.7050809@huawei.com> <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> <57E0BB1C.3040104@huawei.com> <056901d2130a$ddbf53f0$993dfbd0$@alibaba-inc.com> In-Reply-To: <056901d2130a$ddbf53f0$993dfbd0$@alibaba-inc.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Hillf Danton Cc: 'Linux MM' On 2016/9/20 14:47, Hillf Danton wrote: >> >> If someone use hugetlb, "cat /proc/*/smaps | grep KernelPageSize| grep 2048" >> will show something, right? But now it is nothing, and /dev/hugepages is empty. >> > With 4.7 or 4.8-rc7? > RHEL 7.1 (kernel version is v3.10) > thanks > Hillf > > > -- 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 mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id 70C0E6B0253 for ; Tue, 20 Sep 2016 03:15:23 -0400 (EDT) Received: by mail-io0-f197.google.com with SMTP id g22so32221577ioj.1 for ; Tue, 20 Sep 2016 00:15:23 -0700 (PDT) Received: from out4433.biz.mail.alibaba.com (out4433.biz.mail.alibaba.com. [47.88.44.33]) by mx.google.com with ESMTP id y34si33350405ioe.30.2016.09.20.00.15.21 for ; Tue, 20 Sep 2016 00:15:23 -0700 (PDT) Reply-To: "Hillf Danton" From: "Hillf Danton" References: <57DF4FEA.9080509@huawei.com> <57E0A2EC.7050809@huawei.com> <055801d212f4$4b9c4b60$e2d4e220$@alibaba-inc.com> <57E0BB1C.3040104@huawei.com> <056901d2130a$ddbf53f0$993dfbd0$@alibaba-inc.com> <57E0E093.6090500@huawei.com> In-Reply-To: <57E0E093.6090500@huawei.com> Subject: Re: [question] hugetlb: how to find who use hugetlb? Date: Tue, 20 Sep 2016 15:15:08 +0800 Message-ID: <057301d2130e$b864cf50$292e6df0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Sender: owner-linux-mm@kvack.org List-ID: To: 'Xishi Qiu' Cc: 'Linux MM' > >> > >> If someone use hugetlb, "cat /proc/*/smaps | grep KernelPageSize| grep 2048" > >> will show something, right? But now it is nothing, and /dev/hugepages is empty. > >> > > With 4.7 or 4.8-rc7? > > RHEL 7.1 (kernel version is v3.10) > Then please deliver the issue directly to your distributor and wait for feedback. thanks Hillf -- 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 S1756238AbcISCjw (ORCPT ); Sun, 18 Sep 2016 22:39:52 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:34910 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbcISCjt (ORCPT ); Sun, 18 Sep 2016 22:39:49 -0400 Message-ID: <57DF4FEA.9080509@huawei.com> Date: Mon, 19 Sep 2016 10:39:38 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Linux MM , LKML Subject: [question] hugetlb: how to find who use hugetlb? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.57DF4FF2.00AD,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4d41f65f06d73f78c51ad0af9ba8f69a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On my system, I set HugePages_Total to 2G(1024 x 2M), and I use 1G hugetlb, but the HugePages_Free is not 1G(512 x 2M), it is 280(280 x 2M) left, HugePages_Rsvd is 0, it seems someone use 232(232 x 2M) hugetlb additionally. So how to find who use the additional hugetlb? I search every process and find the total hugetlb size is only 1G, cat /proc/xx/smaps | grep KernelPageSize, then account the vma size which KernelPageSize is 2048 kB. Thanks, Xishi Qiu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbcITCqT (ORCPT ); Mon, 19 Sep 2016 22:46:19 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:38445 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753259AbcITCqR (ORCPT ); Mon, 19 Sep 2016 22:46:17 -0400 Message-ID: <57E0A2EC.7050809@huawei.com> Date: Tue, 20 Sep 2016 10:46:04 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Linux MM , LKML Subject: Re: [question] hugetlb: how to find who use hugetlb? References: <57DF4FEA.9080509@huawei.com> In-Reply-To: <57DF4FEA.9080509@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.57E0A2F3.0166,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 207b895e7efb798f6102e1816c00087e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/9/19 10:39, Xishi Qiu wrote: > On my system, I set HugePages_Total to 2G(1024 x 2M), and I use 1G hugetlb, > but the HugePages_Free is not 1G(512 x 2M), it is 280(280 x 2M) left, > HugePages_Rsvd is 0, it seems someone use 232(232 x 2M) hugetlb additionally. > > So how to find who use the additional hugetlb? > > I search every process and find the total hugetlb size is only 1G, > cat /proc/xx/smaps | grep KernelPageSize, then account the vma size > which KernelPageSize is 2048 kB. > > Thanks, > Xishi Qiu > I kill the processes which use hugetlb, and set 0 to nr_hugepages. My kernel version is v3.10 meminfo: HugePages_Total: 232 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 232 Hugepagesize: 2048 kB "cat /proc/*/smaps | grep KernelPageSize| grep 2048" shows nothing. linux-ZSfbIr:/home # mount | grep hugetlb cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) nodev on /dev/hugepages type hugetlbfs (rw,relatime) linux-ZSfbIr:/home # ll /dev/hugepages/ total 0 linux-ZSfbIr:/home # ll /sys/fs/cgroup/hugetlb/ total 0 -rw-r--r-- 1 root root 0 Sep 13 08:10 cgroup.clone_children --w--w--w- 1 root root 0 Sep 13 08:10 cgroup.event_control -rw-r--r-- 1 root root 0 Sep 13 08:10 cgroup.procs -r--r--r-- 1 root root 0 Sep 13 08:10 cgroup.sane_behavior -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.failcnt -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.limit_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.max_usage_in_bytes -r--r--r-- 1 root root 0 Sep 13 08:10 hugetlb.1GB.usage_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.failcnt -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.limit_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.max_usage_in_bytes -r--r--r-- 1 root root 0 Sep 13 08:10 hugetlb.2MB.usage_in_bytes -rw-r--r-- 1 root root 0 Sep 13 08:10 notify_on_release -rw-r--r-- 1 root root 0 Sep 13 08:10 release_agent -rw-r--r-- 1 root root 0 Sep 13 08:10 tasks linux-ZSfbIr:/home # > >