From: Dave Jones <davej@redhat.com>
To: Ashley Pittman <ashley@quadrics.com>
Cc: cpufreq <cpufreq@www.linux.org.uk>
Subject: Re: Patch to stop i386 longhaul from deadlocking the kernel
Date: Thu, 20 Nov 2003 13:40:12 +0000 [thread overview]
Message-ID: <20031120134012.GG5653@redhat.com> (raw)
In-Reply-To: <1069334644.26134.1358.camel@ashley>
On Thu, Nov 20, 2003 at 01:24:04PM +0000, Ashley Pittman wrote:
> The computer is at home today but it's one of the 800Mhz boards, the fsb
> is 133, multiplier of 60. The speed should therefore be 798 but cpu_khz
> is reporting it as 800. Then it's just a case of how many bits you need
> to remove of before 798==800. The result is that they both need to
> equal 768. I've attached a user-space program which demonstrates this
> with output.
Right, so the anding is catching the case of overflow, but neglecting
underflow. It seems to do the right thing if I change guess_fsb to do this..
for (i=0; i<3; i++) {
ret = _guess(speeds[i],maxmult);
if (ret == speed)
return speeds[i];
if (ret < speed) {
if ((ret+16) == speed)
return speeds[i];
}
}
return 0;
}
I need to think about this some more. I'm not entirely comfortable with
that, it looks somewhat fragile, though I can see why it works.
133 * 6 = 798
798 & ~0xf = 784
784 + 16 = 800
I wonder how well this kludge works for other frequencies.
Dave
next prev parent reply other threads:[~2003-11-20 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 15:19 Patch to stop i386 longhaul from deadlocking the kernel Ashley Pittman
2003-11-20 12:46 ` Dave Jones
2003-11-20 13:24 ` Ashley Pittman
2003-11-20 13:40 ` Dave Jones [this message]
2003-11-20 14:12 ` Ashley Pittman
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=20031120134012.GG5653@redhat.com \
--to=davej@redhat.com \
--cc=ashley@quadrics.com \
--cc=cpufreq@www.linux.org.uk \
/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.