From: Darren Hart <darren@dvhart.com>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] scheduler: rebalance_tick interval update
Date: Tue, 16 Nov 2004 07:56:42 -0800 [thread overview]
Message-ID: <1100620602.14742.36.camel@farah.beaverton.ibm.com> (raw)
In-Reply-To: <4199957C.1020804@cyberone.com.au>
> >This example didn't take into account:
> > unsigned long j = jiffies + CPU_OFFSET(this_cpu);
> >Which, even if the last_balance's were equal and intervals were the same
> >(unlikely since each CPU has it's own domain and the intervals are
> >adjusted independently?),
> >
>
> That is correct.
>
> > would prevent them from both running on the
> >same timer tick. So I don't think this example is accurate. On the
> >other hand, even if it was valid, I would prefer this to running the
> >load_balance code on the same CPU and domain several ticks in a row
> >(which obviously accomplishes nothing).
> >
>
> It is valid because the CPU_OFFSET basically just adds a constant amount
> to each CPU's 'jiffies'. My example took that into account already and
> used the absolute jiffies value. If that doesn't convince you, pretend
> that the delay were to occur to CPU0, whos CPU_OFFSET == 0.
Heh, I thought of exactly that case when I rolled out of bed this
morning. Funny how that happens sometimes, you can be sitting in front
of the code and make what you think is a perfectly valid analysis and
then wake up the next morning with no context at all and realize you
were wrong. That happens to me anyway :-), I can't be the only one...
Nevertheless, that is a pretty unlikely corner case. They double up
only when last_balance+interval is the same and one of the CPUs involved
is CPU 0.
>
>
--
Darren Hart <darren@dvhart.com>
next prev parent reply other threads:[~2004-11-16 15:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-15 22:38 Darren Hart
2004-11-16 1:17 ` Nick Piggin
2004-11-16 1:53 ` Matthew Dobson
2004-11-16 2:17 ` Nick Piggin
2004-11-16 2:27 ` Nick Piggin
2004-11-16 3:50 ` Darren Hart
2004-11-16 3:51 ` Darren Hart
2004-11-16 7:00 ` Rick Lindsley
[not found] ` <1100576400.14742.12.camel@farah.beaverton.ibm.com>
[not found] ` <4199957C.1020804@cyberone.com.au>
2004-11-16 15:56 ` Darren Hart [this message]
2004-11-18 16:22 ` Darren Hart
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=1100620602.14742.36.camel@farah.beaverton.ibm.com \
--to=darren@dvhart.com \
--cc=linux-kernel@vger.kernel.org \
--cc=piggin@cyberone.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
all inboxes | Powered by JetHome®