Skip to contentSkip to conversation

MM: Remove rogue readahead printk

PATCH In review Andi Kleen 4 participants 7 messages Jul 29, 2006 – Jul 30, 2006

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 8/8 MM: Remove rogue readahead printk

For some reason it triggers always with NFS root and spams the kernel logs of my nfs root boxes a lot.

---
 mm/filemap.c |    2 --
 1 files changed, 2 deletions(-)
mm/filemap.c +0 -2
Index: linux-2.6.18-rc2-git7/mm/filemap.c
===================================================================
@@ -849,8 +849,6 @@ static void shrink_readahead_size_eio(st
 		return;
 
 	ra->ra_pages /= 4;
-	printk(KERN_WARNING "Reducing readahead size to %luK\n",
-			ra->ra_pages << (PAGE_CACHE_SHIFT - 10));
 }
 
 /**
#1 lore raw
Quoted 5 lines · Andi Kleen

For some reason it triggers always with NFS root and spams the kernel logs of my nfs root boxes a lot.

Big ACK! I never really understood why we needed this printk, and yes, it does spam the syslog heavily on all NFS clients...

Cheers,
Trond

Quoted 17 lines
---
 mm/filemap.c |    2 --
 1 files changed, 2 deletions(-)

Index: linux-2.6.18-rc2-git7/mm/filemap.c
===================================================================

mm/filemap.c +0 -2
@@ -849,8 +849,6 @@ static void shrink_readahead_size_eio(st
 		return;
 
 	ra->ra_pages /= 4;
-	printk(KERN_WARNING "Reducing readahead size to %luK\n",
-			ra->ra_pages << (PAGE_CACHE_SHIFT - 10));
 }
 
 /**
#2 lore raw
Quoted 9 lines · Trond Myklebust
Quoted 5 lines · Andi Kleen

For some reason it triggers always with NFS root and spams the kernel logs of my nfs root boxes a lot.

Big ACK! I never really understood why we needed this printk, and yes, it does spam the syslog heavily on all NFS clients...

not an NFS user, but it seems like this is indicating an actual performance problem. the printk was introduced by an attempt to reduce retries after -EIO on scratched CDs/DVDs, and is intended to curb pathological behavior when one disk sector consitently cannot be read.

for some reason (maybe just busy networks, dunno), you're getting I/O errors on NFS, and the readahead window is being reduced. IMO, the proper behavior in this case would be to keep it large, or even increase it, since that would enable the network to more efficiently transfer data.

of course, it could be that some quirk of the NFS client VFS interface causes "spurious" -EIO returns. either way, i'd rather see it fixed rather than the printk removed, since it is useful to point out that some performance degradation is occuring.

NATE

#3 lore raw
Quoted 23 lines · Nate Diller
Quoted 9 lines · Trond Myklebust
Quoted 5 lines · Andi Kleen

For some reason it triggers always with NFS root and spams the kernel logs of my nfs root boxes a lot.

Big ACK! I never really understood why we needed this printk, and yes, it does spam the syslog heavily on all NFS clients...

not an NFS user, but it seems like this is indicating an actual performance problem. the printk was introduced by an attempt to reduce retries after -EIO on scratched CDs/DVDs, and is intended to curb pathological behavior when one disk sector consitently cannot be read.

for some reason (maybe just busy networks, dunno), you're getting I/O errors on NFS, and the readahead window is being reduced. IMO, the proper behavior in this case would be to keep it large, or even increase it, since that would enable the network to more efficiently transfer data.

Quoted 4 lines

of course, it could be that some quirk of the NFS client VFS interface causes "spurious" -EIO returns. either way, i'd rather see it fixed rather than the printk removed, since it is useful to point out that some performance degradation is occuring.

We have no way of telling. That printk doesn't give us any useful information whatsoever for debugging that sort of problem. It should either be replaced with something that does, or it should be thrown out.

Trond

#4 lore raw
Quoted 8 lines · On Sun, 30 Jul 2006 00:22:14 -0400 Trond Myklebust…
Quoted 4 lines

of course, it could be that some quirk of the NFS client VFS interface causes "spurious" -EIO returns. either way, i'd rather see it fixed rather than the printk removed, since it is useful to point out that some performance degradation is occuring.

We have no way of telling. That printk doesn't give us any useful information whatsoever for debugging that sort of problem. It should either be replaced with something that does, or it should be thrown out.

err, the printk has found a probable bug in NFS. That was pretty useful of it.

Do we know why nfs's readpage isn't bringing the page up to date?

#5 lore raw
Quoted 8 lines · Andrew Morton
Quoted 5 lines · On Sun, 30 Jul 2006 00:22:14 -0400 Trond Myklebust…
Quoted 4 lines

of course, it could be that some quirk of the NFS client VFS interface causes "spurious" -EIO returns. either way, i'd rather see it fixed rather than the printk removed, since it is useful to point out that some performance degradation is occuring.

Quoted 6 lines
Quoted 3 lines

We have no way of telling. That printk doesn't give us any useful information whatsoever for debugging that sort of problem. It should either be replaced with something that does, or it should be thrown out.

err, the printk has found a probable bug in NFS. That was pretty useful of it.

Not necessarily. AFAICS, the spam could be triggered by perfectly legitimate activity. For instance, someone on the server may have revoked your read permissions to the file, or may have deleted it.

Quoted 1 line

Do we know why nfs's readpage isn't bringing the page up to date?

It may be that other lurking issues were also triggering the printk. For instance I know of a couple of corner cases in the krb5 privacy code that could result in readpage failing. Those issues are being looked into.

Cheers,
Trond

author
#6 lore raw
Quoted 4 lines

Not necessarily. AFAICS, the spam could be triggered by perfectly legitimate activity. For instance, someone on the server may have revoked your read permissions to the file, or may have deleted it.

I don't think any of this was the case in the cases I saw it.

It would be probably good to investigate post 2.6.18, but for 2.6.18 itself I think removing the printk was the best short term "fix".

Quoted 6 lines
Quoted 1 line

Do we know why nfs's readpage isn't bringing the page up to date?

It may be that other lurking issues were also triggering the printk. For instance I know of a couple of corner cases in the krb5 privacy code that could result in readpage failing. Those issues are being looked into.

I don't use kerberos either.

-Andi