]> git.baikalelectronics.ru Git - kernel.git/commit
mm: migrate: one less atomic operation
authorJacobo Giralt <jacobo.giralt@gmail.com>
Tue, 10 Jan 2012 23:07:11 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Jan 2012 00:30:41 +0000 (16:30 -0800)
commitdb57ba21e1cd429990fa37763dbca957471cbcac
treec038d9689edf1f03467227959f66c3ef750a9572
parent3bb091bc0dd68f6d3d24a113b518145fe5d43277
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c