From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Surprisingly high use of file descriptors Date: Thu, 05 May 2022 10:25:52 +0200 Message-ID: <87ee185qsv.fsf@gmail.com> References: <874k25726k.fsf@gmail.com> <87r1585u5k.fsf@gmail.com> <83ee182zg1.fsf@gnu.org> <87mtfw5sew.fsf@gmail.com> <83czgs2xwe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36635"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 05 11:16:11 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmXal-0009Pn-29 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 11:16:11 +0200 Original-Received: from localhost ([::1]:33026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmXaj-0002gz-58 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 05:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmWo9-0002je-K5 for emacs-devel@gnu.org; Thu, 05 May 2022 04:25:57 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmWo7-0001Xl-VT; Thu, 05 May 2022 04:25:57 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id k2so5056952wrd.5; Thu, 05 May 2022 01:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=H2hULyB90Luu3lt9Vlvws38DT84sLAlrFdkSNhBEnvE=; b=oRV7OhW4LuVxAdfEWZq6UYEgx1MJLsFnLrDFt0zVoSO21bjdNIuvZbgtqApWonfEa/ DedUrkKzq5QTfoKaBO1k5dTNsVMT/6lFB6UHkAMrRQZe6l8BKJb2dgUTVm5qto+7f/ta uivUvcgR95honLQmAWTEnqvFUwgyI/lUtublGCZT56URVdmwkDKgFFjEYMYNkehuv9XP 5NJJ+ZH8oUKk9itKUfK8ijMdjFstxe3nv1dS0eVRfRcwLxR3NGx0jRfWfT9wfuI0aJAf MkFy54A5m18othkoe8EAPp0DSYM49G/R6EDZNvdM6+91/ea1TVPxGqptYxFBQQAbk6xf VOVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=H2hULyB90Luu3lt9Vlvws38DT84sLAlrFdkSNhBEnvE=; b=b6h+IcPLzGXxdsNV3nF0R/ntkLwy7py0AMJ4LVnJXdNyvv2vocS13op/9LFdgmV9mM v2el9EGl1QPdx81s01exocoRWtU68JgGd8hzL2uSyoOixD3XEyltUVEU7gDutcQWhA94 3jpYSrKZbKvE0frJuIYlU3BNTqcpjHCTIRxpGYdEXswqkzWoIhQ7yIY3HA+wOBbUZ6iP I1SBEC57VM5IV7ZPdy2iZa4x3zBgbZtOb67IuJpNslSwoheVRHwJL5ojjpvqpElaWTix 9Oe3eRBgq4KIAQMUhj+bf+m+GwB+cQMo3yOw1OeF6CWLUw7E5A3eoBx1RVZPFah9Q+xp r7Gg== X-Gm-Message-State: AOAM532wtyFPIGOzEmhcIJC1i+atkEtunzK0TqnSR84/RT/iUMak3Kgu TKWKZoCBECYKU5Mkkel37F8L27KMmTcA+Q== X-Google-Smtp-Source: ABdhPJwosdyB4/VZRwRvh4mBDcdrX/6cnCTsDBLYAvrodW07JOVU141zdGpaIbs9hO8/W4t/oAEdGg== X-Received: by 2002:a5d:6182:0:b0:20a:db93:be6d with SMTP id j2-20020a5d6182000000b0020adb93be6dmr19262064wru.597.1651739153846; Thu, 05 May 2022 01:25:53 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:7623:b433:37be:1f20]) by smtp.gmail.com with ESMTPSA id u10-20020a05600c19ca00b003942a244ec7sm888866wmq.12.2022.05.05.01.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 01:25:53 -0700 (PDT) In-Reply-To: <83czgs2xwe.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 May 2022 11:20:49 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=rpluim@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289234 Archived-At: >>>>> On Thu, 05 May 2022 11:20:49 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org >> Date: Thu, 05 May 2022 09:51:03 +0200 >>=20 >> >>>>> On Thu, 05 May 2022 10:47:26 +0300, Eli Zaretskii said: >>=20 Eli> FTR, on MS-Windows the implementation uses a file handle per watch Eli> (one watch for each directory), but that handle is not monitored by Eli> the emulated pselect. It also creates one thread per each watch. = The Eli> maximum number of file handles per process on MS-Windows is AFAIK = very Eli> large (in the millions), and the maximum number of threads per pro= cess Eli> is on the order of tens of thousands. >>=20 >> That sounds like something Someone=E2=84=A2 could use to write a pro= per 'poll' >> emulation =E2=98=BA=EF=B8=8F Eli> What for? for file notifications we don't use any poll-like interf= ace Eli> anyway. I meant for subprocess support. Although if it behaved like 'select' I wouldn=CA=BCt mind either. >> (I think gnulib has one, but I haven't looked at it). Eli> Isn't is still limited to 64 handles? It uses MsgWaitForMultipleObjects, so I think so. Robert --=20