lkml.org 
[lkml]   [1998]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectA question about sync
From
I have a question of ignorance about how sync works/could-work under
Linux. I use Linux almost exclusively on notebooks, and have been
experimenting lately with hdparm. Setting the spindown time to
something greater than 5 seconds does no good unless update is set to
something other than its default of 5 seconds also. I'm dancing (on
thin ice?) with 1800 seconds on the updates right now. If I let the
system run for about 15 minutes generating a lot of queued disk
activity, such as downloading internet news, and then type sync
manually, it's like taking a thirsty horse to a trough. This is
good/bad. The good is that everything seems to work normally on all
the flushing. The bad is that I feel this is unnecessary. During
this 15 minutes there will have been other tasks accessing the hard
disk, causing it to spin up. Why not sync then?

My questions really involve update I suppose:

1. What would it take to make update smart enough to realize that
disk activity has just occured, and it might as well flush its buffers
while the thing is spinning anyway, then go back into its sleep mode?

2. What will occur if the buffers get all used up? Will an automatic
sync occur? This would I imagine never occur with the default setting
of 5 second flushes.

3. If we do a disk-activity-activated-sync, as alluded to in the
first question, would it be very difficult to cause update to wait
until other disk activity was completed, plus some amount of slop
time? This would prevent any unnecessary thrashing, as the amount of
data to flush after 30 minutes of non-sync can be extensive.

Any comments/guidance on implementation (probably not for me as it's
been way too long since I programmed anything more difficult than a
battleship game)?


Regards,

Billy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site