On 05/05/2011 03:32 PM, Andi Kleen wrote:
From: Andi Kleen<ak@xxxxxxxxxxxxxxx> In fork and exit it's quite common to take same rmap chain locks again and again when the whole address space is processed for a address space that has a lot of sharing. Also since the locking has changed to always lock the root anon_vma this can be very contended. This patch adds a simple wrapper to batch these lock acquisitions and only reaquire the lock when another is needed. The main advantage is that when multiple processes are doing this in parallel they will avoid a lot of communication overhead on the lock cache line. I added a simple lock break (100 locks) for paranoia reason, but it's unclear if that's needed or not. Cc: Andrea Arcangeli<aarcange@xxxxxxxxxx> Cc: Rik van Riel<riel@xxxxxxxxxx> Signed-off-by: Andi Kleen<ak@xxxxxxxxxxxxxxx>
Reviewed-by: Rik van Riel<riel@xxxxxxxxxx> -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>