linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@engr.sgi.com>
To: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: linux-mm <linux-mm@kvack.org>,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: Re: [RFC] 4/4 Migration Cache - use for direct migration
Date: Fri, 17 Feb 2006 08:35:25 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0602170834310.30999@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1140190651.5219.25.camel@localhost.localdomain>

On Fri, 17 Feb 2006, Lee Schermerhorn wrote:

> Index: linux-2.6.16-rc3-mm1/mm/vmscan.c
> ===================================================================
> --- linux-2.6.16-rc3-mm1.orig/mm/vmscan.c	2006-02-15 10:50:59.000000000 -0500
> +++ linux-2.6.16-rc3-mm1/mm/vmscan.c	2006-02-15 10:51:09.000000000 -0500
> @@ -911,7 +911,12 @@ redo:
>  		 * preserved.
>  		 */
>  		if (PageAnon(page) && !PageSwapCache(page)) {
> -			if (!add_to_swap(page, GFP_KERNEL)) {
> +			if (!to) {
> +				if (!add_to_swap(page, GFP_KERNEL)) {
> +					rc = -ENOMEM;
> +					goto unlock_page;
> +				}
> +			} else if (add_to_migration_cache(page, GFP_KERNEL)) {
>  				rc = -ENOMEM;
>  				goto unlock_page;
>  			}

Hmmm.... maybe add another parameter to add_to_swap instead? This seems to 
be duplicating some code.

--
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:[~2006-02-17 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 15:37 Lee Schermerhorn
2006-02-17 16:35 ` Christoph Lameter [this message]
2006-02-17 18:37   ` 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=Pine.LNX.4.64.0602170834310.30999@schroedinger.engr.sgi.com \
    --to=clameter@engr.sgi.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.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