Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 28 Nov 2002 03:37:45 +0100
From: thomas <tom@huno.net>
Reply-To: thomas <cygwin@cygwin.com>
X-Priority: 3 (Normal)
Message-ID: <6654089625.20021128033745@huno.net>
To: thomas <cygwin@cygwin.com>
Subject: Re: pipe performance problem
In-Reply-To: <5549457171.20021128022032@huno.net>
References: <777770015.20021122040845@huno.net>
 <007301c291ff$eb9ce050$78d96f83@pomello> <21545718.20021122114035@huno.net>
 <12415481703.20021122220059@huno.net> <20021122210856.GA10679@redhat.com>
 <5.1.0.14.2.20021122143402.00fdc148@pop3.cris.com>
 <10824453046.20021123003030@huno.net> <14936170000.20021127223905@huno.net>
 <20021127233624.GK17798@redhat.com> <1245871093.20021128012046@huno.net>
 <20021128003443.GD21457@redhat.com> <5549457171.20021128022032@huno.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



It seems to be a mystery whats going on, at least i'm not clever enough
find it out :(
Both sides of the pipe (cat and dd) wait at the same time, but what for?
Is one waiting for the other and vice versa? I have no idea. Look here:

   23 2139047 [main] cat 3660 fhandler_base::write: binary write
 2234 2141281 [main] cat 3660 fhandler_base::write: DEBUG 0 fhandler.cc
28626 2169907 [main] cat 3660 fhandler_base::write: 1024 = write (0x10021748, 1024)

   25 2128939 [main] dd 1900 fhandler_base::ready_for_read: DEBUG 8.h select.cc
13787 2142726 [main] dd 1900 fhandler_base::ready_for_read: DEBUG 8.c select.cc


Now look at the code where DEBUG 0 is:

  if (get_w_binary ())
    {
      debug_printf ("binary write");
      res = raw_write (ptr, len);
      debug_printf ("DEBUG 0 fhandler.cc");
    }
   // there is an else here, but we dont call it anyway
    
  debug_printf ("%d = write (%p, %d)", res, ptr, len);
  return res;

There's nothing to wait for or is there.

DEBUG 8.h is the WaitForSingleObject.

Maybe i'm still looking at the wrong place.

thomas


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

