Re: CVS commit: src/bin/cp

2010-10-25 Thread Matthias Scheler
On Tue, Oct 26, 2010 at 05:05:28AM +1100, matthew green wrote: > > > On Mon, Oct 25, 2010 at 08:52:43AM +0100, Matthias Scheler wrote: > > > On Sun, Oct 24, 2010 at 10:56:40PM +, David Holland wrote: > > > > Anyway, ISTM that writing from the mmap buffer in say 64K chunks would > > > > retain

Re: CVS commit: src/bin/cp

2010-10-25 Thread Juergen Hannken-Illjes
On Mon, Oct 25, 2010 at 06:46:36PM +0200, Joerg Sonnenberger wrote: > On Mon, Oct 25, 2010 at 06:41:11PM +0200, Juergen Hannken-Illjes wrote: > > > Do we implement MADV_WILLNEED? > > > > According to the man page "This WILL NOT fault pages in from backing store". > > The version of the man page I

re: CVS commit: src/bin/cp

2010-10-25 Thread matthew green
> On Mon, Oct 25, 2010 at 08:52:43AM +0100, Matthias Scheler wrote: > > On Sun, Oct 24, 2010 at 10:56:40PM +, David Holland wrote: > > > Anyway, ISTM that writing from the mmap buffer in say 64K chunks would > > > retain nearly all the advantages and get rid of the latency problem. > > > > Th

Re: CVS commit: src/bin/cp

2010-10-25 Thread Joerg Sonnenberger
On Mon, Oct 25, 2010 at 06:41:11PM +0200, Juergen Hannken-Illjes wrote: > > Do we implement MADV_WILLNEED? > > According to the man page "This WILL NOT fault pages in from backing store". The version of the man page I have says "It might or might not fault pages in from backing store". Joerg

Re: CVS commit: src/bin/cp

2010-10-25 Thread David Laight
On Sun, Oct 24, 2010 at 10:56:40PM +, David Holland wrote: > > > > I think write() only needs to lock the the file enough to ensure that > > the file offset is correct. > > No, since in general the file is also being extended (certainly in > this case it is) it also has to lock the file si

Re: CVS commit: src/bin/cp

2010-10-25 Thread David Laight
On Mon, Oct 25, 2010 at 11:17:22AM +0200, Juergen Hannken-Illjes wrote: > On Sun, Oct 24, 2010 at 05:21:06AM +, David Holland wrote: > > On Fri, Oct 22, 2010 at 05:56:06PM +, Antti Kantee wrote: > > > Disable mmap path. With the current vnode locking scheme it has > > > a very annoying p

Re: CVS commit: src/bin/cp

2010-10-25 Thread Juergen Hannken-Illjes
On Mon, Oct 25, 2010 at 06:30:54PM +0200, Joerg Sonnenberger wrote: > On Mon, Oct 25, 2010 at 11:17:22AM +0200, Juergen Hannken-Illjes wrote: > > On Sun, Oct 24, 2010 at 05:21:06AM +, David Holland wrote: > > > On Fri, Oct 22, 2010 at 05:56:06PM +, Antti Kantee wrote: > > > > Disable mmap

Re: CVS commit: src/bin/cp

2010-10-25 Thread Joerg Sonnenberger
On Mon, Oct 25, 2010 at 11:17:22AM +0200, Juergen Hannken-Illjes wrote: > On Sun, Oct 24, 2010 at 05:21:06AM +, David Holland wrote: > > On Fri, Oct 22, 2010 at 05:56:06PM +, Antti Kantee wrote: > > > Disable mmap path. With the current vnode locking scheme it has > > > a very annoying p

Re: CVS commit: src/bin/cp

2010-10-25 Thread Juergen Hannken-Illjes
On Sun, Oct 24, 2010 at 05:21:06AM +, David Holland wrote: > On Fri, Oct 22, 2010 at 05:56:06PM +, 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

Re: CVS commit: src/bin/cp

2010-10-25 Thread Matthias Scheler
On Mon, Oct 25, 2010 at 08:52:43AM +0100, Matthias Scheler wrote: > On Sun, Oct 24, 2010 at 10:56:40PM +, David Holland wrote: > > Anyway, ISTM that writing from the mmap buffer in say 64K chunks would > > retain nearly all the advantages and get rid of the latency problem. > > The way the cod

Re: CVS commit: src/bin/cp

2010-10-25 Thread Matthias Scheler
On Sun, Oct 24, 2010 at 10:56:40PM +, David Holland wrote: > Anyway, ISTM that writing from the mmap buffer in say 64K chunks would > retain nearly all the advantages and get rid of the latency problem. The way the code is currently written it only uses mmap(2) for files smaller than 8MB anywa