lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] Direct Migration V9: Avoid writeback / page_migrate() method
On Tue, 10 Jan 2006, Andrew Morton wrote:

> So let's see. Suppose the kernel is about to dink with a page's buffer
> ring. It does:
>
> get_page(page);
> lock_page(page);
> dink_with(page_buffers(page));
>
> how do these patches ensure that the page doesn't get migrated under my
> feet?

The page is locked when buffer_migrate_page is called. Thus

lock_page

will block.

If the refcount was increased before the migration code does the lock
on the tree_lock then the migration will be aborted.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-11 07:55    [W:0.053 / U:1.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site