Phillip Susi <ps...@cfl.rr.com> writes:

> 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.

Except that the fsync() patches from RedHat were never added to the AIO
code in the kernel. The portable way for this is to mmap() the files and
msync() them with MS_ASYNC. But that makes catching write errors a
nightmare.

MfG
        Goswin


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/874ocallqc....@frosties.localdomain

Reply via email to