lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Apr 2008 12:10:32 +0300
From:	Avi Kivity <avi@...ranet.com>
To:	kvm-devel@...ts.sourceforge.net
Cc:	linux-kernel@...r.kernel.org,
	Heiko Carstens <heiko.carstens@...ibm.com>
Subject: [PATCH 27/45] KVM: s390: Improve pgste accesses

From: Heiko Carstens <heiko.carstens@...ibm.com>

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@...ibm.com>
Signed-off-by: Carsten Otte <cotte@...ibm.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
---
 include/asm-s390/pgtable.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 7fe5c4b..4c0698c 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -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
-- 
1.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ