All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <davidlohr@hp.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, aswin@hp.com,
	Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH 3/3] mm,vmacache: optimize overflow system-wide flushing
Date: Mon, 14 Apr 2014 17:02:13 -0700	[thread overview]
Message-ID: <1397520133.31076.24.camel@buesod1.americas.hpqcorp.net> (raw)
In-Reply-To: <1397519841-24847-4-git-send-email-davidlohr@hp.com>

Stupid script... Cc'ing Oleg.

On Mon, 2014-04-14 at 16:57 -0700, Davidlohr Bueso wrote:
> For single threaded workloads, we can avoid flushing
> and iterating through the entire list of tasks, making
> the whole function a lot faster, requiring only a single
> atomic read for the mm_users.
> 
> Suggested-by: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
> ---
>  mm/vmacache.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/mm/vmacache.c b/mm/vmacache.c
> index e167da2..61c38ae 100644
> --- a/mm/vmacache.c
> +++ b/mm/vmacache.c
> @@ -17,6 +17,16 @@ void vmacache_flush_all(struct mm_struct *mm)
>  {
>  	struct task_struct *g, *p;
>  
> +	/*
> +	 * Single threaded tasks need not iterate the entire
> +	 * list of process. We can avoid the flushing as well
> +	 * since the mm's seqnum was increased and don't have
> +	 * to worry about other threads' seqnum. Current's
> +	 * flush will occur upon the next lookup.
> +	 */
> +	if (atomic_read(&mm->mm_users) == 1)
> +		return;
> +
>  	rcu_read_lock();
>  	for_each_process_thread(g, p) {
>  		/*



WARNING: multiple messages have this Message-ID (diff)
From: Davidlohr Bueso <davidlohr@hp.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, aswin@hp.com,
	Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH 3/3] mm,vmacache: optimize overflow system-wide flushing
Date: Mon, 14 Apr 2014 17:02:13 -0700	[thread overview]
Message-ID: <1397520133.31076.24.camel@buesod1.americas.hpqcorp.net> (raw)
In-Reply-To: <1397519841-24847-4-git-send-email-davidlohr@hp.com>

Stupid script... Cc'ing Oleg.

On Mon, 2014-04-14 at 16:57 -0700, Davidlohr Bueso wrote:
> For single threaded workloads, we can avoid flushing
> and iterating through the entire list of tasks, making
> the whole function a lot faster, requiring only a single
> atomic read for the mm_users.
> 
> Suggested-by: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
> ---
>  mm/vmacache.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/mm/vmacache.c b/mm/vmacache.c
> index e167da2..61c38ae 100644
> --- a/mm/vmacache.c
> +++ b/mm/vmacache.c
> @@ -17,6 +17,16 @@ void vmacache_flush_all(struct mm_struct *mm)
>  {
>  	struct task_struct *g, *p;
>  
> +	/*
> +	 * Single threaded tasks need not iterate the entire
> +	 * list of process. We can avoid the flushing as well
> +	 * since the mm's seqnum was increased and don't have
> +	 * to worry about other threads' seqnum. Current's
> +	 * flush will occur upon the next lookup.
> +	 */
> +	if (atomic_read(&mm->mm_users) == 1)
> +		return;
> +
>  	rcu_read_lock();
>  	for_each_process_thread(g, p) {
>  		/*


--
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-04-15  0:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 23:57 [PATCH 0/3] mm: vmacache updates Davidlohr Bueso
2014-04-14 23:57 ` Davidlohr Bueso
2014-04-14 23:57 ` [PATCH 1/3] mm: fix CONFIG_DEBUG_VM_RB description Davidlohr Bueso
2014-04-14 23:57   ` Davidlohr Bueso
2014-04-14 23:57 ` [PATCH 2/3] mm,vmacache: add debug data Davidlohr Bueso
2014-04-14 23:57   ` Davidlohr Bueso
2014-04-14 23:57 ` [PATCH 3/3] mm,vmacache: optimize overflow system-wide flushing Davidlohr Bueso
2014-04-14 23:57   ` Davidlohr Bueso
2014-04-15  0:02   ` Davidlohr Bueso [this message]
2014-04-15  0:02     ` 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=1397520133.31076.24.camel@buesod1.americas.hpqcorp.net \
    --to=davidlohr@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=aswin@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.