* [question] hugetlb: how to find who use hugetlb?
@ 2016-09-19 2:39 ` Xishi Qiu
0 siblings, 0 replies; 9+ messages in thread
From: Xishi Qiu @ 2016-09-19 2:39 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [question] hugetlb: how to find who use hugetlb?
@ 2016-09-19 2:39 ` Xishi Qiu
0 siblings, 0 replies; 9+ messages in thread
From: Xishi Qiu @ 2016-09-19 2:39 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-19 2:39 ` Xishi Qiu
@ 2016-09-20 2:46 ` Xishi Qiu
-1 siblings, 0 replies; 9+ messages in thread
From: Xishi Qiu @ 2016-09-20 2:46 UTC (permalink / raw)
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 #
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
@ 2016-09-20 2:46 ` Xishi Qiu
0 siblings, 0 replies; 9+ messages in thread
From: Xishi Qiu @ 2016-09-20 2:46 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-20 2:46 ` Xishi Qiu
(?)
@ 2016-09-20 4:05 ` Hillf Danton
2016-09-20 4:29 ` Xishi Qiu
-1 siblings, 1 reply; 9+ messages in thread
From: Hillf Danton @ 2016-09-20 4:05 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-20 4:05 ` Hillf Danton
@ 2016-09-20 4:29 ` Xishi Qiu
2016-09-20 6:47 ` Hillf Danton
0 siblings, 1 reply; 9+ messages in thread
From: Xishi Qiu @ 2016-09-20 4:29 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-20 4:29 ` Xishi Qiu
@ 2016-09-20 6:47 ` Hillf Danton
2016-09-20 7:09 ` Xishi Qiu
0 siblings, 1 reply; 9+ messages in thread
From: Hillf Danton @ 2016-09-20 6:47 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-20 6:47 ` Hillf Danton
@ 2016-09-20 7:09 ` Xishi Qiu
2016-09-20 7:15 ` Hillf Danton
0 siblings, 1 reply; 9+ messages in thread
From: Xishi Qiu @ 2016-09-20 7:09 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [question] hugetlb: how to find who use hugetlb?
2016-09-20 7:09 ` Xishi Qiu
@ 2016-09-20 7:15 ` Hillf Danton
0 siblings, 0 replies; 9+ messages in thread
From: Hillf Danton @ 2016-09-20 7:15 UTC (permalink / raw)
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-09-20 7:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 2:39 [question] hugetlb: how to find who use hugetlb? Xishi Qiu
2016-09-19 2:39 ` Xishi Qiu
2016-09-20 2:46 ` Xishi Qiu
2016-09-20 2:46 ` Xishi Qiu
2016-09-20 4:05 ` Hillf Danton
2016-09-20 4:29 ` Xishi Qiu
2016-09-20 6:47 ` Hillf Danton
2016-09-20 7:09 ` Xishi Qiu
2016-09-20 7:15 ` Hillf Danton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.