[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pre-approval request for dpkg sync() changes for squeeze

On 10/24/2010 07:16 AM, Goswin von Brederlow wrote:
Or 5 minutes because sync() also needs to write out the 16GB cache data
to my usb 1.0 drive that is not involved with dpkg at all.

True, but that seems a bit of a contrived corner case. Most of the time when people are upgrading, I'd wager that they don't have many gb of dirty cache buffers already sitting in the cache. Though that does make me wonder why there isn't a sync() variant that applies only to a specific mount point. That would at least keep other unrelated mounts out of the picture.

If you are going to use fsync() to make sure you don't flush any unrelated data, then maybe you should at least use aio and issue all of the fsync calls overlapped at once, so you can hopefully have the writes combined into fewer, larger writes, with fewer seeks between them.

Then again, you could probably do better by using O_DIRECT when writing the file in the first place and avoid having to latter flush at all.

Reply to: