s390: fix gmap_ipte_notifier vs. software dirty pages
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 8 May 2013 13:25:38 +0000 (15:25 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 15 May 2013 11:09:07 +0000 (13:09 +0200)
On heavy paging load some guest cpus started to loop in gmap_ipte_notify.
This was visible as stalled cpus inside the guest. The gmap_ipte_notifier
tries to map a user page and then made sure that the pte is valid and
writable. Turns out that with the software change bit tracking the pte
can become read-only (and only software writable) if the page is clean.
Since we loop in this code, the page would stay clean and, therefore,
be never writable again.
Let us just use fixup_user_fault, that guarantees to call handle_mm_fault.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c

index 7805ddca833d7092149958e8ed56522598b2db07..18dc417aaf79dfc99bd17c48f427bda08ccb6fc5 100644 (file)
@@ -677,8 +677,7 @@ int gmap_ipte_notify(struct gmap *gmap, unsigned long start, unsigned long len)
                        break;
                }
                /* Get the page mapped */
-               if (get_user_pages(current, gmap->mm, addr, 1, 1, 0,
-                                  NULL, NULL) != 1) {
+               if (fixup_user_fault(current, gmap->mm, addr, FAULT_FLAG_WRITE)) {
                        rc = -EFAULT;
                        break;
                }
This page took 0.026916 seconds and 5 git commands to generate.