[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-11-18 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

Janne Blomqvist  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #20 from Janne Blomqvist  2011-11-18 
11:38:02 UTC ---
Fixed, closing.


[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-11-09 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #19 from Janne Blomqvist  2011-11-09 
15:46:20 UTC ---
Author: jb
Date: Wed Nov  9 15:46:15 2011
New Revision: 181207

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181207
Log:
PR 50016 Slow I/O on MingW due to _commit

frontend ChangeLog:

2011-11-09  Janne Blomqvist  

PR libfortran/50016
* gfortran.texi (Data consistency and durability): New section.


testsuite ChangeLog:

2011-11-09  Janne Blomqvist  

PR libfortran/50016
* gfortran.dg/inquire_size.f90: Don't flush the unit.

libgfortran ChangeLog:

2011-11-09  Janne Blomqvist  

PR libfortran/50016
* io/inquire.c (inquire_via_unit): Flush the unit and use ssize.
* io/unix.c (buf_flush): Don't call _commit.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/inquire_size.f90
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/inquire.c
trunk/libgfortran/io/unix.c


[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-10-19 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #18 from xunxun  2011-10-20 06:49:19 
UTC ---
(In reply to comment #17)
> Author: burnus
> Date: Wed Oct 19 17:27:03 2011
> New Revision: 180199
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180199
> Log:
> 2011-10-19  Janne Blomqvist  
> Kai Tietz  
> Tobias Burnus  
> 
> PR fortran/50016
> * io/unix.h (flush_sync): Add new libgfortran-internal
> * prototype.
> * io/unix.c (flush_sync): New function, which calls sflush and
> on MinGW(-w64) also _commit.
> (flush_all_units, flush_all_units_1): Replace sflush/_commit by
> flush_sync.
> * io/file_pos.c (st_flush): Replace sflush/_commit by
> * flush_sync.
> * io/intrinsics.c (flush_i4, flush_i8): Ditto.
> 
> 
> Modified:
> branches/gcc-4_6-branch/libgfortran/ChangeLog
> branches/gcc-4_6-branch/libgfortran/io/file_pos.c
> branches/gcc-4_6-branch/libgfortran/io/intrinsics.c
> branches/gcc-4_6-branch/libgfortran/io/unix.c
> branches/gcc-4_6-branch/libgfortran/io/unix.h

Will the rev 180199 merge into gcc4.6.2 release?
Because the first 4.6.2 RC doesn't contain the modify, gcc-4.6.2-RC-20111019
libgfortran build on mingw/mingw64 can cause:

  libtool: compile:  i686-w64-mingw32-gcc
-L/mingw/i686-w64-mingw32/lib -L/mingw/mingw/lib -isystem
/mingw/i686-w64-mingw32/include -isystem /mingw/mingw/include
-DHAVE_CONFIG_H -I. -I../.././libgfortran
-iquote../.././libgfortran/io -I../.././libgfortran/../gcc
-I../.././libgfortran/../gcc/config
-I../.././libgfortran/../libquadmath -I../../host-i686-w64-mingw32/gcc
-D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings
-fcx-fortran-rules -ffunction-sections -fdata-sections -g -pipe -O2
-I/mingw/include -MT file_pos.lo -MD -MP -MF .deps/file_pos.Tpo -c
../.././libgfortran/io/file_pos.c -o file_pos.o
../.././libgfortran/io/file_pos.c: In function 'st_flush':
../.././libgfortran/io/file_pos.c:457:20: error: 'stream' has no
member named 'fd'

I would hope the next 4.6.2 RC or release fix the problem.
Thanks.


[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-10-19 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #17 from Tobias Burnus  2011-10-19 
17:27:08 UTC ---
Author: burnus
Date: Wed Oct 19 17:27:03 2011
New Revision: 180199

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180199
Log:
2011-10-19  Janne Blomqvist  
Kai Tietz  
Tobias Burnus  

PR fortran/50016
* io/unix.h (flush_sync): Add new libgfortran-internal
* prototype.
* io/unix.c (flush_sync): New function, which calls sflush and
on MinGW(-w64) also _commit.
(flush_all_units, flush_all_units_1): Replace sflush/_commit by
flush_sync.
* io/file_pos.c (st_flush): Replace sflush/_commit by
* flush_sync.
* io/intrinsics.c (flush_i4, flush_i8): Ditto.


Modified:
branches/gcc-4_6-branch/libgfortran/ChangeLog
branches/gcc-4_6-branch/libgfortran/io/file_pos.c
branches/gcc-4_6-branch/libgfortran/io/intrinsics.c
branches/gcc-4_6-branch/libgfortran/io/unix.c
branches/gcc-4_6-branch/libgfortran/io/unix.h


[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-10-18 Thread xunxun1982 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

--- Comment #16 from xunxun  2011-10-18 13:20:27 
UTC ---
Good job. I will extract the patch to 4.6.1 release.
( I don't use gcc4.6 latest branch temporarily because PR 50664 )
Thanks.


[Bug libfortran/50016] [4.7 Regression] Drastic I/O performance regression on Windows

2011-10-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50016

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-18
   Target Milestone|4.6.2   |4.7.0
Summary|[4.6/4.7 Regression]|[4.7 Regression] Drastic
   |Drastic I/O performance |I/O performance regression
   |regression on Windows   |on Windows
 Ever Confirmed|0   |1

--- Comment #15 from Tobias Burnus  2011-10-18 
13:08:22 UTC ---
[4.6] FIXED (comment 14) or at least mitigated the issue on the 4.6 branch - in
time for the 4.6.2 release. See also
http://gcc.gnu.org/ml/fortran/2011-10/msg00132.html

 * * *

For the 4.7 trunk, we are still discussion, when to call _commit.
MinGW/MinGW-w64 users of GCC 4.7 could consider using that patch in the
meanwhile.

Start of the discussion:
  http://gcc.gnu.org/ml/fortran/2011-10/threads.html#00079

Patch version 1: Keep _commit only for FLUSH() subroutine/statement
  http://gcc.gnu.org/ml/fortran/2011-10/msg00132.html

Patch version 2: Remove _commit completely, use internal file-size when
inquiring open files. (The latter is an independent separate issue, but was the
reason for adding _commit at the first place; cf. PR 44698.)
  http://gcc.gnu.org/ml/fortran/2011-10/msg00094.html

 * * *

Xunxun: Thanks for the report and sorry for making the Windows version that
slow and for the two-months delay in fixing it.