[Ace-users] [ace-users] Antw: Re: pread/pwrite implementation for ACE_HAS_WINNT4performance

Johnny Willemsen jwillemsen at remedy.nl
Tue Oct 30 07:24:31 CDT 2007


Hi,

Can you check x.6.1 and if this is still valid, please report this in
bugzilla (see http://deuce.doc.wustl.edu/bugzilla/index.cgi)

Regars,

Johnny Willemsen
Remedy IT
Postbus 101
2650 AC  Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl  

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO             ***
*** See http://www.theaceorb.nl/en/support.html                 *** 

> -----Original Message-----
> From: Daniel Schenk [mailto:Daniel.Schenk at schiller.ch] 
> Sent: Tuesday, October 30, 2007 12:59 PM
> To: Johnny Willemsen
> Cc: ace-users at cs.wustl.edu
> Subject: Antw: Re: pread/pwrite implementation for 
> ACE_HAS_WINNT4performance
> 
> Hi,
> 
> sorry, I referred to ACE 5.4.7, the current version replaced 
> ACE_HAS_WINNT4 by ACE_HAS_WIN32_OVERLAPPED_IO
> 
> but 
>     ACE VERSION: 5.4
> 
>     HOST MACHINE and OPERATING SYSTEM:
>         Windows XP, Servicepack 2
> 
>     COMPILER NAME AND VERSION (AND PATCHLEVEL):
>     Microsoft DeveloperStudio 6.0 Servicepack 6
>     CONTENTS OF $ACE_ROOT/ace/config.h:
>     #define ACE_HAS_STANDARD_CPP_LIBRARY   1
>     #include "ace/config-win32.h"
>     
>     AREA/CLASS/EXAMPLE AFFECTED:
>     ace\OS_NS_unistd.cpp
> 
>     DOES THE PROBLEM AFFECT:
>         EXECUTION Performance of ACE
>     DESCRIPTION:
>     Please see below
> 
>     REPEAT BY:
> 
>     SAMPLE FIX/WORKAROUND:
>     Please see below
> 
> 
> >>> "Johnny Willemsen" <jwillemsen at remedy.nl> 10/30/07 12:16 pm >>>
> Hi,
> 
> The current code doesn't check for ACE_HAS_WINNT4, so:
> 
> To ensure that we have proper version/platform/compiler information,
> please make sure you fill out the appropriate problem report form
> (PRF), which is in
> 
> $ACE_ROOT/PROBLEM-REPORT-FORM
> $TAO_ROOT/PROBLEM-REPORT-FORM
> 
> or in
> 
> $ACE_ROOT/BUG-REPORT-FORM
> $TAO_ROOT/BUG-REPORT-FORM
> 
> in older versions of ACE+TAO.  Make sure to include this information
> when asking any questions about ACE+TAO since otherwise we have to
> "guess" what version/platform/compiler/options you've using, which is
> very error-prone and slows down our responsiveness.  If you don't use
> the PRF, therefore, it is less likely that someone from the core
> ACE+TAO developer team will be able to answer your question.
> Naturally, we encourage and appreciate other members of the ACE+TAO
> user community who can respond to questions that they have the answers
> to.
>  
> Regards,
> 
> Johnny Willemsen
> Remedy IT
> Postbus 101
> 2650 AC  Berkel en Rodenrijs
> The Netherlands
> www.theaceorb.nl / www.remedy.nl  
> 
> *** Integrated compile and test statistics see
> http://scoreboard.theaceorb.nl ***
> *** Commercial service and support for ACE/TAO/CIAO             ***
> *** See http://www.theaceorb.nl/en/support.html                 ***
> 
> <daniel.schenk at schiller.ch> wrote in message
> news:<1193739147.174354.145830 at 22g2000hsm.googlegroups.com>...
> > Hi
> > 
> > in ace\OS_NS_unistd.cpp the ACE_WIN32 implementation of 
> ACE_OS::pread
> > uses
> > 1. ACE_OS_GUARD to synchronize access
> > 2. gets the current file pointer, set it to the desired offset and
> > restores it after reading
> > 
> > Both should be unnecessary if ACE_HAS_WINNT4 is defined.
> > Because ::ReadFile is used with an OVERLAPPED structure. ::ReadFile
> > will set the offset internally, which is passed inside the 
> OVERLAPPED
> > structure. Therefore there will be no need for synchronization by
> > ACE_OS_GUARD.
> > This will mean that the current implementation for  ACE_HAS_WINNT4
> > unnecessarily calls  SetFilePointer 3 times and locks, which will of
> > course slow down the performance.
> > The same will be true for ACE_OS::pwrite.
> > 
> > Please correct me, if I'm wrong. Otherwise I would appreciate if you
> > could change the code.
> > 
> > best regards
> > 
> > Daniel Schenk
> > 
> 
> 
> 



More information about the Ace-users mailing list