mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] get_maintainer: only use THE REST as a fallback
@ 2026-10-08 12:51 Konstantin Ryabitsev
  2026-10-08 13:03 ` Jason A. Donenfeld
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Konstantin Ryabitsev @ 2026-10-08 12:51 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, users, Konstantin Ryabitsev

THE REST matches every file in the tree via "F: *" and "F: */", so
get_maintainer.pl currently adds linux-kernel@vger.kernel.org to every
patch, regardless of whether the touched files already belong to a
subsystem with its own mailing list.

Only add THE REST for a file when no other matching section provides a
mailing list for it. Files that match no section, or only sections
without an L: entry, still fall back to THE REST, so every patch keeps
reaching at least one public list.

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
---
LKML has become mostly a firehose of patches that are already going to a
subsystem list. The reason is THE REST: it matches every file in the
tree, so get_maintainer.pl adds linux-kernel@vger.kernel.org to every
single patch. During the week of Oct 1-7, 2026:

  - LKML carried 13,641 messages (~1,950/day), 90% of which were also
    sent to at least one other list;
  - with ~2,100 subscribers, that is about 29 million deliveries per
    week for LKML alone.

This issue came up during the 2026 Maintainer Summit and the consensus
was that "always include linux-kernel for every patch" was never the
intent.

This patch makes THE REST a fallback as initially intended: it is only
added for a file when no other matching MAINTAINERS section provides a
mailing list for it.
---
 scripts/get_maintainer.pl | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 16b80a700d4a..966595c3a6de 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -959,6 +959,14 @@ sub get_maintainers {
 	    $tvi = $end + 1;
 	}
 
+	# THE REST matches every file, so only fall back to it when no
+	# other matching section provides a mailing list for this file.
+	my ($the_rest) = grep { get_section_name($_) eq "THE REST" } keys %hash;
+	if (defined($the_rest) &&
+	    grep { $_ != $the_rest && section_has_list($_) } keys %hash) {
+	    delete $hash{$the_rest};
+	}
+
 	foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
 	    add_categories($line, "");
 	    if ($sections) {
@@ -1295,6 +1303,23 @@ sub find_ending_index {
     return $index;
 }
 
+sub get_section_name {
+    my ($index) = @_;
+
+    return $typevalue[find_starting_index($index)];
+}
+
+sub section_has_list {
+    my ($index) = @_;
+
+    my $start = find_starting_index($index);
+    my $end = find_ending_index($index);
+    for (my $i = $start; $i < $end; $i++) {
+	return 1 if ($typevalue[$i] =~ m/^L:/);
+    }
+    return 0;
+}
+
 sub get_subsystem_name {
     my ($index) = @_;
 

---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20261008-get-maintainer-the-rest-fallback-6655e8a648d4

Best regards,
--  
Konstantin Ryabitsev <konstantin@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-10-09 16:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 12:51 [PATCH] get_maintainer: only use THE REST as a fallback Konstantin Ryabitsev
2026-10-08 13:03 ` Jason A. Donenfeld
2026-10-08 13:10   ` Konstantin Ryabitsev
2026-10-08 13:22     ` Matthieu Baerts
2026-10-08 14:05       ` Konstantin Ryabitsev
2026-10-08 16:04         ` Matthieu Baerts
2026-10-09 16:41     ` Jason A. Donenfeld
2026-10-08 13:15 ` Jürgen Groß
2026-10-08 14:02   ` Konstantin Ryabitsev
2026-10-09 12:24   ` Jason Gunthorpe
2026-10-08 13:15 ` Michael S. Tsirkin
2026-10-08 13:39 ` Petr Pavlu
2026-10-08 14:06   ` Konstantin Ryabitsev
2026-10-09 16:25 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®