From: Davide Libenzi <davidel@xmailserver.org>
To: Peter Osterlund <petero2@telia.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH] scheduler fixups ...
Date: Wed, 2 Jan 2002 16:55:13 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.40.0201021652520.1034-100000@blue1.dev.mcafeelabs.com> (raw)
In-Reply-To: <m24rm4p8xf.fsf@pengo.localdomain>
On 3 Jan 2002, Peter Osterlund wrote:
> Davide Libenzi <davidel@xmailserver.org> writes:
>
> > On 2 Jan 2002, Peter Osterlund wrote:
> >
> > > Davide Libenzi <davidel@xmailserver.org> writes:
> > >
> > > > a still lower ts
> > >
> > > This also lowers the effectiveness of nice values. In 2.5.2-pre6, if I
> > > run two cpu hogs at nice values 0 and 19 respectively, the niced task
> > > will get approximately 20% cpu time (on x86 with HZ=100) and this
> > > patch will give even more cpu time to the niced task. Isn't 20% too
> > > much?
> >
> > The problem is that with HZ == 100 you don't have enough granularity to
> > correctly scale down nice time slices. Shorter time slices helps the
> > interactive feel that's why i'm pushing for this.
>
> OK, but even architectures with bigger HZ values will suffer. Isn't it
> better to set MIN_NICE_TSLICE to a smaller value (such as 1000) and
> fix the calculation in fill_tslice_map to make sure ts_table[i] is
> always non-zero. The current formula will break anyway if
>
> HZ < 1000000 / MIN_NICE_TSLICE = 100,
>
> but maybe HZ >= 100 is true for all architectures?
Yep, but we can do something like :
static void fill_tslice_map(void)
{
int i;
for (i = 0; i < NICE_RANGE; i++) {
ts_table[i] = ((MIN_NICE_TSLICE +
((MAX_NICE_TSLICE - MIN_NICE_TSLICE) /
(NICE_RANGE - 1)) * i) * HZ) / 1000000;
if (!ts_table[i]) ts_table[i] = 1;
}
}
- Davide
next prev parent reply other threads:[~2002-01-03 0:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-02 20:41 Davide Libenzi
2002-01-02 22:31 ` Peter Osterlund
2002-01-02 22:48 ` Davide Libenzi
2002-01-03 0:36 ` Peter Osterlund
2002-01-03 0:55 ` Davide Libenzi [this message]
2002-01-03 12:54 ` Rik van Riel
2002-01-03 17:36 ` 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=Pine.LNX.4.40.0201021652520.1034-100000@blue1.dev.mcafeelabs.com \
--to=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petero2@telia.com \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®