From: David Miller <davem@davemloft.net>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, VONBOEHN@de.ibm.com,
ellerman@au1.ibm.com, arnd@arndb.de, cbe-oss-dev@ozlabs.org
Subject: Re: [Cbe-oss-dev] [RFC 1/3] powerpc: __copy_tofrom_user tweaked for Cell
Date: Fri, 20 Jun 2008 21:49:42 -0700 (PDT) [thread overview]
Message-ID: <20080620.214942.193706145.davem@davemloft.net> (raw)
In-Reply-To: <18524.33738.450400.63491@cargo.ozlabs.ibm.com>
From: Paul Mackerras <paulus@samba.org>
Date: Sat, 21 Jun 2008 14:30:02 +1000
> Is this application really transferring bulk data and using buffers
> that aren't a multiple of the page size? Do you know whether the
> copies ended up being misaligned?
We used to cache align the sub-buffers carved out of the per-socket
anonymous buffer page that TCP, UDP, and other protocols use to
collect user write()/sendmsg() data when the outgoing interface
supports scatter-gather and checksumming (basically just about
any reasonable ethernet device these days).
But that alignment was removed from net/ipv4/tcp.c (I forget the exact
reasons, I think it was space wastage).
The net result is that you will therefore see a lot of misaligned
copies for networking sends these days.
In my opinion optimizing mempcy/user-copy in the most general way is
the best course of action. Whatever histogram of sizes and alignments
you obtain with sampling today will change unpredictably in the
future. I'm saying this as someone who fell into that trap on sparc64
several times in the past, and I have 5 memcpy/user-copy/memset
variants to maintain on that platform these days :-/
next prev parent reply other threads:[~2008-06-21 4:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 7:53 [RFC 1/3] powerpc: __copy_tofrom_user tweaked for Cell Mark Nelson
2008-06-19 14:43 ` Arnd Bergmann
2008-06-19 15:17 ` Gunnar von Boehn
2008-06-19 16:13 ` Sanjay Patel
2008-06-20 11:36 ` Gunnar von Boehn
2008-06-20 17:46 ` Sanjay Patel
2008-06-20 23:20 ` Benjamin Herrenschmidt
2008-06-20 23:44 ` Sanjay Patel
2008-06-23 8:30 ` Gunnar von Boehn
2008-06-23 12:07 ` Geert Uytterhoeven
2008-06-23 23:49 ` Paul Mackerras
2008-06-27 13:30 ` Gunnar von Boehn
2008-06-20 1:13 ` [Cbe-oss-dev] " Paul Mackerras
2008-06-20 16:47 ` Gunnar von Boehn
2008-06-21 2:00 ` Arnd Bergmann
2008-06-21 4:30 ` Paul Mackerras
2008-06-21 4:49 ` David Miller [this message]
2008-06-21 21:06 ` Arnd Bergmann
2008-06-20 1:55 ` Mark Nelson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080620.214942.193706145.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=VONBOEHN@de.ibm.com \
--cc=arnd@arndb.de \
--cc=cbe-oss-dev@ozlabs.org \
--cc=ellerman@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).