public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florin Malita <fmalita@gmail.com>
To: cutaway@bellsouth.net
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kernel 2.6 speed
Date: Tue, 26 Jul 2005 15:45:44 -0400	[thread overview]
Message-ID: <42E692E8.4020703@gmail.com> (raw)
In-Reply-To: <012401c591a6$9a2e2040$0b00000a@solidwaste>

cutaway@bellsouth.net wrote:
> Anything time stamping things it processes many of will call some sort of
> time function pretty often.  Could happen frequently with certain classes of
> applications.

Right, but if the timestamp granularity is coarse and there's no 
blocking call in between it makes no sense to invoke 
gettimeofday()/time() repeatedly. I was referring to the kind of app 
that abuses them just because somebody is too lazy to reuse the previous 
value - calling gettimeofday() in 10 sequential printf() statements for eg.

There are legitimate scenarios of course, but this doesn't seem to be 
one of them:

15:22:38.825562 kill(2419, SIGRTMIN)    = 0
15:22:38.825748 gettimeofday({1122405758, 825765}, NULL) = 0
15:22:38.825801 gettimeofday({1122405758, 825812}, NULL) = 0
15:22:38.825845 gettimeofday({1122405758, 825856}, NULL) = 0
15:22:38.825888 gettimeofday({1122405758, 825899}, NULL) = 0
15:22:38.825931 time(NULL)              = 1122405758
15:22:38.825968 gettimeofday({1122405758, 825984}, NULL) = 0
15:22:38.826012 gettimeofday({1122405758, 826022}, NULL) = 0
15:22:38.826062 time(NULL)              = 1122405758
15:22:38.826099 time(NULL)              = 1122405758
15:22:38.826142 time(NULL)              = 1122405758
...

Here's another cute one, just in case you thought calling getpid() once 
should be enough ;)

15:31:15.376157 gettimeofday({1122406275, 376177}, NULL) = 0
15:31:15.376206 getpid()                = 2494
15:31:15.376238 getpid()                = 2494
15:31:15.376264 getpid()                = 2494
15:31:15.376291 getpid()                = 2494
15:31:15.376318 getpid()                = 2494
15:31:15.376344 getpid()                = 2494
15:31:15.376371 getpid()                = 2494
15:31:23.723801 getpid()                = 2494
15:31:23.723845 getpid()                = 2494
15:31:23.723873 getpid()                = 2494
15:31:23.723900 getpid()                = 2494
15:31:23.723927 getpid()                = 2494
15:31:23.723954 getpid()                = 2494
15:31:23.723984 getpid()                = 2494
15:31:23.724011 getpid()                = 2494
15:31:23.724038 getpid()                = 2494
15:31:23.724065 getpid()                = 2494
15:31:23.724091 getpid()                = 2494
15:31:23.724118 getpid()                = 2494
15:31:23.724145 getpid()                = 2494
15:31:23.724171 getpid()                = 2494
15:31:23.724198 getpid()                = 2494
15:31:23.724225 getpid()                = 2494
15:31:24.687109 getpid()                = 2494
15:31:24.687159 getpid()                = 2494
15:31:24.687197 getpid()                = 2494
15:31:24.687247 getpid()                = 2494
15:31:24.687283 getpid()                = 2494
15:31:24.687324 getpid()                = 2494
15:31:24.687364 getpid()                = 2494
15:31:24.687402 getpid()                = 2494
15:31:24.687442 getpid()                = 2494
15:31:24.687477 getpid()                = 2494
15:31:24.687512 getpid()                = 2494
15:31:24.687547 getpid()                = 2494
15:31:24.687583 getpid()                = 2494
15:31:24.687662 semop(32769, 0x430e2e0c, 1) = 0

My point: "real world" apps do stupid things.

  reply	other threads:[~2005-07-26 19:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-24 19:12 kernel 2.6 speed Ciprian
2005-07-24 19:41 ` Brice Goglin
2005-07-24 19:47 ` Dag Nygren
2005-07-24 20:40 ` Puneet Vyas
2005-07-24 21:03 ` Florin Malita
2005-07-24 22:49   ` Lee Revell
2005-07-25 19:52     ` Bill Davidsen
2005-07-24 21:46 ` Jan Engelhardt
2005-07-24 23:47 ` Alan Cox
2005-07-25  4:10   ` Florin Malita
2005-07-25  5:18     ` Willy Tarreau
2005-07-25  6:47     ` Ciprian
2005-07-26  5:55     ` cutaway
2005-07-26 19:45       ` Florin Malita [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-03 15:31 Henrik Holst

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=42E692E8.4020703@gmail.com \
    --to=fmalita@gmail.com \
    --cc=cutaway@bellsouth.net \
    --cc=linux-kernel@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