linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.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 v2] mm: per-thread vma caching
Date: Wed, 26 Feb 2014 09:50:48 +0100	[thread overview]
Message-ID: <20140226085048.GE18404@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1393352206.2577.36.camel@buesod1.americas.hpqcorp.net>

On Tue, Feb 25, 2014 at 10:16:46AM -0800, Davidlohr Bueso wrote:
> +void vmacache_invalidate_all(void)
> +{
> +	struct task_struct *g, *p;
> +
> +	rcu_read_lock();
> +	for_each_process_thread(g, p) {
> +		/*
> +		 * Only flush the vmacache pointers as the
> +		 * mm seqnum is already set and curr's will
> +		 * be set upon invalidation when the next
> +		 * lookup is done.
> +		 */
> +		memset(p->vmacache, 0, sizeof(p->vmacache));
> +	}
> +	rcu_read_unlock();
> +}

With all the things being said on this particular piece already; I
wanted to add that the iteration there is incomplete; we can clone()
using CLONE_VM without using CLONE_THREAD.

Its not common, but it can be done. In that case the above iteration
will miss a task that shares the same mm.

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

  parent reply	other threads:[~2014-02-26  8:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 18:16 Davidlohr Bueso
2014-02-25 18:24 ` Rik van Riel
2014-02-25 18:36   ` Davidlohr Bueso
2014-02-25 18:35 ` Peter Zijlstra
2014-02-25 18:37   ` Davidlohr Bueso
2014-02-25 19:46     ` Peter Zijlstra
2014-02-25 18:37 ` Linus Torvalds
2014-02-25 18:45   ` Linus Torvalds
2014-02-25 19:04   ` Davidlohr Bueso
2014-02-25 19:30     ` Davidlohr Bueso
2014-02-25 19:31     ` Linus Torvalds
2014-02-26  2:04 ` Michel Lespinasse
2014-02-26  4:04   ` Davidlohr Bueso
2014-02-26  7:52     ` Michel Lespinasse
2014-02-26  8:50 ` Peter Zijlstra [this message]
2014-02-26  8:55   ` Peter Zijlstra
2014-02-26 11:26 ` Mel Gorman
2014-02-26 19:11   ` Davidlohr Bueso

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=20140226085048.GE18404@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=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=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