* 2.6.33 pagemap endless read loop
@ 2010-01-10 2:09 Andi Kleen
2010-01-10 6:33 ` Américo Wang
[not found] ` <20100113141648.42eff724.akpm@linux-foundation.org>
0 siblings, 2 replies; 11+ messages in thread
From: Andi Kleen @ 2010-01-10 2:09 UTC (permalink / raw)
To: linux-kernel
An LTP run on x86-64/2.6.33-rc3 run right now results in "proc01" hanging
lr-x------ 1 root root 64 2010-01-10 02:28 7 -> /proc/2679/task/2679/pagemap
strace shows an endless loop of
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 10
cat of that file hangs in the same way so it seems like a kernel bug.
A cat of /proc/2679/pagemap also hangs, in fact any pagemap cat seems to.
I tried to revert the latest change from Horiguchi-san:
commit 5dc37642cbce34619e4588a9f0bdad1d2f870956
Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date: Mon Dec 14 18:00:01 2009 -0800
mm hugetlb: add hugepage support to pagemap
but that didn't fix it, so it must be something else.
Haven't done further bisect or anything, should be easy to reproduce.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.33 pagemap endless read loop
2010-01-10 2:09 2.6.33 pagemap endless read loop Andi Kleen
@ 2010-01-10 6:33 ` Américo Wang
2010-01-10 12:37 ` Andi Kleen
[not found] ` <20100113141648.42eff724.akpm@linux-foundation.org>
1 sibling, 1 reply; 11+ messages in thread
From: Américo Wang @ 2010-01-10 6:33 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
On Sun, Jan 10, 2010 at 03:09:55AM +0100, Andi Kleen wrote:
>
>An LTP run on x86-64/2.6.33-rc3 run right now results in "proc01" hanging
>
>lr-x------ 1 root root 64 2010-01-10 02:28 7 -> /proc/2679/task/2679/pagemap
>
>strace shows an endless loop of
>
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 1024
>read(7, "\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0\0\0\0\0\6\0\0\0"..., 1024) = 10
>
>cat of that file hangs in the same way so it seems like a kernel bug.
>A cat of /proc/2679/pagemap also hangs, in fact any pagemap cat seems to.
>
Are you sure?
On my 32bit machine, it runs for a long time, but finally exits.
>From the document of pagemap, it is the mapping of all the virtual pages
of a process, on x86-32, it should be 4G/4K = 1024*1024 pages, also
that when you 'cat' it, tty layer is involved to display it too.
--
Live like a child, think like the god.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.33 pagemap endless read loop
2010-01-10 6:33 ` Américo Wang
@ 2010-01-10 12:37 ` Andi Kleen
2010-01-12 5:59 ` Mike Galbraith
2010-01-12 15:32 ` Américo Wang
0 siblings, 2 replies; 11+ messages in thread
From: Andi Kleen @ 2010-01-10 12:37 UTC (permalink / raw)
To: Américo Wang; +Cc: Andi Kleen, linux-kernel
> Are you sure
I don't know if it's really endless, but it's doing a good emulation
of it if it's not.
>
> On my 32bit machine, it runs for a long time, but finally exits.
That was on 64bit.
proc01 had accumulated several minutes of CPU time when I stopped it.
> From the document of pagemap, it is the mapping of all the virtual pages
> of a process, on x86-32, it should be 4G/4K = 1024*1024 pages, also
Only the mapped ones surely?
Right now it looks like it dumps all the holes and that obviously
will never finish on 64bit which has 47bits of address space.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.33 pagemap endless read loop
2010-01-10 12:37 ` Andi Kleen
@ 2010-01-12 5:59 ` Mike Galbraith
2010-01-12 15:32 ` Américo Wang
1 sibling, 0 replies; 11+ messages in thread
From: Mike Galbraith @ 2010-01-12 5:59 UTC (permalink / raw)
To: Andi Kleen; +Cc: Américo Wang, linux-kernel
On Sun, 2010-01-10 at 13:37 +0100, Andi Kleen wrote:
> > Are you sure
>
> I don't know if it's really endless, but it's doing a good emulation
> of it if it's not.
>
> >
> > On my 32bit machine, it runs for a long time, but finally exits.
>
> That was on 64bit.
>
> proc01 had accumulated several minutes of CPU time when I stopped it.
>
> > From the document of pagemap, it is the mapping of all the virtual pages
> > of a process, on x86-32, it should be 4G/4K = 1024*1024 pages, also
>
> Only the mapped ones surely?
>
> Right now it looks like it dumps all the holes and that obviously
> will never finish on 64bit which has 47bits of address space.
Takes forever if you whack .pagemap_pte_hole too, just spends it's life
in pagemap_pte_range() instead.
start_vaddr:0x0 end_vaddr:0x7ffffffff000
Hm, zillion paces ain't a walk.
-Mike
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.33 pagemap endless read loop
2010-01-10 12:37 ` Andi Kleen
2010-01-12 5:59 ` Mike Galbraith
@ 2010-01-12 15:32 ` Américo Wang
2010-01-12 16:28 ` Andi Kleen
1 sibling, 1 reply; 11+ messages in thread
From: Américo Wang @ 2010-01-12 15:32 UTC (permalink / raw)
To: Andi Kleen; +Cc: Américo Wang, linux-kernel
On Sun, Jan 10, 2010 at 01:37:02PM +0100, Andi Kleen wrote:
>> Are you sure
>
>I don't know if it's really endless, but it's doing a good emulation
>of it if it's not.
>
>>
>> On my 32bit machine, it runs for a long time, but finally exits.
>
>That was on 64bit.
>
>proc01 had accumulated several minutes of CPU time when I stopped it.
>
>> From the document of pagemap, it is the mapping of all the virtual pages
>> of a process, on x86-32, it should be 4G/4K = 1024*1024 pages, also
>
>Only the mapped ones surely?
>
>Right now it looks like it dumps all the holes and that obviously
>will never finish on 64bit which has 47bits of address space.
>
Hmm, could you please try:
time cat /proc/self/pagemap >/dev/null
? Is it much faster than:
time cat /proc/self/pagemap
?
Thanks!
--
Live like a child, think like the god.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.33 pagemap endless read loop
2010-01-12 15:32 ` Américo Wang
@ 2010-01-12 16:28 ` Andi Kleen
2010-01-13 2:08 ` Américo Wang
0 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2010-01-12 16:28 UTC (permalink / raw)
To: Américo Wang; +Cc: Andi Kleen, linux-kernel
> Hmm, could you please try:
>
> time cat /proc/self/pagemap >/dev/null
>
I stopped it after a minute of CPU time...
Obviously reading 47bits of zeroes take a long time.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.33 pagemap endless read loop
2010-01-12 16:28 ` Andi Kleen
@ 2010-01-13 2:08 ` Américo Wang
0 siblings, 0 replies; 11+ messages in thread
From: Américo Wang @ 2010-01-13 2:08 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
On Wed, Jan 13, 2010 at 12:28 AM, Andi Kleen <andi@firstfloor.org> wrote:
>> Hmm, could you please try:
>>
>> time cat /proc/self/pagemap >/dev/null
>>
>
> I stopped it after a minute of CPU time...
>
> Obviously reading 47bits of zeroes take a long time.
>
Yeah, but this just proves it is not endless, doesn't it? :)
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20100113141648.42eff724.akpm@linux-foundation.org>]
end of thread, other threads:[~2010-01-14 17:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10 2:09 2.6.33 pagemap endless read loop Andi Kleen
2010-01-10 6:33 ` Américo Wang
2010-01-10 12:37 ` Andi Kleen
2010-01-12 5:59 ` Mike Galbraith
2010-01-12 15:32 ` Américo Wang
2010-01-12 16:28 ` Andi Kleen
2010-01-13 2:08 ` Américo Wang
[not found] ` <20100113141648.42eff724.akpm@linux-foundation.org>
[not found] ` <1263421562.29868.5000.camel@calx>
[not found] ` <20100113143055.7bea30c5.akpm@linux-foundation.org>
[not found] ` <1263423916.29868.5009.camel@calx>
[not found] ` <20100113151502.fa425247.akpm@linux-foundation.org>
[not found] ` <20100114055319.GA17671@localhost>
[not found] ` <20100113221013.b1beecb4.akpm@linux-foundation.org>
2010-01-14 8:06 ` Wu Fengguang
2010-01-14 8:30 ` Andi Kleen
2010-01-14 8:52 ` [PATCH] pagemap: early return on unmapped areas Wu Fengguang
2010-01-14 17:02 ` Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox