mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: cpw@sgi.com, linux-kernel@vger.kernel.org, clameter@sgi.com,
	lhms-devel@lists.sourceforge.net, taka@valinux.co.jp,
	kamezawa.hiroyu@jp.fujitsu.com
Subject: Re: [PATCH 2/5] Direct Migration V9: migrate_pages() extension
Date: Tue, 10 Jan 2006 21:46:48 -0800	[thread overview]
Message-ID: <20060110214648.4d54da7c.akpm@osdl.org> (raw)
In-Reply-To: <20060110224124.19138.36811.sendpatchset@schroedinger.engr.sgi.com>

Christoph Lameter <clameter@sgi.com> wrote:
>
> +	for(i = 0; i < 10 && page_mapped(page); i++) {
>  +		int rc = try_to_unmap(page);
>  +
>  +		if (rc == SWAP_SUCCESS)
>  +			break;
>  +		/*
>  +		 * If there are other runnable processes then running
>  +		 * them may make it possible to unmap the page
>  +		 */
>  +		schedule();
>  +	}

The schedule() in state TASK_RUNNING simply won't do anything unless this
process happens to have been preempted.  You'll find that an ndelay(100) is
about as useful.

So I'd suggest that this part needs a bit of a rethink.  If we really need
to run other processes then try a schedule_timeout_uninterruptible(1).  If
not, just remove the loop.

Please stick a printk in there, work out how often and under which
workloads that loop is actually doing something useful.

  reply	other threads:[~2006-01-11  5:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 22:41 [PATCH 0/5] Direct Migration V9: Overview Christoph Lameter
2006-01-10 22:41 ` [PATCH 1/5] Direct Migration V9: PageSwapCache checks Christoph Lameter
2006-01-10 22:41 ` [PATCH 2/5] Direct Migration V9: migrate_pages() extension Christoph Lameter
2006-01-11  5:46   ` Andrew Morton [this message]
2006-01-12  3:25     ` Christoph Lameter
2006-01-10 22:41 ` [PATCH 3/5] Direct Migration V9: remove_from_swap() to remove swap ptes Christoph Lameter
2006-01-10 22:41 ` [PATCH 4/5] Direct Migration V9: upgrade MPOL_MF_MOVE and sys_migrate_pages() Christoph Lameter
2006-01-10 22:41 ` [PATCH 5/5] Direct Migration V9: Avoid writeback / page_migrate() method Christoph Lameter
2006-01-11  6:03   ` Andrew Morton
2006-01-11  6:38     ` Christoph Lameter
2006-01-11  6:49       ` Andrew Morton
2006-01-11  6:52         ` Christoph Lameter
2006-01-11  6:25   ` Andrew Morton
2006-01-11  3:26 ` [PATCH 0/5] Direct Migration V9: Overview KAMEZAWA Hiroyuki
2006-01-11  6:10   ` Christoph Lameter
2006-01-11  6:18   ` Christoph Lameter

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=20060110214648.4d54da7c.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=cpw@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=taka@valinux.co.jp \
    /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

Powered by JetHome