Re: [PATCH 5/5] Direct Migration V9: Avoid writeback / page_migrate() method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux