delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/27/21:43:47

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34B3E393C853
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1598578977;
bh=esPdMDaPedmuVwYZnPjR2Kd+JZLcwd7wHJkyP6M+sUI=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=cgtaoP4wlZAVVREhd+9u1jPIBKVmbcsOaGc/lNCjSxdkdI9yW70AT+U8hUL6TcKkl
fh3vMZTfm19yucBUEgsJGP8s+kaEi6vKeOjXMtHQtZp5uTJw80eKhEdtSrgccYC9z8
8jP1boKdG8Fgpu6uSb2L3iK4RpZYI0kA3rQJzKsM=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 11C67388C025
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=kTPwCi8Va/qKgghGSQB7cPhsyN4x3soXs7xVGAvCes1G951znwvS6ga7q9XivkCobg/r8IrrUD06wXfMQ/eorvP4AEUxqqH1SiPgkbN7LVvluVdUOJMkCl3AEAnuHCNuQYNGZ3eK2tlrw6PN7IJViHJrjrcOe+IuXQgtMDSNTwxXtO/Ca9P2yr+nNWvqUR2/uxK+gSvU3pgbpWTKpfSzl3lA5GnIhqlOvzml7WB2TEPnfNGmflxrbn2eqip5A1HxJcPzTP7FeKA35OhHw8Y6ljzHPKayAoXTeaBpH8zK1jCTdIzrnPQ6NDKiPU6eUufJxUqA7c2EEdASy/+euWWV1A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=wuGbxKjxqS5CIR3hD3CrMu8wzLwSfGezDRep9Njpi50=;
b=OArr/Pjtjq3+DN+dJvazrc4xuoL/GXCQQWTwow9Dya1K2TYzlU4J2G2Gn5/uKFPmgQdljpkJAEasHsa5ya0Cicyrdbm+UI69Ovoc9vZe5weu8yTJC45Jp2MARYtZWinGC2ahrWGph0vhjEuAfy0ie5kJQtwLDbKBWgZolbmldtDpdiOF6ucdrnHf18elEIF9Y+dLuzAb9b2sEl8gdeeEDkzC5X3MlBqP7eyhrwUek6mpDK7H4XLIcqkWFwMl7F5aMsKfxbESm6VKnYsdX03MG9RZBkq00blPyQODnJnXFep3VCKYglpIT0mor9Tdj8ba8TVTB/sJY0FmdeVWWPYm+g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
dkim=pass header.d=cornell.edu; arc=none
Subject: Re: Sv: Limit for number of child processes
To: sten DOT kristian DOT ivarsson AT gmail DOT com, cygwin AT cygwin DOT com
References: <000401d67ba0$8b1f33b0$a15d9b10$@gmail.com>
<20200826175724 DOT GQ3272 AT calimero DOT vinschen DOT de>
<000701d67c6c$10bcf720$3236e560$@gmail.com>
Message-ID: <6d698a32-06bb-a47b-58e6-ceeecca722c9@cornell.edu>
Date: Thu, 27 Aug 2020 21:42:48 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.11.0
In-Reply-To: <000701d67c6c$10bcf720$3236e560$@gmail.com>
X-ClientProxiedBy: CH2PR14CA0020.namprd14.prod.outlook.com
(2603:10b6:610:60::30) To MN2PR04MB6176.namprd04.prod.outlook.com
(2603:10b6:208:e3::13)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-Originating-IP: [2604:6000:b407:7f00:246a:b67a:c107:307]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: a9d4d89f-ec87-4d40-73ab-08d84af3abcd
X-MS-TrafficTypeDiagnostic: MN2PR04MB6079:
X-Microsoft-Antispam-PRVS: <MN2PR04MB60790835E5A00878706EEBA7D8520 AT MN2PR04MB6079 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:4125;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: btAAW1cg/7tTjS8ddKfWNANjY1ilxIvENViyaSlV9Q2JCtkdW84e/yRkrEck/JfrUzuEu0Bn+1lctu/H/aTWdJpqAt0PRoLvUduzUJTEd8VQYXyw3b+4oT3o8xiP7qT37FyHK4+ayUxbBHjSu5wWy/MhcO7/aJqhyEWzstwaeUCkcpHDHrZ/E4WMx9qlItjcS5lu37JlHXloUBgJVwR2eN9nWCcb6Mx1Ql3JEUltaIsbrqdDegTgwOwzgbd46wJlhpnZYFDGHbHzV36SGRjxsFI80W2PyutUz3Yt89sJo9J3N96S6Ei/MsbPXB2j2u30RIU8gfoRp1QC2vQnf4sMAfQaIb52IRfpspNigO26/2K7BriRb7Go6ySqOdGzMKZn
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE;
SFS:(4636009)(376002)(366004)(346002)(39860400002)(396003)(136003)(956004)(5660300002)(8676002)(83380400001)(16576012)(31696002)(478600001)(2616005)(31686004)(52116002)(66476007)(75432002)(66946007)(186003)(53546011)(86362001)(36756003)(316002)(786003)(66556008)(6486002)(8936002)(2906002)(43740500002);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: q6YCBftLACOHMrUFz0RC1TJrMmwAFeR5V9Z6agvoQ6wDy6lbgsnGN3KEQBL4l3eow5+5dx5gkowMi+uQSunj1hRUVRePTlxLlLOKacdcuW7GQhyY402eeDAWMiiFYH8bULWNFcP43PPvsU2J+KWbdI0MYd6mv+a3zJYX75Tr4DzHmN7JMQR8a15SZbSGWAVjSvYOEOBYAnwhNa9TqnfGEHu+Wuq15qRKk9W5QGYeQfEcZqkpnMllIk/1sLCf7OYgAT6la1uLs4fsS0bwBgqCJVvgERDkxfHhQSz5CAj5BlKg8EBpsd8sfhAhAgO+iU74FruIcwHteamHzo/0jY5sKNdl7GKWTQQazNZGECx33d3UZFoK8o0l1c2E2G7BpCJmGRWKqfjca6WsnpndbNxShHqpZH+YxbOzCDQ+2r3QgC38t/OdYO9oSzJW3boMA9zoAGBGVZVnwPajIWhuq8UcPYWuVRrsxq7nvxd/tL12SLR0N7WBnt5aWKJEe3SZdkuaqbvGX+oMeVQ5KQxCtWAz5j2TrxemFBvXadq+Mevqmm1414ULYdwkgaCW+p1ztcYijnlUUuO7tofi2FY1POrsV9HXKZc0zJRbwF7XHcG6smRgmOyY1EiRPcsAL4j/mIe4K+grkYn+Bzbem2yuN2RSVgujtDFvhKxJcHWOAtskCDz7E9Uh+w3KAhe0pogQpzeztLgrcAdpPJ+5cSeh+ITugg==
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: a9d4d89f-ec87-4d40-73ab-08d84af3abcd
X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2020 01:42:49.5480 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 3V1VFHqBozv+C04uVbKwLTW7ODiZMTWtOMsi1RbFovCLGBEYbnrd4gZAQRd920l3D31+h/tI1sWiOIjTJXp8Gg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB6079
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL,
MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_ILLEGAL_IP, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 8/27/2020 8:17 AM, Kristian Ivarsson via Cygwin wrote:
> Hi Corinna
> 
>>> Dear cygwin folks
>>>
>>> It seems like there's a limit of the number of possible child
>>> processes defined to 256 with 'NPROCS' in //winsup/cygwin/child_info.h
>>> used in 'cprocs' in //winsup/cygwin/sigproc.cc
>>>
>>> 256 is quite few possible children in an enterprise environment and
>>> perhaps the limit should be limited by the physical resources or
>> possibly Windows ?
>>
>> The info has to be kept available in the process itself so we need this
>> array of NPROCS * sizeof (pinfo).
>>
>> Of course, there's no reason to use a static array, the code could just as
>> well use a dynamically allocated array or a linked list.  It's just not
>> the way it is right now and would need a patch or rewrite.
>>
>> As for the static array, sizeof pinfo is 64, so the current size of the
>> array is just 16K.  We could easily bump it to 64K with NPROCS raised to
>> 1024 for the next Cygwin release, at least on 64 bit.
>> I don't think we should raise this limit for 32 bit Cygwin, which is kind
>> of EOL anyway, given the massive restrictions.
> 
> I don't know the exact purpose of this and how the cprocs is used, but I'd
> prefer something totally dynamic 7 days out of 7 or otherwise another limit
> would just bite you in the ass some other day instead ;-)
> 
> A linked list could be used if you wanna optimize (dynamic) memory usage but
> an (amortized) array would probably provide faster linear search but I guess
> simplicity of the code and external functionality is the most important
> demands for this choice

Any change here (aside from just increasing NPROCS) would have to be done with 
care to avoid a performance hit.  I looked at the history of changes to 
sigproc.cc, and I found commit 4ce15a49 in 2001 in which a static array 
something like cprocs was replaced by a dynamically allocated buffer in order to 
save DLL space.  This was reverted 3 days later (commit e2ea684e) because of 
performance issues.

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019