]> 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>
Tue, 29 Nov 2011 03:37:23 +0000 (14:37 +1100)
commit2c074a7c9a451b6eb9a890f82ca02bd9a27dffac
tree5a1a19e300ce579a74cf689d1ee8749e0aa5bb0e
parentbf89b00866427b82c092707570abff5b8e869eca
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