tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Patch: create/destroy optimization for pipes

The dedicated pipe code is quite a bit faster than the socket code. Here's a
comparison from libmicro, with PIPE_SOCKETPAIR on the right. This does not
test page loaning.

Creating and destroying pipes is very expensive because VA space and memory
must be allocated and freed from kernel_map. This causes global TLB
shootdowns, meaning interrupts on MP systems.

The below patch:

- Caches VA space and memory for the reader side of pipes, which take care
  of buffering when the pipe is normal (ie uni-directional). This eliminates
  the TLB shootdowns.

- It converts the pipe code to use mutex_obj_alloc(), replacing its custom

- It makes better use of pool_cache, eliminating a lot of calls to
  initialize and destroy pipe objects.


- It may not apply cleanly to -current.

- The sender-size buffer record needs to be zeroed out after a pipe is
  allocated. The patch omits this.



Home | Main Index | Thread Index | Old Index