]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: s390: Improve pgste accesses
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 4 Apr 2008 14:03:34 +0000 (16:03 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 09:01:00 +0000 (12:01 +0300)
There is no need to use interlocked updates when the rcp
lock is held. Therefore the simple bitops variants can be
used. This should improve performance.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
include/asm-s390/pgtable.h

index 7fe5c4b6d82d639ca85752863ca5983970809cfa..4c0698c0dda5f78ce2d6079a8c303408122142bf 100644 (file)
@@ -553,12 +553,12 @@ static inline void ptep_rcp_copy(pte_t *ptep)
 
        skey = page_get_storage_key(page_to_phys(page));
        if (skey & _PAGE_CHANGED)
-               set_bit(RCP_GC_BIT, pgste);
+               set_bit_simple(RCP_GC_BIT, pgste);
        if (skey & _PAGE_REFERENCED)
-               set_bit(RCP_GR_BIT, pgste);
-       if (test_and_clear_bit(RCP_HC_BIT, pgste))
+               set_bit_simple(RCP_GR_BIT, pgste);
+       if (test_and_clear_bit_simple(RCP_HC_BIT, pgste))
                SetPageDirty(page);
-       if (test_and_clear_bit(RCP_HR_BIT, pgste))
+       if (test_and_clear_bit_simple(RCP_HR_BIT, pgste))
                SetPageReferenced(page);
 #endif
 }
@@ -732,8 +732,8 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
        young = ((page_get_storage_key(physpage) & _PAGE_REFERENCED) != 0);
        rcp_lock(ptep);
        if (young)
-               set_bit(RCP_GR_BIT, pgste);
-       young |= test_and_clear_bit(RCP_HR_BIT, pgste);
+               set_bit_simple(RCP_GR_BIT, pgste);
+       young |= test_and_clear_bit_simple(RCP_HR_BIT, pgste);
        rcp_unlock(ptep);
        return young;
 #endif