From: Ingo Molnar <mingo@elte.hu>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: bug in sched.c:task_hot()
Date: Tue, 5 Oct 2004 10:03:41 +0200 [thread overview]
Message-ID: <20041005080341.GA5897@elte.hu> (raw)
In-Reply-To: <200410050237.i952bx620740@unix-os.sc.intel.com>
* Chen, Kenneth W <kenneth.w.chen@intel.com> wrote:
> Current implementation of task_hot() has a performance bug in it
> that it will cause integer underflow.
> -#define task_hot(p, now, sd) ((now) - (p)->timestamp < (sd)->cache_hot_time)
> +#define task_hot(p, now, sd) ((long long) ((now) - (p)->timestamp) \
> + < (long long) (sd)->cache_hot_time)
ah ... nice catch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo
prev parent reply other threads:[~2004-10-05 8:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-05 2:38 bug in sched.c:task_hot() Chen, Kenneth W
2004-10-05 3:17 ` Nick Piggin
2004-10-05 17:15 ` Chen, Kenneth W
2004-10-05 7:33 ` Peter Williams
2004-10-05 7:44 ` Nick Piggin
2004-10-05 8:07 ` Peter Williams
2004-10-05 8:42 ` Nick Piggin
2004-10-05 10:03 ` Peter Williams
2004-10-05 17:39 ` Chen, Kenneth W
2004-10-05 22:09 ` Peter Williams
2004-10-05 8:03 ` Ingo Molnar [this message]
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=20041005080341.GA5897@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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