[GHC] #13246: hPutBuf issues unnecessary empty write syscalls for large writes
GHC
ghc-devs at haskell.org
Sun Feb 12 01:08:31 UTC 2017
#13246: hPutBuf issues unnecessary empty write syscalls for large writes
-------------------------------------+-------------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Runtime System | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #13245 | Differential Rev(s): Phab:D3117
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"805db96544111bd548c9a32488a9c97996cc2b49/ghc"
805db965/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="805db96544111bd548c9a32488a9c97996cc2b49"
Fix: hPutBuf issues unnecessary empty write syscalls for large writes
(#13246)
Until now, any `hPutBuf` that wrote `>= the handle buffer size` would
trigger an unnecessary `write("")` system call before the actual write
system call.
This is fixed by making sure that we never flush an empty handle buffer:
Only flush `when (w > 0)`.
Reviewers: simonmar, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3119
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13246#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list