ha.franken.de>, [email protected], Max Filippov <[email protected]>, [email protected], Johannes Berg 
<[email protected]>, Dinh Nguyen <[email protected]>, [email protected], Palmer Dabbelt 
<[email protected]>, Sven Schnelle <[email protected]>, [email protected], Ivan Kokshaysky 
<[email protected]>, Andrew Morton <[email protected]>, [email protected], "David S . 
Miller" <[email protected]>
Errors-To: [email protected]
Sender: "Linuxppc-dev" 
<[email protected]>



Am 29.05.22 um 22:33 schrieb Heiko Carstens:
[...]

Guess the patch below on top of your patch is what we want.
Just for clarification: if gmap is not NULL then the process is a kvm
process. So, depending on the workload, this optimization makes sense.

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 4608cc962ecf..e1d40ca341b7 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -436,12 +436,11 @@ static inline vm_fault_t do_exception(struct pt_regs 
*regs, int access)
/* The fault is fully completed (including releasing mmap lock) */
        if (fault & VM_FAULT_COMPLETED) {
-               /*
-                * Gmap will need the mmap lock again, so retake it.  TODO:
-                * only conditionally take the lock when CONFIG_PGSTE set.
-                */
-               mmap_read_lock(mm);
-               goto out_gmap;
+               if (gmap) {
+                       mmap_read_lock(mm);
+                       goto out_gmap;
+               }
+               goto out;

Yes, that makes sense. With that

Acked-by: Christian Borntraeger <[email protected]>

Reply via email to