s390/mm: optimize page table upgrade routine
authorAlexander Gordeev <agordeev@linux.ibm.com>
Sun, 8 Mar 2020 20:34:49 +0000 (21:34 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Mar 2020 12:41:53 +0000 (13:41 +0100)
commit31932757c6121b394cd4f158b6b8f1cca8ffe871
treeea17b9d5dcfde12cdf13b659ad05d5b8d4a8fbbe
parentbb533ec8bacd064ee273ca3305db97938c3331ae
s390/mm: optimize page table upgrade routine

There is a maximum of two new tables allocated on page table
upgrade. Because we know that a loop the current implementation
is based on could be unrolled with some improvements:

  * upgrade from 3 to 5 levels happens in one go - without an
    unnecessary re-take of page_table_lock in-between;

  * page tables initialization moved out of the atomic code;

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/pgalloc.c