Re: [PATCH] mm: migrate: One less atomic operation

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

 



On Sat, 05 Nov 2011 15:38:17 +0100
Jacobo Giralt <jacobo.giralt@xxxxxxxxx> wrote:

> >From 3754c8617ef4377ce2ca2e3b28bdc28f8de1aa0d Mon Sep 17 00:00:00 2001
> From: Jacobo Giralt <jacobo.giralt@xxxxxxxxx>
> Date: Sat, 5 Nov 2011 13:12:50 +0100
> Subject: [PATCH] mm: migrate: One less atomic operation
> 
> migrate_page_move_mapping drops a reference from the
> old page after unfreezing its counter. Both operations
> can be merged into a single atomic operation by
> directly unfreezing to one less reference.
> 
> The same applies to migrate_huge_page_move_mapping.
> 

Fair enough.

urgh, you made me look at stuff :(

page_unfreeze_refs() and set_page_refcounted() are fishily similar.

page_unfreeze_refs() should use set_page_count().

set_page_count() is defined in the wrong file.

set_page_refcounted() should use page_count().

iow, a bit of a mess.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]