Browse Source

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 <schwidefsky@de.ibm.com>
Martin Schwidefsky 12 năm trước cách đây
mục cha
commit
a055f66a3a
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      arch/s390/include/asm/pgtable.h

+ 3 - 4
arch/s390/include/asm/pgtable.h

@@ -1144,10 +1144,9 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
 	pgste_t pgste;
 	pgste_t pgste;
 	pte_t pte;
 	pte_t pte;
 
 
-	if (mm_has_pgste(mm)) {
+	if (!full && mm_has_pgste(mm)) {
 		pgste = pgste_get_lock(ptep);
 		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;
 	pte = *ptep;
@@ -1155,7 +1154,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
 		__ptep_ipte(address, ptep);
 		__ptep_ipte(address, ptep);
 	pte_val(*ptep) = _PAGE_INVALID;
 	pte_val(*ptep) = _PAGE_INVALID;
 
 
-	if (mm_has_pgste(mm)) {
+	if (!full && mm_has_pgste(mm)) {
 		pgste = pgste_update_all(&pte, pgste);
 		pgste = pgste_update_all(&pte, pgste);
 		pgste_set_unlock(ptep, pgste);
 		pgste_set_unlock(ptep, pgste);
 	}
 	}