All of lore.kernel.org
 help / color / mirror / Atom feed
* close() behaviour changes depending on whether file exists or not?
@ 2016-01-07  9:59 Chris Friesen
  0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2016-01-07  9:59 UTC (permalink / raw)
  To: lkml

I'm running 3.14 on my laptop, and I'm seeing some unexpected behaviour when I 
write out to a big file.  Basically if the

If I run

strace dd if=/dev/zero of=bigfile bs=1M count=1000;cat /proc/meminfo |egrep 
"Dirty|Writeback"

I see the final close() of "bigfile" (fd 1 in the strace output) complete right 
away, and I get speeds of 1.5GB/s.  When it completes I see "Dirty" in 
/proc/meminfo right at about a GB of data.

However, if I then immediately repeat the test (so the "bigfile" file exists 
already) I see the final close() delay until the writeback is done, almost as 
though there is an implicit fsync() call.  When it completes /proc/meminfo has a 
"Dirty" value of basically nothing and a "Writeback" value of about 67MB.

Is this a known issue?  I checked a 3.10 kernel that I had hanging around and it 
showed the same behaviour.

Thanks,
Chris


PS: Please CC me on reply, I'm not subscribed to the list.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-07  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-07  9:59 close() behaviour changes depending on whether file exists or not? Chris Friesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.