mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Boldi <a1426z@gawab.com>
To: Con Kolivas <kernel@kolivas.org>
Cc: ck list <ck@vds.kolivas.org>,
	linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>
Subject: Re: [patch][rfc] quell interactive feeding frenzy
Date: Fri, 14 Apr 2006 06:16:33 +0300	[thread overview]
Message-ID: <200604140616.33370.a1426z@gawab.com> (raw)
In-Reply-To: <200604132151.22359.kernel@kolivas.org>

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]

Con Kolivas wrote:
> On Thursday 13 April 2006 01:25, Al Boldi wrote:
> > Con Kolivas wrote:
> > > Nvidia driver; all separate tasks in top.
> >
> > On a 400MhzP2 i810drm w/ kernel HZ=1000 it stutters.
> > You may want to compensate for nvidia w/ a few cpu-hogs.
>
> I tried adding cpu hogs and it gets extremely slow very soon but still
> doesn't stutter here.
>
> > How many gears fps do you get?
>
> When those 3 are running concurrently (without any other cpu hogs) gears
> is showing 317 fps.

Your machine is probably too fast to show the problem, due to enough 
cpu-cycles/timeslice to complete the request.

Can you try the attached mem-eater passing it the number of kb to be eaten.

        i.e. '# while :; do ./eatm 9999 ; done' 

This will print the number of bytes eaten and the timing in ms.

Assuming timeslice=100, adjust the number of kb to be eaten such that the 
timing will be less than timeslice (something like 60ms).  Switch to another 
vt and start another eatm w/ the number of kb yielding more than timeslice 
(something like 140ms).  This eatm should starve completely after exceeding 
timeslice.

This problem also exists in mainline, but it is able to break out of it to 
some extent.  Setting eatm kb to a timing larger than timeslice does not 
exhibit this problem.

> > > range 63-73 seconds.
> >
> > Could this 10s skew be improved to around 1s to aid smoothness?
>
> I'm happy to try... but I doubt it. 10% difference over 10 tasks over 10
> mins of tasks of that wake/sleep nature is pretty good IMO. I'll see if
> there's anywhere else I can make the cpu accounting any better.

Great!

> As an aside, note that sched_clock and nanosecond timing with TSC isn't
> actually used if you use the pm timer which undoes any high res accounting
> the cpu scheduler can do (I noticed this when playing with pm timer that
> sched_clock just returns jiffies resolution instead of real nanosecond
> res). This could undo any smoothness that good cpu accounting can do.

Yes, pm-timer looks rather broken, at least on my machine.  Too bad it's on 
by default, as I always have to turn it off.

Thanks!

--
Al



[-- Attachment #2: eatm.c --]
[-- Type: text/x-csrc, Size: 810 bytes --]

#include <stdio.h>
#include <sys/time.h>

unsigned long elapsed(int start) {

	static struct timeval s,e;

	if (start) return gettimeofday(&s, NULL);

	gettimeofday(&e, NULL);

	return ((e.tv_sec - s.tv_sec) * 1000 + (e.tv_usec - s.tv_usec) / 1000);

}

int main(int argc, char **argv) {

    unsigned long int i,j,max;
    unsigned char *p;

    if (argc>1)
	max=atol(argv[1]);
    else
	max=0x60000;


    elapsed(1); 

    for (i=0;((i<max/1024) && (p = (char *)malloc(1024*1024)));i++) {
        for (j=0;j<1024;p[1024*j++]=0);
	fprintf(stderr,"\r%d MB ",i+1);
    }

    for (j=max-(i*=1024);((i<max) && (p = (char *)malloc(1024)));i++) {
	*p = 0;
    }
    fprintf(stderr,"%d KB ",j-(max-i));

    fprintf(stderr,"eaten in %lu msec (%lu MB/s)\n",elapsed(0),i/(elapsed(0)?:1)*1000/1024);

    return 0;
}

  reply	other threads:[~2006-04-14  3:19 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200604112100.28725.kernel@kolivas.org>
2006-04-11 17:03 ` Fwd: " Al Boldi
2006-04-11 22:56   ` Con Kolivas
2006-04-12  5:41     ` Al Boldi
2006-04-12  6:22       ` Con Kolivas
2006-04-12  8:17         ` Al Boldi
2006-04-12  9:36           ` Con Kolivas
2006-04-12 10:39             ` Al Boldi
2006-04-12 11:27               ` Con Kolivas
2006-04-12 15:25                 ` Al Boldi
2006-04-13 11:51                   ` Con Kolivas
2006-04-14  3:16                     ` Al Boldi [this message]
2006-04-15  7:05                       ` Con Kolivas
2006-04-15 18:23                         ` [ck] " Michael Gerdau
2006-04-15 20:45                         ` Al Boldi
2006-04-15 23:22                           ` Con Kolivas
2006-04-16 18:44                             ` [ck] " Andreas Mohr
2006-04-17  0:08                               ` Con Kolivas
2006-04-19  8:37                                 ` Andreas Mohr
2006-04-19  8:59                                   ` jos poortvliet
2006-04-15 22:32                         ` jos poortvliet
2006-04-15 23:06                           ` Con Kolivas
2006-04-16  6:02                   ` Con Kolivas
2006-04-16  8:31                     ` Al Boldi
2006-04-16  8:58                       ` Con Kolivas
2006-04-16 10:37                       ` was " Con Kolivas
2006-04-16 19:03                         ` Al Boldi
2006-04-16 23:26                           ` Con Kolivas
2006-04-09 16:44 [patch][rfc] " Al Boldi
2006-04-09 18:33 ` Mike Galbraith
2006-04-10 14:43   ` Al Boldi
2006-04-11 10:57     ` Con Kolivas
  -- strict thread matches above, loose matches on Subject: below --
2006-04-07  9:38 Mike Galbraith
2006-04-07  9:47 ` Andrew Morton
2006-04-07  9:52   ` Ingo Molnar
2006-04-07 10:57     ` Mike Galbraith
2006-04-07 11:00       ` Con Kolivas
2006-04-07 11:09         ` Mike Galbraith
2006-04-07 10:40   ` Mike Galbraith
2006-04-07 12:56 ` Con Kolivas
2006-04-07 13:37   ` Mike Galbraith
2006-04-07 13:56     ` Con Kolivas
2006-04-07 14:14       ` Mike Galbraith
2006-04-07 15:16         ` Mike Galbraith
2006-04-09 11:14         ` bert hubert
2006-04-09 11:39           ` Mike Galbraith
2006-04-09 12:14             ` bert hubert
2006-04-09 18:07               ` Mike Galbraith
2006-04-10  9:12                 ` bert hubert
2006-04-10 10:00                   ` Mike Galbraith
2006-04-10 14:56                     ` Mike Galbraith
2006-04-13  7:41                       ` Mike Galbraith
2006-04-13 10:16                         ` Con Kolivas
2006-04-13 11:05                           ` Mike Galbraith
2006-04-09 18:24               ` Mike Galbraith

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=200604140616.33370.a1426z@gawab.com \
    --to=a1426z@gawab.com \
    --cc=ck@vds.kolivas.org \
    --cc=efault@gmx.de \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®