Re: [PATCH 5/5] Direct Migration V9: Avoid writeback / page_migrate()method
From: Christoph Lameter
Date: Wed Jan 11 2006 - 01:51:48 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/