* Does Linux sync(2) wait?
@ 2004-03-21 10:31 Frank Cusack
0 siblings, 0 replies; 6+ messages in thread
From: Frank Cusack @ 2004-03-21 10:31 UTC (permalink / raw)
To: lkml
Looking at 2.4 and 2.6 sources, Linux does appear to wait before returning.
I'm especially interested if NFS data is sent to the server. (I want to
be able to take a stable snapshot of a netapp volume.)
But on my RHL 9 system, I have 3 different man pages and an info page,
all of which say something different.
sync(2) says:
According to the standard specification (e.g., SVID), sync() schedules
the writes, but may return before the actual writing is done. However,
since version 1.3.20 Linux does actually wait.
sync(8) says:
On Linux, sync is only guaranteed to schedule the dirty blocks for
writing; it can actually take a short time before all the blocks are
finally written.
sync(1) is in the middle and doesn't really say anything, it refers to
the info page which also isn't specific.
/fc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does Linux sync(2) wait?
[not found] <1C8xa-5lk-5@gated-at.bofh.it>
@ 2004-03-21 15:30 ` Pascal Schmidt
2004-03-22 0:59 ` Chris Wedgwood
0 siblings, 1 reply; 6+ messages in thread
From: Pascal Schmidt @ 2004-03-21 15:30 UTC (permalink / raw)
To: Frank Cusack; +Cc: linux-kernel
On Sun, 21 Mar 2004 11:40:08 +0100, you wrote in linux.kernel:
> Looking at 2.4 and 2.6 sources, Linux does appear to wait before returning.
> I'm especially interested if NFS data is sent to the server. (I want to
> be able to take a stable snapshot of a netapp volume.)
No idea about NFS, but sync(1) does wait. When I push 500M out to my
MO drive, the cp operation returns fairly quickly because I usually
have more than 500M free memory. Then I run sync(1), which takes about
20 minutes before it returns.
--
Ciao,
Pascal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does Linux sync(2) wait?
2004-03-21 15:30 ` Pascal Schmidt
@ 2004-03-22 0:59 ` Chris Wedgwood
2004-03-22 3:44 ` Chris Friesen
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wedgwood @ 2004-03-22 0:59 UTC (permalink / raw)
To: Pascal Schmidt; +Cc: Frank Cusack, linux-kernel
On Sun, Mar 21, 2004 at 04:30:53PM +0100, Pascal Schmidt wrote:
> No idea about NFS, but sync(1) does wait. When I push 500M out to my
> MO drive, the cp operation returns fairly quickly because I usually
> have more than 500M free memory. Then I run sync(1), which takes
> about 20 minutes before it returns.
20 minutes?!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does Linux sync(2) wait?
2004-03-22 0:59 ` Chris Wedgwood
@ 2004-03-22 3:44 ` Chris Friesen
2004-03-22 12:08 ` Stefan Smietanowski
0 siblings, 1 reply; 6+ messages in thread
From: Chris Friesen @ 2004-03-22 3:44 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: Pascal Schmidt, Frank Cusack, linux-kernel
Chris Wedgwood wrote:
> On Sun, Mar 21, 2004 at 04:30:53PM +0100, Pascal Schmidt wrote:
>
>
>>No idea about NFS, but sync(1) does wait. When I push 500M out to my
>>MO drive, the cp operation returns fairly quickly because I usually
>>have more than 500M free memory. Then I run sync(1), which takes
>>about 20 minutes before it returns.
>>
>
> 20 minutes?!
He did say it was a magneto-optical drive.
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does Linux sync(2) wait?
2004-03-22 3:44 ` Chris Friesen
@ 2004-03-22 12:08 ` Stefan Smietanowski
2004-03-22 14:27 ` Pascal Schmidt
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Smietanowski @ 2004-03-22 12:08 UTC (permalink / raw)
To: Chris Friesen; +Cc: Chris Wedgwood, Pascal Schmidt, Frank Cusack, linux-kernel
Hi.
>>> No idea about NFS, but sync(1) does wait. When I push 500M out to my
>>> MO drive, the cp operation returns fairly quickly because I usually
>>> have more than 500M free memory. Then I run sync(1), which takes
>>> about 20 minutes before it returns.
>>>
>>
>> 20 minutes?!
>
>
> He did say it was a magneto-optical drive.
That's 400KiB/s you know - pretty slow.
// Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does Linux sync(2) wait?
2004-03-22 12:08 ` Stefan Smietanowski
@ 2004-03-22 14:27 ` Pascal Schmidt
0 siblings, 0 replies; 6+ messages in thread
From: Pascal Schmidt @ 2004-03-22 14:27 UTC (permalink / raw)
To: Stefan Smietanowski
Cc: Chris Friesen, Chris Wedgwood, Frank Cusack, linux-kernel
On Mon, 22 Mar 2004, Stefan Smietanowski wrote:
> >> 20 minutes?!
> > He did say it was a magneto-optical drive.
> That's 400KiB/s you know - pretty slow.
Yes. It's almost exclusively used once per week for backup purposes.
Speed doesn't matter for that (about 400 MB of often changing data on
/home), reliability counts.
Data that doesn't really change (old kernel releases and such) is
also on MO, but that's "write once, than forget about it", so once
again speed doesn't matter that much.
--
Ciao,
Pascal
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-03-22 14:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-21 10:31 Does Linux sync(2) wait? Frank Cusack
[not found] <1C8xa-5lk-5@gated-at.bofh.it>
2004-03-21 15:30 ` Pascal Schmidt
2004-03-22 0:59 ` Chris Wedgwood
2004-03-22 3:44 ` Chris Friesen
2004-03-22 12:08 ` Stefan Smietanowski
2004-03-22 14:27 ` Pascal Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox