From: Bill Fink <billfink@mindspring.com>
To: "Ilpo Järvinen " <ilpo.jarvinen@helsinki.fi>
Cc: David Miller <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
Netdev <netdev@vger.kernel.org>, John Heffner <jheffner@psc.edu>
Subject: Re: TSO trimming question
Date: Fri, 21 Dec 2007 14:37:07 -0500 [thread overview]
Message-ID: <20071221143707.fbb0ae60.billfink@mindspring.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712212056220.31652@kivilampi-30.cs.helsinki.fi>
On Fri, 21 Dec 2007, Ilpo Järvinen wrote:
> On Fri, 21 Dec 2007, Bill Fink wrote:
>
> > On Fri, 21 Dec 2007, Bill Fink wrote:
> >
> > > Or perhaps even:
> > >
> > > /* Ok, it looks like it is advisable to defer. */
> > > tp->tso_deferred = jiffies;
> > >
> > > /* need to return a non-zero value to defer, which means won't
> > > * defer if jiffies == 0 but it's only a 1 in 4 billion event
> > > * (and avoids a compare/branch by not checking jiffies)
> > > /
> > > return jiffies;
> >
> > Ack. I introduced my own 64-bit to 32-bit issue (too late at night).
> > How about:
> >
> > /* Ok, it looks like it is advisable to defer. */
> > tp->tso_deferred = jiffies;
> >
> > /* this won't defer if jiffies == 0 but it's only a 1 in
> > * 4 billion event (and avoids a branch)
> > */
> > return (jiffies != 0);
>
> I'm not sure how the jiffies work but is this racy as well?
>
> Simple return tp->tso_deferred; should work, shouldn't it? :-)
As long as tp->tso_deferred remains u32, pending the other issue.
-Bill
next prev parent reply other threads:[~2007-12-21 19:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 21:46 TSO trimming question Ilpo Järvinen
2007-12-19 22:02 ` Ilpo Järvinen
2007-12-20 3:26 ` Herbert Xu
2007-12-20 7:55 ` David Miller
2007-12-20 7:54 ` David Miller
2007-12-20 11:40 ` Ilpo Järvinen
2007-12-20 11:56 ` David Miller
2007-12-20 16:02 ` John Heffner
2007-12-21 4:36 ` David Miller
2007-12-21 8:06 ` Bill Fink
2007-12-21 9:26 ` Ilpo Järvinen
2007-12-21 9:28 ` Ilpo Järvinen
2007-12-21 9:27 ` David Miller
2007-12-21 9:29 ` Herbert Xu
2007-12-21 9:36 ` David Miller
2007-12-21 10:58 ` Bill Fink
2007-12-21 18:54 ` Bill Fink
2007-12-21 18:58 ` Ilpo Järvinen
2007-12-21 19:37 ` Bill Fink [this message]
2007-12-20 12:00 ` David Miller
2007-12-20 12:35 ` Ilpo Järvinen
2007-12-20 14:00 ` Herbert Xu
2007-12-20 23:55 ` David Miller
2007-12-21 18:55 ` [PATCH] [TCP]: Force TSO splits to MSS boundaries Ilpo Järvinen
2007-12-21 20:01 ` Ilpo Järvinen
2007-12-25 5:35 ` 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=20071221143707.fbb0ae60.billfink@mindspring.com \
--to=billfink@mindspring.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=jheffner@psc.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.