]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7925/1: mm: keep track of last ASID allocation to improve bitmap searching
authorWill Deacon <will.deacon@arm.com>
Tue, 17 Dec 2013 18:17:31 +0000 (19:17 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 29 Dec 2013 12:46:48 +0000 (12:46 +0000)
commitb1f93b62be1db29330b64f47841c6f4d8a5abc5a
tree7b321f537f2a9b532f3ae8b482797c4d7c672d1b
parent3064f3f4d2d85434c366c9221f2e9cfa9def7b95
ARM: 7925/1: mm: keep track of last ASID allocation to improve bitmap searching

Since we only clear entries in the ASID bitmap on a rollover event, the
bitmap tends to consist of a block of consecutive set bits followed by
a block of consecutive clear bits. The exception to this rule is for
ASIDs which have been carried over from a previous generation, but
these are bound by the number of CPUs.

This patch optimises our bitmap searching strategy, so that we search
from the last successful allocation, rather than search from index 1
each time we allocate a new ASID.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/context.c