From: Roberto Orenstein <rstein@brturbo.com>
To: pat erley <paterley@drunkencodepoets.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: patch-O1int-0306281420 for 2.5.73 interactivity
Date: 28 Jun 2003 19:45:01 -0300 [thread overview]
Message-ID: <1056840300.1358.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20030628162656.06e7e046.paterley@drunkencodepoets.com>
On Sat, 2003-06-28 at 17:26, pat erley wrote:
> I made a small error when I sent Con a piece of magic I wrote up to help the sleep period.
>
> what it says right now:
>
> /kernel/sched.c around line 325
>
>
> sleep_period = (sleep_period *
> 17 * sleep_period / ((17 * sleep_period / (5 * tau) + 2) * 5 * tau));
> ----------------------------------------------------------^
>
> it should be:
>
> sleep_period = (sleep_period *
> 17 * sleep_period / ((17 * sleep_period / (5 * tau + 2)) * 5 * tau));
> --------------------------------------------------------------^
>
> stupid parenthesis.
>
> a little background. what this essentially is is a taylor approximation of the function ln(66x+1) normalized. ln(66x+1) happens to do a great job oas a weighting function on the range of 0 to 1, and because the input only happens to range from 0 to 1, only 2 terms were needed to do a 'good enough' job.
>
> Pat
I did your correction and I got a kernel panic(attempting to kill init)
on boot. It didn't flushed to disk, so it isn't attached, but it panics
at effective_prio+0xcc/0xe0.
With objdump I could see it traps a division by 0:
cc: f7 fb idiv %ebx
I remember cleary %ebx being 0 on the panic report.
And I tracked down and the code is on this else in effective_prio:
----------- sched.c 341-----------------
else {
sleep_period = (sleep_period *
17 * sleep_period / ((17 * sleep_period / (5 * tau + 2)) * 5 * tau));
if (!sleep_period)
return p->static_prio;
}
--------------------------------------
I don't have the time now to track this further today, but what happens
if sleep_period is too small and tau is too big?
Could this (17 * sleep_period / (5 * tau + 2) give 0 and so a division
by 0?
abs
Roberto
next prev parent reply other threads:[~2003-06-28 22:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-28 5:16 patch-O1int-0306281420 for 2.5.73 interactivity Con Kolivas
2003-06-28 16:30 ` Con Kolivas
2003-06-28 17:22 ` Martin Schlemmer
2003-06-29 1:25 ` Con Kolivas
2003-06-28 18:22 ` Felipe Alfaro Solana
2003-06-28 18:02 ` Felipe Alfaro Solana
2003-06-28 20:26 ` pat erley
2003-06-28 22:45 ` Roberto Orenstein [this message]
2003-06-29 1:32 ` Con Kolivas
2003-06-29 4:57 ` Con Kolivas
2003-06-30 5:35 ` Con Kolivas
2003-06-30 7:49 ` Andrew Morton
2003-06-30 7:57 ` Mike Galbraith
2003-06-30 10:16 ` Con Kolivas
2003-06-30 10:59 ` Mike Galbraith
2003-06-30 9:02 ` Felipe Alfaro Solana
2003-06-30 9:39 ` Marc-Christian Petersen
2003-06-30 9:47 ` Andrew Morton
2003-06-30 10:10 ` Marc-Christian Petersen
2003-06-30 10:17 ` Andrew Morton
2003-06-30 21:05 ` Marc-Christian Petersen
2003-06-30 12:21 ` Mike Galbraith
2003-06-30 13:38 ` Con Kolivas
2003-06-30 21:09 ` Marc-Christian Petersen
2003-06-30 18:46 ` Davide Libenzi
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=1056840300.1358.12.camel@localhost.localdomain \
--to=rstein@brturbo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paterley@drunkencodepoets.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