Skip to contentSkip to conversation

userfaultfd-selftests-only-dump-counts-if-mode-enabled.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: userfaultfd/selftests: only dump counts if mode enabled
has been removed from the -mm tree. Its filename was
userfaultfd-selftests-only-dump-counts-if-mode-enabled.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Peter Xu <[email protected]>
Subject: userfaultfd/selftests: only dump counts if mode enabled

WP and MINOR modes are conditionally enabled on specific memory types. This patch avoids dumping tons of zeros for those cases when the modes are not supported at all.

Cc Alexander Viro <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Brian Geffon <[email protected]>
Cc "Dr . David Alan Gilbert" <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Jerome Glisse <[email protected]>
Cc Joe Perches <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Lokesh Gidra <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Mina Almasry <[email protected]>
Cc Oliver Upton <[email protected]>
Cc Shaohua Li <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Wang Qing <[email protected]>

---

 tools/testing/selftests/vm/userfaultfd.c |   30 ++++++++++++++-------
 1 file changed, 20 insertions(+), 10 deletions(-)
tools/testing/selftests/vm/userfaultfd.c renamed from tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-only-dump-counts-if-mode-enabled +20 -10
@@ -171,16 +171,26 @@ static void uffd_stats_report(struct uff
 		minor_total += stats[i].minor_faults;
 	}
 
-	printf("userfaults: %llu missing (", miss_total);
-	for (i = 0; i < n_cpus; i++)
-		printf("%lu+", stats[i].missing_faults);
-	printf("\b), %llu wp (", wp_total);
-	for (i = 0; i < n_cpus; i++)
-		printf("%lu+", stats[i].wp_faults);
-	printf("\b), %llu minor (", minor_total);
-	for (i = 0; i < n_cpus; i++)
-		printf("%lu+", stats[i].minor_faults);
-	printf("\b)\n");
+	printf("userfaults: ");
+	if (miss_total) {
+		printf("%llu missing (", miss_total);
+		for (i = 0; i < n_cpus; i++)
+			printf("%lu+", stats[i].missing_faults);
+		printf("\b) ");
+	}
+	if (wp_total) {
+		printf("%llu wp (", wp_total);
+		for (i = 0; i < n_cpus; i++)
+			printf("%lu+", stats[i].wp_faults);
+		printf("\b) ");
+	}
+	if (minor_total) {
+		printf("%llu minor (", minor_total);
+		for (i = 0; i < n_cpus; i++)
+			printf("%lu+", stats[i].minor_faults);
+		printf("\b)");
+	}
+	printf("\n");
 }
 
 static int anon_release_pages(char *rel_area)

_

Patches currently in -mm which might be from [email protected] are