linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Con Kolivas <kernel@kolivas.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, felipe_alfaro@linuxmail.org
Subject: Re: [PATCH] N1int for interactivity
Date: Tue, 15 Jul 2003 09:02:20 +0200	[thread overview]
Message-ID: <5.2.1.1.2.20030715071702.01af6290@pop.gmx.net> (raw)
In-Reply-To: <200307151403.33321.kernel@kolivas.org>

At 02:03 PM 7/15/2003 +1000, Con Kolivas wrote:
>On Tue, 15 Jul 2003 13:59, Andrew Morton wrote:
> > Con Kolivas <kernel@kolivas.org> wrote:
> > > I've modified Mike Galbraith's nanosleep work for greater resolution to
> > > help the interactivity estimator work I've done in the O*int patches.

(I think a repeat of an earlier public warning wrt this diff may be in 
order: run irman/contest before you proceed... here there be giant economy 
sized dragons)

> > >
> > > +inline void __scheduler_tick(runqueue_t *rq, task_t *p)
> >
> > Two callsites, this guy shouldn't be inlined.

(I just wild-guessed that it'd be a tiny bit faster while i was coding... 
_the_ fast-path and all)

> >
> > Should it have static scope?  The code as-is generates a third copy...
> >
> > >  static unsigned long long monotonic_clock_tsc(void)
> > >  {
> > >     unsigned long long last_offset, this_offset, base;
> > > -
> > > +   unsigned long flags;
> > > +
> > >     /* atomically read monotonic base & last_offset */
> > > -   read_lock_irq(&monotonic_lock);
> > > +   read_lock_irqsave(&monotonic_lock, flags);
> > >     last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
> > >     base = monotonic_base;
> > > -   read_unlock_irq(&monotonic_lock);
> > > +   read_unlock_irqrestore(&monotonic_lock, flags);
> > >
> > >     /* Read the Time Stamp Counter */
> >
> > Why do we need to take a global lock here?  Can't we use
> > get_cycles() or something?

The scalability issue is gone I'm told.

 > Have all the other architectures been reviewed to see if they need this
> > change?
>
>I'm calling for help here. This is getting way out of my depth; I've simply
>applied Mike's patch.

Everyone will likely need that, or there will be major explosions.  You'll 
also have to deal with the no-tsc case... either return jiffies * 1000000 
or make it a config option.

(I'd go with a config option if I were you...dragons aren't all that likely 
to torch a desktop load, but if you do this globally, I'm quite certain 
that something is going to get char-broiled;)

         -Mike 


  reply	other threads:[~2003-07-15  6:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15  3:55 [PATCH] N1int for interactivity Con Kolivas
2003-07-15  3:59 ` Andrew Morton
2003-07-15  4:03   ` Con Kolivas
2003-07-15  7:02     ` Mike Galbraith [this message]
2003-07-15  7:00   ` Zwane Mwaikambo
2003-07-15 10:23     ` Con Kolivas
2003-07-15 15:23 ` Felipe Alfaro Solana
2003-07-15 23:12   ` Con Kolivas
2003-07-16  7:12     ` Felipe Alfaro Solana

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=5.2.1.1.2.20030715071702.01af6290@pop.gmx.net \
    --to=efault@gmx.de \
    --cc=akpm@osdl.org \
    --cc=felipe_alfaro@linuxmail.org \
    --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;
as well as URLs for NNTP newsgroup(s).