From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Surprisingly high use of file descriptors Date: Thu, 05 May 2022 11:20:49 +0300 Message-ID: <83czgs2xwe.fsf@gnu.org> References: <874k25726k.fsf@gmail.com> <87r1585u5k.fsf@gmail.com> <83ee182zg1.fsf@gnu.org> <87mtfw5sew.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28370"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 05 11:06:18 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 1nmXRC-00079L-2m for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 11:06:18 +0200 Original-Received: from localhost ([::1]:39782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmXRA-0004x7-SW for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 05:06:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmWjU-0005Wj-1h for emacs-devel@gnu.org; Thu, 05 May 2022 04:21:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmWjS-0000XS-Pq; Thu, 05 May 2022 04:21:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=sFMbsncrv2v6IaP8X0V6ivq7d1yC6FgVj/nXdfAMG9Y=; b=MrxAo+XoeIFBKAHztaAb Jf0uVDkrgLk5efEele1HNMx3GjwkAHOaJncDpL1XD+9PrB/ItmVPZPeWT0HkPp6nROEMT7Z5KoVG5 wLaUYP4WRJ25e9uA2DmqFuWWKsv5uzITT/JINHCZORG0owDhG75Kej4JAhDos64sgjhZIkmG4L8qR LSG78e/hSndQLXUlVBn9yRvTRtHxdZcEwJbl+lVmfi+mhzODdGlfBrDgi6cGgBwmu8OVY/JJzvKYV wwqpRKs2Si8i8UfXBvV35iMU4d1pgG7POBieDmQpgJ4qzJaGdldUZxzX1GEihxvMhOFMNRnNRegIo eAxbI4as6p+zNA==; Original-Received: from [87.69.77.57] (port=2019 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmWjQ-0000sm-NR; Thu, 05 May 2022 04:21:06 -0400 In-Reply-To: <87mtfw5sew.fsf@gmail.com> (message from Robert Pluim on Thu, 05 May 2022 09:51:03 +0200) 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:289232 Archived-At: > From: Robert Pluim > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Thu, 05 May 2022 09:51:03 +0200 > > >>>>> On Thu, 05 May 2022 10:47:26 +0300, Eli Zaretskii said: > > 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 process > Eli> is on the order of tens of thousands. > > That sounds like something Someone™ could use to write a proper 'poll' > emulation ☺️ What for? for file notifications we don't use any poll-like interface anyway. > (I think gnulib has one, but I haven't looked at it). Isn't is still limited to 64 handles?