From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <clameter@sgi.com>,
andi@firstfloor.org, travis@sgi.com, ak@suse.de,
pageexec@freemail.hu, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mm: Prevent dereferencing non-allocated per_cpu variables
Date: Wed, 28 Nov 2007 00:48:21 +0100 [thread overview]
Message-ID: <20071127234821.GC31491@one.firstfloor.org> (raw)
In-Reply-To: <20071127154213.11970e63.akpm@linux-foundation.org>
On Tue, Nov 27, 2007 at 03:42:13PM -0800, Andrew Morton wrote:
> On Tue, 27 Nov 2007 15:22:56 -0800 (PST)
> Christoph Lameter <clameter@sgi.com> wrote:
>
> > On Tue, 27 Nov 2007, Andrew Morton wrote:
> >
> > > The prefetch however might still need some work - we can indeed do
> > > prefetch() against a not-possible CPU's memory here. And I do recall that
> > > 4-5 years ago we did have a CPU (one of mine, iirc) which would oops when
> > > prefetching from a bad address. I forget what the conclusion was on that
> > > matter.
> > >
> > > If we do want to fix the prefetch-from-outer-space then we should be using
> > > cpu_isset(cpu, *cpumask) here rather than cpu_possible().
> >
> > Generally the prefetch things have turned out to be not that useful. How
> > about dropping the prefetch? I kept it because it was there.
>
> I don't recall anyone ever demonstrating that prefetch is useful in-kernel.
It was demonstrated useful for some specific cases, like context switch early
fetch on IA64. But I agree the prefetch on each list_for_each() is probably
a bad idea and should be removed. Will also help code size.
The best strategy is probably to figure out which oprofile counters
to use and then do some profiling and only insert prefetches where
the profiler actually finds significant cache misses.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-11-27 23:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071127215052.090968000@sgi.com>
2007-11-27 21:50 ` travis
2007-11-27 22:01 ` pageexec
2007-11-27 22:16 ` Andi Kleen
2007-11-27 23:12 ` Andrew Morton
2007-11-27 23:15 ` Christoph Lameter
2007-11-27 23:21 ` Andrew Morton
2007-11-27 23:22 ` Christoph Lameter
2007-11-27 23:42 ` Andrew Morton
2007-11-27 23:48 ` Andi Kleen [this message]
2007-11-28 0:15 ` Christoph Lameter
2007-11-28 0:09 ` Christoph Lameter
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=20071127234821.GC31491@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pageexec@freemail.hu \
--cc=travis@sgi.com \
/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