From owner-freebsd-hackers Sat Apr 22 12:20: 2 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id ECC9637B562; Sat, 22 Apr 2000 12:19:56 -0700 (PDT) (envelope-from green@FreeBSD.org) Date: Sat, 22 Apr 2000 15:19:55 -0400 (EDT) From: Brian Fundakowski Feldman X-Sender: green@green.dyndns.org To: Matthew Dillon Cc: Alfred Perlstein , Kevin Day , hackers@FreeBSD.ORG Subject: Re: Double buffered cp(1) In-Reply-To: <200004221706.KAA55294@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 22 Apr 2000, Matthew Dillon wrote: > > :extend (using truncate) and then mmap() the destination file, then > :read() directly into the mmap()'d portion. > : > :I'd like to see what numbers you get. :) > : > :-- > :-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > > Probably not so good considering the number of faults that will > be taken. Also, if the destination filesystem runs out of room > cp will take a random seg-fault trying to access the map. Plus > the dirtying of that many VM pages will seriously effect performance. Err... I think what Alfred (should have) meant was that you should mmap the source file and madvise it MADV_SEQUENTIAL, then write() to the new file directly from that. How bad do you foresee performance being then? -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message