Extended IPC Support added.

Benefits & Facts:
- Messages up to 2 kilobytes may be sent.
- Both parties may use non-disjoint user buffers. E.g. any userspace address.
- Userspace buffers can page fault.
- Page faults punish timeslice of only the faulting thread.
- Any number of extended ipcs can take place at any one time, since
  only ktcbs of ipc parties are engaged. No global buffer is used.
  - This also provides smp-safety benefit.

Disadvantages:
- There is triple copying penalty. This has to be done:
  - Sender buffer to sender ktcb
  - Sender ktcb to receiver ktcb
  - Receiver ktcb to receiver buffer.
  This is due to the fact that buffers can be on non-disjoint userspace addresses.

If you want to avoid disadvantages and lose some of the benefits,
(e.g. address freedom, shorter copy size) use FULL IPC.
This commit is contained in:
Bahadir Balban
2009-05-27 14:36:11 +03:00
parent 3ff519439b
commit 53310aa31b
3 changed files with 35 additions and 25 deletions

View File

@@ -113,9 +113,12 @@ struct ktcb {
struct waitqueue_head *waiting_on;
struct waitqueue *wq;
/* Extended ipc buffer, points to the space after ktcb */
char *extended_ipc_buffer;
/*
* Extended ipc size and buffer that
* points to the space after ktcb
*/
unsigned long extended_ipc_size;
char extended_ipc_buffer[];
};
/* Per thread kernel stack unified on a single page. */