From: Martin Schwidefsky Date: Fri, 19 Jul 2013 08:31:55 +0000 (+0200) Subject: s390/pgtable: skip pgste updates on full flush X-Git-Tag: next-20130731~91^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b2d77ba4dc7b59c2213d93a8b0e450b9b210e76d;p=karo-tx-linux.git s390/pgtable: skip pgste updates on full flush On process exit there is no more need for the pgste information. Skip the expensive storage key operations which should speed up termination of KVM processes. Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 2a6364b6f556..236b24ad1f2b 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1146,10 +1146,9 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, pgste_t pgste; pte_t pte; - if (mm_has_pgste(mm)) { + if (!full && mm_has_pgste(mm)) { pgste = pgste_get_lock(ptep); - if (!full) - pgste = pgste_ipte_notify(mm, address, ptep, pgste); + pgste = pgste_ipte_notify(mm, address, ptep, pgste); } pte = *ptep; @@ -1157,7 +1156,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, __ptep_ipte(address, ptep); pte_val(*ptep) = _PAGE_INVALID; - if (mm_has_pgste(mm)) { + if (!full && mm_has_pgste(mm)) { pgste = pgste_update_all(&pte, pgste); pgste_set_unlock(ptep, pgste); }