[GHC] #15153: GHC uses O_NONBLOCK on regular files, which has no effect, and blocks the runtime

GHC ghc-devs at haskell.org
Thu May 17 12:47:20 UTC 2018


#15153: GHC uses O_NONBLOCK on regular files, which has no effect, and blocks the
runtime
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Runtime System    |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonmar):

 Yeah, this is well known. O_NONBLOCK doesn't do anything for local disk
 files, but it also doesn't do any harm. It's not usually a big problem
 except when the filesystem actually has significant latency, like with NFS
 or an arbitrary fuse filesystem.

 I think I was worried about the overhead of using safe calls here, the
 problem is that if you have lots of threads all reading from Handles (e.g.
 sockets) then if those reads are safe calls we'll get a large number of
 real OS threads created.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15153#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list