Source-Changes-D archive

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

Re: CVS commit: src/bin/cp



On Sun, Oct 24, 2010 at 05:21:06AM +0000, David Holland wrote:
> On Fri, Oct 22, 2010 at 05:56:06PM +0000, Antti Kantee wrote:
>  > Disable mmap path.  With the current vnode locking scheme it has
>  > a very annoying property: if the source media is slow (like a slow
>  > network), the target file will be locked for the duration of the
>  > entire max 8MB write and cause processes attempting to e.g. stat()
>  > it to "tstile" (for several minutes in the worst case).  Revisit
>  > this if/when vnode locking gets a little smarter.
> 
> Wouldn't it be better to just ratchet back the block size to something
> like 64K that happens faster?

Or first fault the mapped region instead of madvise() like:

        int pgsz = getpagesize();
        char *q;
        volatile char c;

        for (q = p; q < p+fs->st_size; q += pgsz)
                c = *q;

-- 
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)


Home | Main Index | Thread Index | Old Index