Ticket #1520 (closed task: wontfix)

Opened 6 years ago

Last modified 4 months ago

Use Linux's signalfd() instead of pipe() to deliver signals to the IO manager

Reported by: simonmar Owned by:
Priority: lowest Milestone: 7.6.2
Component: Runtime System Version: 6.6.1
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

As pointed out to me by dcoutts, Linux has a new API that enables signals and other events to be delivered via a file descriptor, and hence used with select()/poll()/epoll(). The new API went into Linux 2.6.22:

 http://kernelnewbies.org/Linux_2_6_22#head-0357b2415f5d3116bf2b03de07224d16912acec2

We could use this in GHC's IO manager to avoid the hacky use of pipe() for the same purpose.

Change History

Changed 5 years ago by simonmar

See also #592

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 4 years ago by igloo

  • milestone changed from 6.10 branch to 6.12 branch

Changed 4 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)

Changed 3 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.3

Changed 3 years ago by igloo

  • priority changed from normal to low
  • milestone changed from 6.12.3 to 6.14.1

Changed 2 years ago by igloo

  • milestone changed from 7.0.1 to 7.0.2

Changed 2 years ago by igloo

  • milestone changed from 7.0.2 to 7.2.1

Changed 20 months ago by igloo

  • milestone changed from 7.2.1 to 7.4.1

Changed 16 months ago by igloo

  • priority changed from low to lowest
  • milestone changed from 7.4.1 to 7.6.1

Changed 9 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2

Changed 4 months ago by monoidal

  • failure set to None/Unknown

Is this one fixed by the new IO manager?

Changed 4 months ago by simonmar

  • status changed from new to closed
  • resolution set to wontfix

No, the new IO manager does it the same way as the old one. We did discuss it, and unfortunately signalfd() is not suitable, because it requires the signals to be masked, and there's no good way to ensure that happens across all threads in the program (what if some threads are in C and not managed by us?). sigwaitinfo() suffers from the same problem.

So I think this is a wontfix.

Note: See TracTickets for help on using tickets.