]> git.baikalelectronics.ru Git - kernel.git/commit
[AF_UNIX]: use shift instead of integer division
authorBenjamin LaHaise <benjamin.c.lahaise@intel.com>
Tue, 21 Mar 2006 05:29:05 +0000 (21:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 05:29:05 +0000 (21:29 -0800)
commitab4c895626265d0d9693ca684af4a8e80d0da8aa
tree78faaa085edfb24784e40779864d41fd9ddeb168
parent7e42362bfd906b4ef8a402207cfe5cb81fe3e4a1
[AF_UNIX]: use shift instead of integer division

The patch below replaces a divide by 2 with a shift -- sk_sndbuf is an
integer, so gcc emits an idiv, which takes 10x longer than a shift by 1.
This improves af_unix bandwidth by ~6-10K/s.  Also, tidy up the comment
to fit in 80 columns while we're at it.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c