tech-kern archive

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

Revisiting uvm_loan() for 'direct' write pipes



Hello,

I've been playing a little on revisiting kern/sys_pipe.c to take
advantage of the direct map in order to avoid the pmap_enter() et.al
via the new uvm_direct_process() interface. Mostly since I want to
have at least one other consumer of the interface before I consider it
as final, to make sure it covers the general use cases.

I've managed to get it working. However, the loan mechanism is way
slower than just copying the data via the intermediate 16KB pipe
buffer - I get about 12GB/s on regular pipe, and about 4GB/s on the
'direct' pipe, even when using huge input buffers like 1MB a time.

For regular pipe, CPU is about same for producer and consumer about
50%, for 'direct' pipe producer (the one who does the loan) is at
about 80% and consumer at 5%.

It turned out uvm_loan() incurs most of the overhead. I'm still on my
way to figure what it is exactly which makes it so much slower than
uiomove().

Any hints on which parts I should concentrate?

Jaromir


Home | Main Index | Thread Index | Old Index