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

* Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> On Fri, Jul 29, 2005 at 10:28:26AM +0200, Ingo Molnar wrote:
> > @@ -2872,10 +2878,10 @@ go_idle:
> > /*
> > * Prefetch (at least) a cacheline below the current
> > * kernel stack (in expectation of any new task touching
> > - * the stack at least minimally), and a cacheline above
> > - * the stack:
> > + * the stack at least minimally), and at least a cacheline
> > + * above the stack:
> > */
> > - prefetch_range(kernel_stack(next) - MIN_KERNEL_STACK_FOOTPRINT,
> > + prefetch_range(kernel_stack(next) - L1_CACHE_BYTES,
> > MIN_KERNEL_STACK_FOOTPRINT + L1_CACHE_BYTES);
>
> This needs to ensure that we don't prefetch outside the page of the
> kernel stack - otherwise we risk weird problems on architectures which
> support prefetching but not DMA cache coherency.

ok, agreed. Since kernel_stack(next) defaults to 'next', we go below
that structure which has unknown coherency attributes. I guess the
easiest solution would be to default kernel_stack(next) to '(void *)next
+ L1_CACHE_BYTES'? That way the default prefetching would happen for the
[next...next+2*L1_BYTES] range.

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-29 11:49    [W:0.067 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site