delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/03/13:22:34

X-Spam-Check-By: sourceware.org
Date: Thu, 3 Aug 2006 13:22:10 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: cygwin copy problems usb 2.0
In-Reply-To: <20060803170805.GC8152@calimero.vinschen.de>
Message-ID: <Pine.GSO.4.63.0608031319250.27351@access1.cims.nyu.edu>
References: <080320060154 DOT 8210 DOT 44D157570002EFAE0000201222064244130A050E040D0C079D0A AT comcast DOT net> <20060803170805 DOT GC8152 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, 3 Aug 2006, Corinna Vinschen wrote:

> On Aug  3 01:54, Eric Blake wrote:
> > > >I'm really seeing the non-optimized cygwin cp behaviour causing bad
> > > >reputation, which could be easily patched and maybe even accepted
> > > >upstream. Who knows. Eric what do think? Would it be worthful to think
> > > >about?
> >
> > I don't really want to maintain a Windows API patch, and doubt that
>
> Good.
>
> > it would be accepted upstream.  Now if there were something more
> > POSIX-y that we could do to speed things up, such as posix_fadvise,
>
> posix_fadvise can't be implemented nicely, AFAICS.  The POSIX semantics
> require an already opened file and the advice is given for an offset and
> a length.  The Windows semantics only allow to give the advice for the
> whole file, and only switching between FILE_SEQUENTIAL_ONLY or "normal",
> using ZwSetInformationFile.  By re-opening the file using ZwOpenFile it
> would also be possible to toggle the FILE_RANDOM_ACCESS flag.  Still,
> it's always for the whole file, not for an area giving offset and length.

Theoretically, it's possible to implement posix_fadvise only for offset=0
and length=<length-of-file>, and have it fail with EINVAL otherwise...
While technically not POSIX-compliant, it would still allow for better
implementation of things like copy...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019