]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
s390/pgtable: skip pgste updates on full flush
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 19 Jul 2013 08:31:55 +0000 (10:31 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 8 Aug 2013 14:32:09 +0000 (16:32 +0200)
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 <schwidefsky@de.ibm.com>
arch/s390/include/asm/pgtable.h

index e75fa7e9b82dfff986c2490343c67bb8e60632ae..c2ec8356667992b9fb36d697a7b10bd735ce796e 100644 (file)
@@ -1148,10 +1148,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;
@@ -1159,7 +1158,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);
        }