linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Michel Lespinasse <walken@google.com>,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	aswin@hp.com, scott.norton@hp.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] mm: per-thread vma caching
Date: Mon, 3 Mar 2014 17:23:48 -0800	[thread overview]
Message-ID: <20140303172348.3f00c9df.akpm@linux-foundation.org> (raw)
In-Reply-To: <1393894778.30648.29.camel@buesod1.americas.hpqcorp.net>

On Mon, 03 Mar 2014 16:59:38 -0800 Davidlohr Bueso <davidlohr@hp.com> wrote:

> > >...
> > >
> > > +static bool vmacache_valid(struct mm_struct *mm)
> > > +{
> > > +	struct task_struct *curr = current;
> > > +
> > > +	if (mm != curr->mm)
> > > +		return false;
> > 
> > What's going on here?  Handling a task poking around in someone else's
> > mm?  I'm thinking "__access_remote_vm", but I don't know what you were
> > thinking ;) An explanatory comment would be revealing.
> 
> I don't understand the doubt here. Seems like a pretty obvious thing to
> check -- yes it's probably unlikely but we certainly don't want to be
> validating the cache on an mm that's not ours... or are you saying it's
> redundant??

Well it has to be here for a reason and I'm wondering that that reason
is.  If nobody comes here with a foreign mm then let's remove it.  Or
perhaps stick a WARN_ON_ONCE() in there to detect the unexpected.  If
there _is_ a real reason, let's write that down.

> And no, we don't want __access_remote_vm() here.

__access_remote_vm doesn't look at the vma cache, so scrub that
explanation.

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

  reply	other threads:[~2014-03-04  1:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 21:48 [PATCH v4] mm: per-thread vma caching Davidlohr Bueso
2014-02-28  4:39 ` Davidlohr Bueso
2014-03-04  0:00 ` Andrew Morton
2014-03-04  0:18   ` Davidlohr Bueso
2014-03-04  0:40 ` Andrew Morton
2014-03-04  0:59   ` Davidlohr Bueso
2014-03-04  1:23     ` Andrew Morton [this message]
2014-03-04  2:42       ` Davidlohr Bueso
2014-03-04  3:12         ` Andrew Morton
2014-03-04  3:13           ` Davidlohr Bueso
2014-03-04  3:26             ` Andrew Morton
2014-03-04  3:26             ` Linus Torvalds
2014-03-04  5:32               ` Davidlohr Bueso
2014-03-14  3:05               ` Li Zefan
2014-03-14  4:43                 ` Andrew Morton
2014-03-06 22:56     ` Andrew Morton

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=20140303172348.3f00c9df.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=scott.norton@hp.com \
    --cc=torvalds@linux-foundation.org \
    --cc=walken@google.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;
as well as URLs for NNTP newsgroup(s).