Use zero-copy (aka pipe/splice) for skbuff to enhance socketpair performance?

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

 



Hi,

as far as I know pipe() is now much faster than socketpair(), because pipe() 
uses the zero-copy mechanism.

However there are numerous applications using socketpair() instead of two 
pipe()s, because they need exactly _one_ fd for read/write instead of 2.

Over 180 open unix domain sockets are on my system right now.

Many of this applications could gain a speedup if only they could change to a 
different system call like epipe().

epipe() would behave like socketpair(), but internally use two pipes (one for 
each direction).

It seems so easy to do, so I'm really wondering, why it hasn't been done, yet?

However new system calls always have the problem of portability. Though in 
this case an epipe -> socketpair fallback would work.

So perhaps a better idea would be to enhance skbuff to use the new zero-copy 
mechanism ... ?

The reason why I had the idea is that I had huge socketpair performance 
problems, but with an old 2.4.27 kernel and a custom kernel module:

Almost 1 sec of latency!

Changing the fds provided from userspace to pipe()s did result in good 
performance.

Might be a bug in my module though ...

cu

Fabian

PS: Please CC me as I'm not subscribed.

-- 
      *** Consulting - Training - Workshops - Troubleshooting ***
   @@@ LiveCDs (Knoppix), Debian, Remote Desktop Access (FreeNX) @@@

--- Fabian Franz --- www.fabian-franz.de --- [email protected]

Attachment: pgpByFYw4Uf4P.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux