All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Rik Van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re:  [PATCH -mm 23/25] Noreclaim LRU scan sysctl
Date: Tue, 10 Jun 2008 10:52:33 +0800	[thread overview]
Message-ID: <484DEC71.7090607@cn.fujitsu.com> (raw)
In-Reply-To: <484DEA23.50707@cn.fujitsu.com>

> +static void show_page_path(struct page *page)
> +{
> +	char buf[256];
> +	if (page_file_cache(page)) {
> +		struct address_space *mapping = page->mapping;
> +		struct dentry *dentry;
> +		pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
> +
> +		spin_lock(&mapping->i_mmap_lock);
> +		dentry = d_find_alias(mapping->host);
> +		printk(KERN_INFO "rescued: %s %lu\n",
> +		       dentry_path(dentry, buf, 256), pgoff);
> +		spin_unlock(&mapping->i_mmap_lock);
> +	} else {
> +		struct anon_vma *anon_vma;
> +		struct vm_area_struct *vma;
> +
> +		anon_vma = page_lock_anon_vma(page);
> +		if (!anon_vma)
> +			return;
> +
> +		list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
> +			printk(KERN_INFO "rescued: anon %s\n",
> +			       vma->vm_mm->owner->comm);

This would cause compile failure if !CONFIG_MM_OWNER.

> +			break;
> +		}
> +		page_unlock_anon_vma(anon_vma);
> +	}
> +}

       reply	other threads:[~2008-06-10  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <484DEA23.50707@cn.fujitsu.com>
2008-06-10  2:52 ` Li Zefan [this message]
2008-06-06 20:28 [PATCH -mm 00/25] VM pageout scalability improvements (V10) Rik van Riel, Rik van Riel
2008-06-06 20:29 ` [PATCH -mm 23/25] Noreclaim LRU scan sysctl Rik van Riel, Rik van Riel
2008-06-06 20:29   ` Rik van Riel, Rik van Riel, Lee Schermerhorn

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=484DEC71.7090607@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --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.