From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5ED7A1F8C8 for ; Tue, 17 Aug 2021 08:52:42 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] ipc: remove WQ_MAX_WORKERS Date: Tue, 17 Aug 2021 08:52:40 +0000 Message-Id: <20210817085241.25592-3-e@80x24.org> In-Reply-To: <20210817085241.25592-1-e@80x24.org> References: <20210817085241.25592-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We no longer rely on IO::FDPass, so there's no longer a reason to limit this internally. --- lib/PublicInbox/IPC.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index d909dc1c..9efe551b 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -20,7 +20,6 @@ use Socket qw(AF_UNIX MSG_EOR SOCK_STREAM); my $MY_MAX_ARG_STRLEN = 4096 * 33; # extra 4K for serialization my $SEQPACKET = eval { Socket::SOCK_SEQPACKET() }; # portable enough? our @EXPORT_OK = qw(ipc_freeze ipc_thaw); -my $WQ_MAX_WORKERS = 4096; my ($enc, $dec); # ->imports at BEGIN turns sereal_*_with_object into custom ops on 5.14+ # and eliminate method call overhead @@ -354,7 +353,6 @@ sub wq_workers_start { die "socketpair: $!"; $self->ipc_atfork_prepare; $nr_workers //= $self->{-wq_nr_workers}; - $nr_workers = $WQ_MAX_WORKERS if $nr_workers > $WQ_MAX_WORKERS; my $sigset = $oldset // PublicInbox::DS::block_signals(); $self->{-wq_workers} = {}; $self->{-wq_ident} = $ident; @@ -367,7 +365,6 @@ sub wq_worker_incr { # SIGTTIN handler my ($self, $oldset, $fields) = @_; $self->{-wq_s2} or return; die "-wq_nr_workers locked" if defined $self->{-wq_nr_workers}; - return if wq_workers($self) >= $WQ_MAX_WORKERS; $self->ipc_atfork_prepare; my $sigset = $oldset // PublicInbox::DS::block_signals(); _wq_worker_start($self, $sigset, $fields); @@ -443,8 +440,6 @@ sub wq_kill { kill($sig // 'TERM', keys %$workers); } -sub WQ_MAX_WORKERS { $WQ_MAX_WORKERS } - sub DESTROY { my ($self) = @_; my $ppid = $self->{-wq_ppid};