Opened 7 years ago

Closed 15 months ago

#1520 closed task (wontfix)

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 (13)

comment:1 Changed 6 years ago by simonmar

See also #592

comment:2 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:4 Changed 4 years ago by simonmar

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

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:10 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:11 Changed 20 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:12 Changed 15 months ago by monoidal

  • Type of failure set to None/Unknown

Is this one fixed by the new IO manager?

comment:13 Changed 15 months ago by simonmar

  • Resolution set to wontfix
  • Status changed from new to closed

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.