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 Mon, Oct 25, 2010 at 11:17:22AM +0200, Juergen Hannken-Illjes wrote:
> 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;

That won't really help - the pages could easily be discarded almost
immediately - eg in order to fault in a later page.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index