diff options
author | Anton Blanchard <anton@samba.org> | 2011-05-02 16:21:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 14:10:14 -0400 |
commit | 228e548e602061b08ee8e8966f567c12aa079682 (patch) | |
tree | 4c79ecf071d6174d42da1557812a4646d0aaa5af /arch/powerpc | |
parent | 1c5cae815d19ffe02bdfda1260949ef2b1806171 (diff) |
net: Add sendmmsg socket system call
This patch adds a multiple message send syscall and is the send
version of the existing recvmmsg syscall. This is heavily
based on the patch by Arnaldo that added recvmmsg.
I wrote a microbenchmark to test the performance gains of using
this new syscall:
http://ozlabs.org/~anton/junkcode/sendmmsg_test.c
The test was run on a ppc64 box with a 10 Gbit network card. The
benchmark can send both UDP and RAW ethernet packets.
64B UDP
batch pkts/sec
1 804570
2 872800 (+ 8 %)
4 916556 (+14 %)
8 939712 (+17 %)
16 952688 (+18 %)
32 956448 (+19 %)
64 964800 (+20 %)
64B raw socket
batch pkts/sec
1 1201449
2 1350028 (+12 %)
4 1461416 (+22 %)
8 1513080 (+26 %)
16 1541216 (+28 %)
32 1553440 (+29 %)
64 1557888 (+30 %)
We see a 20% improvement in throughput on UDP send and 30%
on raw socket send.
[ Add sparc syscall entries. -DaveM ]
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/systbl.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unistd.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 60f64b132bd4..8489d372077f 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -352,3 +352,4 @@ SYSCALL_SPU(name_to_handle_at) | |||
352 | COMPAT_SYS_SPU(open_by_handle_at) | 352 | COMPAT_SYS_SPU(open_by_handle_at) |
353 | COMPAT_SYS_SPU(clock_adjtime) | 353 | COMPAT_SYS_SPU(clock_adjtime) |
354 | SYSCALL_SPU(syncfs) | 354 | SYSCALL_SPU(syncfs) |
355 | COMPAT_SYS_SPU(sendmmsg) | ||
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 3c215648ce6d..6d23c8193caa 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -371,10 +371,11 @@ | |||
371 | #define __NR_open_by_handle_at 346 | 371 | #define __NR_open_by_handle_at 346 |
372 | #define __NR_clock_adjtime 347 | 372 | #define __NR_clock_adjtime 347 |
373 | #define __NR_syncfs 348 | 373 | #define __NR_syncfs 348 |
374 | #define __NR_sendmmsg 349 | ||
374 | 375 | ||
375 | #ifdef __KERNEL__ | 376 | #ifdef __KERNEL__ |
376 | 377 | ||
377 | #define __NR_syscalls 349 | 378 | #define __NR_syscalls 350 |
378 | 379 | ||
379 | #define __NR__exit __NR_exit | 380 | #define __NR__exit __NR_exit |
380 | #define NR_syscalls __NR_syscalls | 381 | #define NR_syscalls __NR_syscalls |