]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: migrate: one less atomic operation
authorJacobo Giralt <jacobo.giralt@gmail.com>
Thu, 8 Dec 2011 04:38:54 +0000 (15:38 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:09 +0000 (17:43 +1100)
commitc108ac60351ef7d37e6e4612ab6e68f2ff312fbe
tree07f80f5671f5bdb22f938536975f1657becfc2d5
parentb65c8b6b95a203f376fc7816addb250b4f74ca63
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().

Signed-off-by: Jacobo Giralt <jacobo.giralt@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate.c