mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: [NFS] Re: [PATCH] zerocopy NFS for 2.5.36
@ 2002-10-16 14:04 Lever, Charles
  0 siblings, 0 replies; 27+ messages in thread
From: Lever, Charles @ 2002-10-16 14:04 UTC (permalink / raw)
  To: neilb; +Cc: taka, linux-kernel, nfs, 'David S. Miller'

> -----Original Message-----
> From: David S. Miller [mailto:davem@redhat.com]
> Sent: Wednesday, October 16, 2002 12:31 AM
>
>    From: Neil Brown <neilb@cse.unsw.edu.au>
>    Date: Wed, 16 Oct 2002 13:44:04 +1000
> 
>    Presumably on a sufficiently large SMP machine that this became an
>    issue, there would be multiple NICs.  Maybe it would make sense to
>    have one udp socket for each NIC.  Would that make sense? or work?
>    It feels to me to be cleaner than one for each CPU.
>    
> Doesn't make much sense.
> 
> Usually we are talking via one IP address, and thus over
> one device.  It could be using multiple NICs via BONDING,
> but that would be transparent to anything at the socket
> level.
> 
> Really, I think there is real value to making the socket
> per-cpu even on a 2 or 4 way system.

having a local socket per CPU is very good for SMP scaling.
it multiplies input buffer space, and reduces socket lock
and CPU cache contention.

sorry, i don't have measurements.

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [PATCH] zerocopy NFS for 2.5.36
@ 2002-10-14  5:50 Neil Brown
  2002-10-14 12:01 ` Hirokazu Takahashi
  0 siblings, 1 reply; 27+ messages in thread
From: Neil Brown @ 2002-10-14  5:50 UTC (permalink / raw)
  To: Hirokazu Takahashi; +Cc: David S. Miller, linux-kernel, nfs

On Wednesday September 18, taka@valinux.co.jp wrote:
> Hello,
> 
> I ported the zerocopy NFS patches against linux-2.5.36.
> 

hi,
 I finally got around to looking at this.
 It looks good.

 However it really needs the MSG_MORE support for udp_sendmsg to be
 accepted before there is any point merging the rpc/nfsd bits.

 Would you like to see if davem is happy with that bit first and get
 it in?  Then I will be happy to forward the nfsd specific bit.

 I'm bit I'm not very sure about is the 'shadowsock' patch for having
 several xmit sockets, one per CPU.  What sort of speedup do you get
 from this?  How important is it really?

NeilBrown

^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: [NFS] Re: [PATCH] zerocopy NFS for 2.5.36
@ 2002-09-19  2:00 Lever, Charles
  0 siblings, 0 replies; 27+ messages in thread
From: Lever, Charles @ 2002-09-19  2:00 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: David S. Miller, taka, neilb, linux-kernel, nfs, Alan Cox

dude, that's pretty cool.

if you were re-implementing XDR, you think a series of movl
instructions would be best?  i'm not sure how practical that
is for an architecture-independent implementation.

> > > It was discussed long ago that csum_and_copy_from_user() performs 
> > > better than plain copy_from_user() on x86.  I do not remember all
> > 
> > The better was a freak of PPro/PII scheduling I think
> > 
> > > details, but I do know that using copy_from_user() is not a real 
> > > improvement at least on x86 architecture.
> > 
> > The same as bit is easy to explain. Its totally memory bandwidth 
> > limited on current x86-32 processors. (Although I'd welcome 
> > demonstrations to the contrary on newer toys)
> 
> Nope.  There are distinct alignment problems with movsl-based 
> memcpy on PII and (at least) "Pentium III (Coppermine)", 
> which is tested here:
> 
> copy_32 uses movsl.  copy_duff just uses a stream of "movl"s
> 
> Time uncached-to-uncached memcpy, source and dest are 8-byte-aligned:
> 
> akpm:/usr/src/cptimer> ./cptimer -d -s     
> nbytes=10240  from_align=0, to_align=0
>     copy_32: copied 19.1 Mbytes in 0.078 seconds at 243.9 Mbytes/sec
> __copy_duff: copied 19.1 Mbytes in 0.090 seconds at 211.1 Mbytes/sec
> 
> OK, movsl wins.   But now give the source address 8+1 alignment:
> 
> akpm:/usr/src/cptimer> ./cptimer -d -s -f 1
> nbytes=10240  from_align=1, to_align=0
>     copy_32: copied 19.1 Mbytes in 0.158 seconds at 120.8 Mbytes/sec
> __copy_duff: copied 19.1 Mbytes in 0.091 seconds at 210.3 Mbytes/sec
> 
> The "movl"-based copy wins.  By miles.
> 
> Make the source 8+4 aligned:
> 
> akpm:/usr/src/cptimer> ./cptimer -d -s -f 4
> nbytes=10240  from_align=4, to_align=0
>     copy_32: copied 19.1 Mbytes in 0.134 seconds at 142.1 Mbytes/sec
> __copy_duff: copied 19.1 Mbytes in 0.089 seconds at 214.0 Mbytes/sec
> 
> So movl still beats movsl, by lots.
> 
> I have various scriptlets which generate the entire matrix.
> 
> I think I ended up deciding that we should use movsl _only_ 
> when both src and dsc are 8-byte-aligned.  And that when you 
> multiply the gain from that by the frequency*size with which 
> funny alignments are used by TCP the net gain was 2% or something.
> 
> It needs redoing.  These differences are really big, and this 
> is the kernel's most expensive function.
> 
> A little project for someone.
> 
> The tools are at http://www.zip.com.au/~akpm/linux/cptimer.tar.gz

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [PATCH] zerocopy NFS for 2.5.36
@ 2002-09-18 23:00 David S. Miller
  2002-09-18 23:54 ` Alan Cox
  0 siblings, 1 reply; 27+ messages in thread
From: David S. Miller @ 2002-09-18 23:00 UTC (permalink / raw)
  To: taka; +Cc: neilb, linux-kernel, nfs

   From: Hirokazu Takahashi <taka@valinux.co.jp>
   Date: Wed, 18 Sep 2002 17:14:31 +0900 (JST)
   
   
   1)
   ftp://ftp.valinux.co.jp/pub/people/taka/2.5.36/va10-hwchecksum-2.5.36.patch
   This patch enables HW-checksum against outgoing packets including UDP frames.
   
Can you explain the TCP parts?  They look very wrong.

It was discussed long ago that csum_and_copy_from_user() performs
better than plain copy_from_user() on x86.  I do not remember all
details, but I do know that using copy_from_user() is not a real
improvement at least on x86 architecture.

The rest of the changes (ie. the getfrag() logic to set
skb->ip_summed) looks fine.

   3)
   ftp://ftp.valinux.co.jp/pub/people/taka/2.5.36/va-csumpartial-fix-2.5.36.patch
   This patch fixes the problem of x86 csum_partilal() routines which
   can't handle odd addressed buffers.
   
I've sent Linus this fix already.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2002-10-24 15:19 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3D89176B.40FFD09B@digeo.com.suse.lists.linux.kernel>
     [not found] ` <20020919.221513.28808421.taka@valinux.co.jp.suse.lists.linux.kernel>
     [not found]   ` <3D8A36A5.846D806@digeo.com.suse.lists.linux.kernel>
2002-09-20  1:00     ` [NFS] Re: [PATCH] zerocopy NFS for 2.5.36 Andi Kleen
2002-09-20  1:09       ` Andrew Morton
2002-09-20  1:23         ` Andi Kleen
2002-09-20  1:27           ` David S. Miller
2002-09-20  2:06             ` Andi Kleen
2002-09-20  2:01               ` David S. Miller
2002-09-20  2:28                 ` Andi Kleen
2002-09-20  2:20                   ` David S. Miller
2002-09-20  2:35                     ` Andi Kleen
2002-10-16 14:04 Lever, Charles
  -- strict thread matches above, loose matches on Subject: below --
2002-10-14  5:50 Neil Brown
2002-10-14 12:01 ` Hirokazu Takahashi
2002-10-16  3:44   ` Neil Brown
2002-10-16  4:31     ` David S. Miller
2002-10-17  2:03       ` [NFS] " Andrew Theurer
2002-10-17  2:31         ` Hirokazu Takahashi
2002-10-17 13:16           ` Andrew Theurer
2002-10-17 13:26             ` Hirokazu Takahashi
2002-10-17 14:10               ` Andrew Theurer
2002-10-17 16:26                 ` Hirokazu Takahashi
2002-10-18  5:38                   ` Trond Myklebust
2002-10-18  7:19                     ` Hirokazu Takahashi
2002-10-18 15:12                       ` Andrew Theurer
2002-10-19 20:34                         ` Hirokazu Takahashi
2002-10-22 21:16                           ` Andrew Theurer
2002-10-23  9:29                             ` Hirokazu Takahashi
2002-10-24 15:32                               ` Andrew Theurer
2002-09-19  2:00 Lever, Charles
2002-09-18 23:00 David S. Miller
2002-09-18 23:54 ` Alan Cox
2002-09-19  0:16   ` Andrew Morton
2002-09-19 13:15     ` [NFS] " Hirokazu Takahashi
2002-09-19 20:42       ` Andrew Morton
2002-09-19 21:12         ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome