lkml.org 
[lkml]   [2005]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Add prefetch switch stack hook in scheduler function

* Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> >>Just a minor point, I agree with David: I'd like it to be called
> >>prefetch_task(), because some architecture may want to prefetch other
> >>memory.
> >
> >such as?
>
> Not sure. thread_info? Maybe next->timestamp or some other fields in
> next, something in next->mm?

next->thread_info we could and should prefetch - but from the generic
scheduler code (see the patch i just sent).

i'm not sure what you mean by prefetching next->timestamp, it's an
inline field to 'next', in the first cacheline of it, which we've
already used so it's present. (If you mean the value of next->timestamp,
that has no address meaning at all so would lead to unpredictable
results on some arches.)

next->mm we might want to prefetch, but it's probably not worth it
because we are referencing it too soon, in context_switch(). (while the
kernel stack itself wont be referenced until the full context-switch is
done) But might be worth trying - but even then, it should be done from
the generic code, like the thread_info and kernel-stack prefetching.

> I didn't really have a concrete example, but in the interests of being
> future proof...

i'd like to keep generic bits in generic code, and only move things to
per-arch include files if absolutely necessary. next->mm is generic.

Ingo
-
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/

\
 
 \ /
  Last update: 2005-07-28 11:20    [W:0.061 / U:3.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site