All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: mempolicy: Skip inaccessible VMAs when setting MPOL_MF_LAZY
Date: Thu, 2 Oct 2014 21:59:03 +0200	[thread overview]
Message-ID: <20141002195903.GE10583@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20141002191703.GN17501@suse.de>

On Thu, Oct 02, 2014 at 08:17:03PM +0100, Mel Gorman wrote:
> PROT_NUMA VMAs are skipped to avoid problems distinguishing between
> present, prot_none and special entries. MPOL_MF_LAZY is not visible from
> userspace since commit a720094ded8c ("mm: mempolicy: Hide MPOL_NOOP and
> MPOL_MF_LAZY from userspace for now") but it should still skip VMAs the
> same way task_numa_work does.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> Acked-by: Rik van Riel <riel@redhat.com>

Acked-by: Peter Zijlstra <peterz@infradead.org>

> ---
>  mm/mempolicy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 8f5330d..a5877ce 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -683,7 +683,9 @@ queue_pages_range(struct mm_struct *mm, unsigned long start, unsigned long end,
>  		}
>  
>  		if (flags & MPOL_MF_LAZY) {
> -			change_prot_numa(vma, start, endvma);
> +			/* Similar to task_numa_work, skip inaccessible VMAs */
> +			if (vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))
> +				change_prot_numa(vma, start, endvma);
>  			goto next;
>  		}
>  

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

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: mempolicy: Skip inaccessible VMAs when setting MPOL_MF_LAZY
Date: Thu, 2 Oct 2014 21:59:03 +0200	[thread overview]
Message-ID: <20141002195903.GE10583@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20141002191703.GN17501@suse.de>

On Thu, Oct 02, 2014 at 08:17:03PM +0100, Mel Gorman wrote:
> PROT_NUMA VMAs are skipped to avoid problems distinguishing between
> present, prot_none and special entries. MPOL_MF_LAZY is not visible from
> userspace since commit a720094ded8c ("mm: mempolicy: Hide MPOL_NOOP and
> MPOL_MF_LAZY from userspace for now") but it should still skip VMAs the
> same way task_numa_work does.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> Acked-by: Rik van Riel <riel@redhat.com>

Acked-by: Peter Zijlstra <peterz@infradead.org>

> ---
>  mm/mempolicy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 8f5330d..a5877ce 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -683,7 +683,9 @@ queue_pages_range(struct mm_struct *mm, unsigned long start, unsigned long end,
>  		}
>  
>  		if (flags & MPOL_MF_LAZY) {
> -			change_prot_numa(vma, start, endvma);
> +			/* Similar to task_numa_work, skip inaccessible VMAs */
> +			if (vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))
> +				change_prot_numa(vma, start, endvma);
>  			goto next;
>  		}
>  

  parent reply	other threads:[~2014-10-02 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 19:17 [PATCH] mm: mempolicy: Skip inaccessible VMAs when setting MPOL_MF_LAZY Mel Gorman
2014-10-02 19:17 ` Mel Gorman
2014-10-02 19:41 ` Hugh Dickins
2014-10-02 19:41   ` Hugh Dickins
2014-10-02 19:59 ` Peter Zijlstra [this message]
2014-10-02 19:59   ` Peter Zijlstra

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=20141002195903.GE10583@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@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.