Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706615 > unrolled thread

[PATCH 15/16] powerpc/mm: Add support for SPF events

Started byLaurent Dufour <ldufour@linux.vnet.ibm.com>
First post2017-08-08 16:40 +0200
Last post2017-08-08 16:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 15/16] powerpc/mm: Add support for SPF events Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-08-08 16:40 +0200

#1706615 — [PATCH 15/16] powerpc/mm: Add support for SPF events

FromLaurent Dufour <ldufour@linux.vnet.ibm.com>
Date2017-08-08 16:40 +0200
Subject[PATCH 15/16] powerpc/mm: Add support for SPF events
Message-ID<ucdPQ-1fE-19@gated-at.bofh.it>
Add support for the new speculative page faults software events.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
 arch/powerpc/mm/fault.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index c6cd40901dd0..112c4bc9da70 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -306,8 +306,13 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
 			flags |= FAULT_FLAG_WRITE;
 
 		fault = handle_speculative_fault(mm, address, flags);
-		if (!(fault & VM_FAULT_RETRY || fault & VM_FAULT_ERROR))
+		if (!(fault & VM_FAULT_RETRY || fault & VM_FAULT_ERROR)) {
+			perf_sw_event(PERF_COUNT_SW_SPF_DONE, 1,
+				      regs, address);
 			goto done;
+		}
+
+		perf_sw_event(PERF_COUNT_SW_SPF_FAILED, 1, regs, address);
 
 		/*
 		 * Resetting flags since the following code assumes
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web