Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 8 years ago

Closed 7 years ago

#444 closed enhancement (fixed)

Low-level ipc_forget()

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone: 0.6.0
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

The async_forget() function instructs the userspace async framework that the user is no longer interested in waiting for the message in the argument. As of now, this does not have any impact on the underlying IPC, which still requires that the reply to the respective IPC call eventually arrives.

It may make a good sense to offer also a low-level (both uspace and kernel) interfaces to forget even the underlying IPC call. Doing so would effectively donate the call to the task which is expected to answer it. The act of answering such a call would simply result in freeing up the resources associated with the call structure.

This may also have a positive impact on killing tasks with unanswered calls. As of now, the killed task needs to wait for all its unanswered calls to arrive before it is gone for good. With the help of the prospective ipc_forget(), it could simply forget all its unanswered calls and hang up all its phones without any additional waiting.

While certainly interesting from the point of view of the task which is being killed, forgetting the unanswered calls in ipc_cleanup() represents a problem for the recipients of those calls. The fact that a client task structure will not be destroyed as long as someone is holding at least one unaswered call for it is used in several places by the kernel. Now if the task will not be required to wait for all its unaswered calls, there will need to be some other mechanism to prevent the client task from suddenly being destroyed. Clever use of task_hold() and task_release() comes to mind.

Change History (1)

comment:1 Changed 7 years ago by Jakub Jermář

Resolution: fixed
Status: newclosed

A modified version of this feature has been merged in mainline,1665. The main difference from the original proposal is that there is no syscall API nor a per-call kernel API to forget an individual call. Instead, all unanswered calls are forgotten in ipc_cleanup().

Note: See TracTickets for help on using tickets.