]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: migrate: one less atomic operation
authorJacobo Giralt <jacobo.giralt@gmail.com>
Wed, 16 Nov 2011 23:41:25 +0000 (10:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Nov 2011 02:57:09 +0000 (13:57 +1100)
commit7f7785923e9ebcd9d4e5e51ea3822b0ab9b9f227
tree9f614e6e6377c24d64111732bcf6f60b48cd42b4
parentef0c417d53c5961284e9f52d395eaecc1d27aebb
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