Re: [PATCH] N1int for interactivity

Andrew Morton (akpm@osdl.org)
Mon, 14 Jul 2003 20:59:15 -0700


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.

> +inline void __scheduler_tick(runqueue_t *rq, task_t *p)

Two callsites, this guy shouldn't be inlined.

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?

Have all the other architectures been reviewed to see if they need this
change?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/