[GHC] #13245: Default FD buffer size is not a power of 2

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 8.0.2 System | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- From https://hackage.haskell.org/package/base-4.9.1.0/docs/src/GHC.IO.FD.html {{{ -- We used to use System.Posix.Internals.dEFAULT_BUFFER_SIZE, which is -- taken from the value of BUFSIZ on the current platform. This value -- varies too much though: it is 512 on Windows, 1024 on OS X and 8192 -- on Linux. So let's just use a decent size on every platform: dEFAULT_FD_BUFFER_SIZE :: Int dEFAULT_FD_BUFFER_SIZE = 8096 }}} 8096 is not a power of two, and does not agree with the original commit message that sets it to 8KB (https://github.com/ghc/ghc/blame/master/libraries/base/GHC/IO/FD.hs#L119). Confirmed by Simon Marlow on IRC that this is a typo, a mix between 8192 and 4096. I'll send a patch to set it to 8192. It would be nice if the fix could be released in both GHC 8.2 and and 8.0.3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): D3115 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nh2): * differential: => D3115 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://phabricator.haskell.org/D3115 -------------------------------------+------------------------------------- Changes (by nh2): * differential: D3115 => https://phabricator.haskell.org/D3115 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://phabricator.haskell.org/D3115 -------------------------------------+------------------------------------- Changes (by nh2): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3115 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * differential: https://phabricator.haskell.org/D3115 => Phab:D3115 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2
-------------------------------------+-------------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Runtime System | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3115
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.3 Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3115 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge * milestone: => 8.0.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13245: Default FD buffer size is not a power of 2 -------------------------------------+------------------------------------- Reporter: nh2 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Runtime System | Version: 8.0.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3115 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13245#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC