Thread (62 messages) 62 messages, 5 authors, 2021-04-21

Re: [RFC Part2 PATCH 07/30] mm: add support to split the large THP based on RMP violation

From: Dave Hansen <hidden>
Date: 2021-03-25 14:31:20
Also in: linux-crypto, lkml

On 3/24/21 10:04 AM, Brijesh Singh wrote:
quoted hunk ↗ jump to hunk
@@ -1377,6 +1442,22 @@ void do_user_addr_fault(struct pt_regs *regs,
 	if (hw_error_code & X86_PF_INSTR)
 		flags |= FAULT_FLAG_INSTRUCTION;
 
+	/*
+	 * If its an RMP violation, see if we can resolve it.
+	 */
+	if ((hw_error_code & X86_PF_RMP)) {
+		ret = handle_rmp_page_fault(hw_error_code, address);
+		if (ret == RMP_FAULT_PAGE_SPLIT) {
+			flags |= FAULT_FLAG_PAGE_SPLIT;
+		} else if (ret == RMP_FAULT_KILL) {
+			fault |= VM_FAULT_SIGBUS;
+			mm_fault_error(regs, hw_error_code, address, fault);
+			return;
+		} else {
+			return;
+		}
+	}
Won't khugepaged come right back around and coalesce this page again?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help