Opened 10 years ago

Closed 4 years 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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

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 9 years ago by simonmar

See also #592

comment:2 Changed 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:3 Changed 8 years ago by igloo

Milestone: 6.10 branch6.12 branch

comment:4 Changed 7 years ago by simonmar

difficulty: Moderate (1 day)Moderate (less than a day)

comment:5 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:6 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:7 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:8 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:9 Changed 5 years ago by igloo

Milestone: 7.2.17.4.1

comment:10 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:11 Changed 4 years ago by igloo

Milestone: 7.6.17.6.2

comment:12 Changed 4 years ago by monoidal

Type of failure: None/Unknown

Is this one fixed by the new IO manager?

comment:13 Changed 4 years ago by simonmar

Resolution: wontfix
Status: newclosed

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.