linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: n-horiguchi@ah.jp.nec.co, linux-kernel@vger.kernel.org
Cc: mm-commits@vger.kernel.org, xemul@parallels.com, riel@redhat.com,
	mpm@selenic.com, mhocko@suse.cz, kosaki.motohiro@jp.fujitsu.com,
	kirill.shutemov@linux.intel.com, kamezawa.hiroyu@jp.fujitsu.com,
	hannes@cmpxchg.org, cpw@sgi.com, benh@kernel.crashing.org,
	aneesh.kumar@linux.vnet.ibm.com, n-horiguchi@ah.jp.nec.com
Subject: Re: + pagewalk-update-page-table-walker-core.patch added to -mm tree
Date: Mon, 26 May 2014 14:33:51 +0300	[thread overview]
Message-ID: <20140526113351.GA7762@node.dhcp.inet.fi> (raw)
In-Reply-To: <52f955c0.7BhMyAjSaddn+QeR%akpm@linux-foundation.org>

On Mon, Feb 10, 2014 at 02:42:08PM -0800, akpm@linux-foundation.org wrote:
> diff -puN include/linux/mm.h~pagewalk-update-page-table-walker-core include/linux/mm.h
> --- a/include/linux/mm.h~pagewalk-update-page-table-walker-core
> +++ a/include/linux/mm.h
> @@ -1075,10 +1075,18 @@ void unmap_vmas(struct mmu_gather *tlb,
>   * @pte_entry: if set, called for each non-empty PTE (4th-level) entry
>   * @pte_hole: if set, called for each hole at all levels
>   * @hugetlb_entry: if set, called for each hugetlb entry
> - *		   *Caution*: The caller must hold mmap_sem() if @hugetlb_entry
> - * 			      is used.
> + * @test_walk: caller specific callback function to determine whether
> + *             we walk over the current vma or not. A positive returned
> + *             value means "do page table walk over the current vma,"
> + *             and a negative one means "abort current page table walk
> + *             right now." 0 means "skip the current vma."

This comment conflicts with comment for walk_page_test() and code itself:

> +/*
> + * Decide whether we really walk over the current vma on [@start, @end)
> + * or skip it. When we skip it, we set @walk->skip to 1.
> + * The return value is used to control the page table walking to
> + * continue (for zero) or not (for non-zero).
> + *
> + * Default check (only VM_PFNMAP check for now) is used when the caller
> + * doesn't define test_walk() callback.
> + */
> +static int walk_page_test(unsigned long start, unsigned long end,
> +			struct mm_walk *walk)
> +{
> +	struct vm_area_struct *vma = walk->vma;
> +
> +	if (walk->test_walk)
> +		return walk->test_walk(start, end, walk);

...

> +		} else { /* inside the found vma */
> +			walk->vma = vma;
> +			next = vma->vm_end;
> +			err = walk_page_test(start, end, walk);
> +			if (skip_lower_level_walking(walk))
>  				continue;
> -			}
> -		}
> -
> -		if (pgd_none_or_clear_bad(pgd)) {
> -			if (walk->pte_hole)
> -				err = walk->pte_hole(addr, next, walk);
>  			if (err)
>  				break;
> -			pgd++;
> -			continue;

-- 
 Kirill A. Shutemov

           reply	other threads:[~2014-05-26 11:35 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <52f955c0.7BhMyAjSaddn+QeR%akpm@linux-foundation.org>]

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=20140526113351.GA7762@node.dhcp.inet.fi \
    --to=kirill@shutemov.name \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=cpw@sgi.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=mm-commits@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=n-horiguchi@ah.jp.nec.co \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=riel@redhat.com \
    --cc=xemul@parallels.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).