* unwanted disk access by the kernel?
@ 2002-03-15 6:36 Dan Maas
2002-03-15 7:00 ` Andrew Morton
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Dan Maas @ 2002-03-15 6:36 UTC (permalink / raw)
To: linux-kernel
I've been trying to set up my laptop for mobile use. I'm having a
problem with unwanted disk activity - even when the system is
completely idle, there is still an occasional trickle of disk writes
(which prevents the poor hard drive from ever spinning down).
Yes, I thought this was a user-space issue too - but even booting into
a bare-bones root environment does not stop the occasional disk
access! Here is everything that's left:
PID USER VSZ RSS TIME STAT COMMAND WCHAN
7 root 0 0 00:00:00 SW [kupdated] kupdate
6 root 0 0 00:00:00 SW [bdflush] bdflush
5 root 0 0 00:00:00 SW [kswapd] kswapd
4 root 0 0 00:00:00 SWN [ksoftirqd_CPU0] ksoftirqd
1 root 1316 524 00:00:05 S init [S] select
2 root 0 0 00:00:00 SW [keventd] context_thread
3 root 0 0 00:00:00 SW [kapmd] apm_mainloop
8 root 0 0 00:00:00 Z [khubd <defunct> exit
879 root 1316 524 00:00:00 S init [S] wait4
880 root 2556 1576 00:00:00 S \_ bash wait4
927 root 3524 1512 00:00:00 R \_ ps afx - -
If I manually spin down the disk, it always wakes up within 30 seconds
or so. During the spin-up, kupdated goes into the 'D' state and blocks
in wait_on_buffer(). This means it's writing dirty filesystem buffers,
right? So who is doing the dirtying? I've eliminated all possible
user-space sources of I/O! (strace confirms that NO user-space
processes are doing I/O; they're all sleeping...)
(I'm running a stock Linus 2.4.18 kernel, with APM enabled. The system
is Debian woody. All filesystems are ext2.)
Regards,
Dan
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: unwanted disk access by the kernel?
2002-03-15 6:36 unwanted disk access by the kernel? Dan Maas
@ 2002-03-15 7:00 ` Andrew Morton
2002-03-15 9:20 ` Jeremy Jackson
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Andrew Morton @ 2002-03-15 7:00 UTC (permalink / raw)
To: Dan Maas; +Cc: linux-kernel
Dan Maas wrote:
>
> I've been trying to set up my laptop for mobile use. I'm having a
> problem with unwanted disk activity - even when the system is
> completely idle, there is still an occasional trickle of disk writes
> (which prevents the poor hard drive from ever spinning down).
>
> Yes, I thought this was a user-space issue too - but even booting into
> a bare-bones root environment does not stop the occasional disk
> access! Here is everything that's left:
Are all filesystems mounted with the `noatime' mount option?
> PID USER VSZ RSS TIME STAT COMMAND WCHAN
> 7 root 0 0 00:00:00 SW [kupdated] kupdate
> 6 root 0 0 00:00:00 SW [bdflush] bdflush
> 5 root 0 0 00:00:00 SW [kswapd] kswapd
> 4 root 0 0 00:00:00 SWN [ksoftirqd_CPU0] ksoftirqd
> 1 root 1316 524 00:00:05 S init [S] select
> 2 root 0 0 00:00:00 SW [keventd] context_thread
> 3 root 0 0 00:00:00 SW [kapmd] apm_mainloop
> 8 root 0 0 00:00:00 Z [khubd <defunct> exit
eww. Does khubd always do that? Does this patch make it behave?
--- linux-2.4.19-pre3/drivers/usb/hub.c Mon Mar 11 14:53:21 2002
+++ linux-akpm/drivers/usb/hub.c Thu Mar 14 22:59:17 2002
@@ -908,6 +908,7 @@ static int usb_hub_thread(void *__hub)
*/
daemonize();
+ reparent_to_init();
/* Setup a nice name */
strcpy(current->comm, "khubd");
-
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: unwanted disk access by the kernel?
2002-03-15 6:36 unwanted disk access by the kernel? Dan Maas
2002-03-15 7:00 ` Andrew Morton
@ 2002-03-15 9:20 ` Jeremy Jackson
2002-03-15 18:46 ` Dan Maas
2002-03-15 14:35 ` Alan Cox
2002-03-19 15:06 ` Pavel Machek
3 siblings, 1 reply; 9+ messages in thread
From: Jeremy Jackson @ 2002-03-15 9:20 UTC (permalink / raw)
To: Dan Maas, linux-kernel
You may also want to mount your (root) filesystem(s) with the
"noatime" option... check the linux laptops site for other tips.
----- Original Message -----
From: "Dan Maas" <dmaas@dcine.com>
To: <linux-kernel@vger.kernel.org>
Sent: Thursday, March 14, 2002 10:36 PM
Subject: unwanted disk access by the kernel?
> I've been trying to set up my laptop for mobile use. I'm having a
> problem with unwanted disk activity - even when the system is
> completely idle, there is still an occasional trickle of disk writes
-SNIP-
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-15 9:20 ` Jeremy Jackson
@ 2002-03-15 18:46 ` Dan Maas
2002-03-15 19:02 ` Alan Cox
0 siblings, 1 reply; 9+ messages in thread
From: Dan Maas @ 2002-03-15 18:46 UTC (permalink / raw)
To: Jeremy Jackson, linux-kernel; +Cc: Alan Cox
> You may also want to mount your (root) filesystem(s) with the
> "noatime" option... check the linux laptops site for other tips.
Thanks Jeremy and Alan - mounting the filesystems 'noatime,nodiratime'
cleared up the last bits of disk activity. (I'm still curious why atime
updates would be happening even though the system is as idle as I can make
it without cutting the power... =)
By the way, if I enable 'APM makes CPU idle calls when idle,' I get a
constant stream of 'apm_do_idle failed (3)' messages. APM also doesn't seem
to be able to power the machine down... This is a Dell Inspiron 7500...
Maybe I should try ACPI?
Regards,
Dan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-15 18:46 ` Dan Maas
@ 2002-03-15 19:02 ` Alan Cox
2002-03-16 1:30 ` Mike Fedyk
0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2002-03-15 19:02 UTC (permalink / raw)
To: Dan Maas; +Cc: Jeremy Jackson, linux-kernel, Alan Cox
> By the way, if I enable 'APM makes CPU idle calls when idle,' I get a
> constant stream of 'apm_do_idle failed (3)' messages. APM also doesn't seem
> to be able to power the machine down... This is a Dell Inspiron 7500...
> Maybe I should try ACPI?
ACPI is a bit experimental right now but if you want some fun then obviously
the more people who break the ACPI code the better.
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-15 19:02 ` Alan Cox
@ 2002-03-16 1:30 ` Mike Fedyk
2002-03-16 15:11 ` Joachim Breuer
0 siblings, 1 reply; 9+ messages in thread
From: Mike Fedyk @ 2002-03-16 1:30 UTC (permalink / raw)
To: Alan Cox; +Cc: Dan Maas, Jeremy Jackson, linux-kernel
On Fri, Mar 15, 2002 at 07:02:30PM +0000, Alan Cox wrote:
> > By the way, if I enable 'APM makes CPU idle calls when idle,' I get a
> > constant stream of 'apm_do_idle failed (3)' messages. APM also doesn't seem
> > to be able to power the machine down... This is a Dell Inspiron 7500...
> > Maybe I should try ACPI?
>
> ACPI is a bit experimental right now but if you want some fun then obviously
> the more people who break the ACPI code the better.
For my uses (basically just power down) ACPI has worked on 99% of my
machines (mix of pii & piii).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-16 1:30 ` Mike Fedyk
@ 2002-03-16 15:11 ` Joachim Breuer
0 siblings, 0 replies; 9+ messages in thread
From: Joachim Breuer @ 2002-03-16 15:11 UTC (permalink / raw)
To: Alan Cox; +Cc: Dan Maas, Jeremy Jackson, linux-kernel
Mike Fedyk <mfedyk@matchmail.com> writes:
> On Fri, Mar 15, 2002 at 07:02:30PM +0000, Alan Cox wrote:
>> > By the way, if I enable 'APM makes CPU idle calls when idle,' I get a
>> > constant stream of 'apm_do_idle failed (3)' messages. APM also doesn't seem
>> > to be able to power the machine down... This is a Dell Inspiron 7500...
>> > Maybe I should try ACPI?
>>
>> ACPI is a bit experimental right now but if you want some fun then obviously
>> the more people who break the ACPI code the better.
>
> For my uses (basically just power down) ACPI has worked on 99% of my
> machines (mix of pii & piii).
Same here (I'd rather say 100%). Temperature reading seems to work in
all machines as well. That's just machines I'm actually touching,
though; so they tend not to be supermarket bargains.
On a halfway related note APM fails to power down my Siemens PCD-5ND
(Pentium 75 laptop) (which obviously doesn't support ACPI).
The interesting thing is that the kernel shipped with RH 7.2 does
power down the machine, just the one from kernel.org doesn't
(2.4.16). (APM compiled as a module).
Is there some patch I could try?
So long,
Joe
--
"I use emacs, which might be thought of as a thermonuclear
word processor."
-- Neal Stephenson, "In the beginning... was the command line"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-15 6:36 unwanted disk access by the kernel? Dan Maas
2002-03-15 7:00 ` Andrew Morton
2002-03-15 9:20 ` Jeremy Jackson
@ 2002-03-15 14:35 ` Alan Cox
2002-03-19 15:06 ` Pavel Machek
3 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2002-03-15 14:35 UTC (permalink / raw)
To: Dan Maas; +Cc: linux-kernel
> (I'm running a stock Linus 2.4.18 kernel, with APM enabled. The system
> is Debian woody. All filesystems are ext2.)
Mounted with or without noatime ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: unwanted disk access by the kernel?
2002-03-15 6:36 unwanted disk access by the kernel? Dan Maas
` (2 preceding siblings ...)
2002-03-15 14:35 ` Alan Cox
@ 2002-03-19 15:06 ` Pavel Machek
3 siblings, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2002-03-19 15:06 UTC (permalink / raw)
To: Dan Maas; +Cc: linux-kernel
Hi!
> I've been trying to set up my laptop for mobile use. I'm having a
> problem with unwanted disk activity - even when the system is
> completely idle, there is still an occasional trickle of disk writes
> (which prevents the poor hard drive from ever spinning down).
Get noflushd.
--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
///////
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-03-19 21:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-15 6:36 unwanted disk access by the kernel? Dan Maas
2002-03-15 7:00 ` Andrew Morton
2002-03-15 9:20 ` Jeremy Jackson
2002-03-15 18:46 ` Dan Maas
2002-03-15 19:02 ` Alan Cox
2002-03-16 1:30 ` Mike Fedyk
2002-03-16 15:11 ` Joachim Breuer
2002-03-15 14:35 ` Alan Cox
2002-03-19 15:06 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox