netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: nuclearcat@nuclearcat.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression
Date: Mon, 01 Oct 2007 00:12:59 -0700 (PDT)	[thread overview]
Message-ID: <20071001.001259.28812610.davem@davemloft.net> (raw)
In-Reply-To: <47008CB0.7010808@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Mon, 01 Oct 2007 07:59:12 +0200

> No problem here on bigger servers, so I CC David Miller and netdev
> on this one.  AFAIK do_gettimeofday() and ktime_get_real() should
> use the same underlying hardware functions on PC and no performance
> problem should happen here.

One thing that jumps out at me is that on 32-bit (and to a certain
extent on 64-bit) there is a lot of stack accesses and missed
optimizations because all of the work occurs, and gets expanded,
inside of ktime_get_real().

The timespec_to_ktime() inside of there constructs the ktime_t return
value on the stack, then returns that as an aggregate to the caller.

That cannot be without some cost.

ktime_get_real() is definitely a candidate for inlining especially in
these kinds of cases where we'll happily get computations in local
registers instead of all of this on-stack nonsense.  And in several
cases (if the caller only needs the tv_sec value, for example)
computations can be elided entirely.

It would be constructive to experiment and see if this is in fact part
of the problem.


  reply	other threads:[~2007-10-01  7:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070930144443.M52139@visp.net.lb>
     [not found] ` <46FFE17C.9020202@cosmosbay.com>
     [not found]   ` <200709301425.37564.nickpiggin@yahoo.com.au>
     [not found]     ` <20070930223503.M8966@nuclearcat.com>
2007-10-01  5:59       ` 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression Eric Dumazet
2007-10-01  7:12         ` David Miller [this message]
2007-10-01  8:07           ` Denys
2007-10-01  8:20             ` Eric Dumazet
2007-10-01  8:35               ` Eric Dumazet
2007-10-01 12:10               ` Denys
2007-10-01 13:26               ` Denys
2007-10-01 20:10         ` Eric Dumazet
2007-10-01 20:57           ` 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=20071001.001259.28812610.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nuclearcat@nuclearcat.com \
    /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).