netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: David Miller <davem@davemloft.net>
Cc: ilpo.jarvinen@helsinki.fi, netdev@vger.kernel.org, efault@gmx.de,
	mingo@elte.hu, a.p.zijlstra@chello.nl,
	herbert@gondor.apana.org.au
Subject: Re: tbench wrt. loopback TSO
Date: Wed, 5 Nov 2008 14:49:00 +0300	[thread overview]
Message-ID: <20081105114900.GA18691@ioremap.net> (raw)
In-Reply-To: <20081105.034224.167388197.davem@davemloft.net>

On Wed, Nov 05, 2008 at 03:42:24AM -0800, David Miller (davem@davemloft.net) wrote:
> > One idea immediately occurs to me.  Since we're effectively limited
> > to a 64K TSO frame, and the MSS is some value smaller than that, we
> > can probably get away with a reciprocol divide.  Even using a 16-bit
> > inverse value would suffice, so we wouldn't need to use u64's like
> > some other pieces of code do.  A u32 would be enough.
> 
> I couldn't get anywhere with this idea.
> 
> The problem is that 16-bits provides not enough precision for accurate
> divisions by multiplication.
> 
> For example, for a divisor of 1500 and a shift of 16 neither 43 nor 44
> provides an accurate calculation.
> 
> So we'd need to use a u64 and a shift of 32, and on 32-bit cpus that
> could be expensive, but perhaps not as expensive as the divide.

But what if we just remove that trimming at all? This may result in a
not fully filled tso frame, but who cares if we copy data from userspace
anyway, will add another potentially small copy at sending time?

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-11-05 11:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16  0:14 tbench wrt. loopback TSO David Miller
2008-10-17  3:49 ` non-TCP tbench (was Re: tbench wrt. loopback TSO) David Miller
2008-10-26 12:34 ` tbench wrt. loopback TSO Evgeniy Polyakov
2008-10-27  1:59   ` David Miller
2008-10-27  7:49     ` Ilpo Järvinen
2008-10-27 14:13       ` Evgeniy Polyakov
2008-10-27 15:19         ` Ilpo Järvinen
2008-10-27 17:03           ` Evgeniy Polyakov
2008-10-27 18:39             ` David Miller
2008-10-27 19:35               ` Evgeniy Polyakov
2008-10-27 19:37                 ` David Miller
2008-11-05 11:42               ` David Miller
2008-11-05 11:49                 ` Evgeniy Polyakov [this message]
2008-11-05 11:54                   ` David Miller
2008-11-05 12:04                     ` Ilpo Järvinen
2008-11-05 12:09                       ` David Miller
2008-11-05 12:25                         ` Ilpo Järvinen
2008-11-05 13:04                           ` Evgeniy Polyakov
2008-11-05 13:33                             ` Ilpo Järvinen
2008-11-05 18:48                               ` Rick Jones
2008-11-05 19:46                                 ` Ilpo Järvinen
2008-11-05 21:06                                   ` Rick Jones
2008-10-27 22:17             ` Ilpo Järvinen
2008-10-31  8:14               ` David Miller
2008-10-31  9:16                 ` Ilpo Järvinen
2008-10-31  9:47                   ` David Miller

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=20081105114900.GA18691@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=davem@davemloft.net \
    --cc=efault@gmx.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.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).