From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] support for accessing CPU/core count (processor-count) Date: Mon, 11 Oct 2021 10:20:46 +0200 Message-ID: References: <87h7dpgues.fsf@omarpolo.com> <871r4tgp9o.fsf@omarpolo.com> <87o87xf5ag.fsf@omarpolo.com> <8735p8ensy.fsf@omarpolo.com> <8735p8d1lc.fsf@omarpolo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20330"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Campbell Barton , emacs-devel@gnu.org To: Omar Polo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 11 10:23:02 2021 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 1mZqaJ-00050I-U6 for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Oct 2021 10:23:00 +0200 Original-Received: from localhost ([::1]:38236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZqaI-000310-3Q for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Oct 2021 04:22:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZqYQ-0000os-Am for emacs-devel@gnu.org; Mon, 11 Oct 2021 04:21:02 -0400 Original-Received: from mail-oln040092072062.outbound.protection.outlook.com ([40.92.72.62]:55808 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZqYI-0005vK-IS for emacs-devel@gnu.org; Mon, 11 Oct 2021 04:21:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7vZk/reL3lKgh89S7aJaFVaSUtnex4UDTUXF/IBYJjG3sPZoiTvLLiN9j4tDXfBa703IgZNn+x1q6G0pDjHX2qvKGyHa8+EqXbE8idf3r8sEm1lhMs4GUj1T/mea2rweLbIUIwF9rJ3voB13adABtjAgglsj0XM+4zbVETyIoLbpXlCq9u5KPGkzqrlbGDvqxOXQpV1Rfcv8k9MfQQJ43jDvwGyPEWaCkldvba4wYeDix/9ISaFGDyWxyuzqxXXpbD+UnImgvsKzE/zgO+ObKLC8glPY3MJ94F5OE4em1z+9uHQQohotLpMZ/aCkI8NYz6RhV31KHQ07QK0kgGPqQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rcZ866vV4pdmEKbPWeh+25yBsiYBH/WMSdjiEfzTHDE=; b=KfkGEdxHsk9eZOC6reoN7THWjcvHLVew1IjgUiqiMy3QR1461P9HasBkWBDYlobJ9KeZrCWOcWovrOW3C85Fa7faC0xu4X4MZQBOhca5l0NzkZpvWBlLeKjDULjkfXDL4K2BBodxt5+QVsZfbzwNvzwcDdPO05R7hizAivGWAJ3iEm18LI53nNkSTygtAkT9VAIOHH6k0fvJU5MmO+/NdXHm/V40RpyljnRCDPZgQSAvV/wo9nPwR3LFV4edXqCDzNS4gJpGuX+D5qxPfpL5NzSKQP0CQ8HFMkq86xNM+/Hfk7TXFhiNW3nF1sr/46LUm4TSEDYiE36MNniEGj2tRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rcZ866vV4pdmEKbPWeh+25yBsiYBH/WMSdjiEfzTHDE=; b=V+cX+n0lpaA9EBv5aAjxIlYSFavJUb8vSkocfn1gbq8PrpKlaPPGT3hqYOkTj90V/ZP4XQCUsmjunNRMcAGIvmaiL+jzBBi8GOXoO+WTcivjk6bM+FduEUD9LyxiGyW7+/oh43fXjXpYrqivI72aN178TNc07R1EgLPHgtwSk6k4Gc5y3Os5Q6Tewy/XLCc6ImU0bMJ6YJd4zpO2Yz3BrLgymO2wRmqlTryeUncSLnC7WffzAPYdUsdK5u4EIu0pF5yAsxmg0EEN/DTRDyqXTyAnasj2wlmZveabSvdOB9izf6t2shRYzu7e8Z5jVl+zuqMSWsjQv4PA/8qaJv/09Q== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM4PR0902MB1683.eurprd09.prod.outlook.com (2603:10a6:200:96::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Mon, 11 Oct 2021 08:20:48 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c05b:e2ca:5b8a:56d2]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c05b:e2ca:5b8a:56d2%9]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 08:20:48 +0000 In-Reply-To: <8735p8d1lc.fsf@omarpolo.com> (Omar Polo's message of "Sun, 10 Oct 2021 23:04:53 +0200") X-TMN: [Ms+P03ZfoF68FEzGGENi3Ne6NIzJojzs] X-ClientProxiedBy: HE1P195CA0004.EURP195.PROD.OUTLOOK.COM (2603:10a6:3:fd::14) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <875yu4j7kx.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by HE1P195CA0004.EURP195.PROD.OUTLOOK.COM (2603:10a6:3:fd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Mon, 11 Oct 2021 08:20:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26acff21-a546-41b6-869a-08d98c900774 X-MS-TrafficTypeDiagnostic: AM4PR0902MB1683: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cDlsCZ/bd9g/NgX+ebKyo/SDVR1zlsoApMl4XScOzX77RJqnDTbIBUQoeWqhtyCMqwfpSSXCwLmUJdosIz5/wCU1BrTOxPqL0lnWGoOtHtsGT04KhbKWnmcCLer7NKl/JG67eGgGrzg448ngsmZbWe2rSgHqbGQ6LKDN2CnJluR7l+Vlp0uarPsYLBgUMjXjrcoO7jFhXQiAY1r5E+JYxmMNJLs0wFHQ8vYBCUWNhg05Ohm7gO4YXBb9PB6F7ycI+au4aJjywymxJLWOpAJfKJ50aA/R4/CfLrQnFwH8It2ocCN4djCRX8oEK+HPM5tcUIvekG+KIL1rGSxHR66SmkFL601kfK7NcCpwj4aAR73k9G3laoZ72Iw7M3gy0nooPMbx3mPTPYRJGn8GmTpLtzKIYD9tijz2OLk1Zu4NfV97UMoCYTj5yxQns0pczXeN X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ajnkNPOn0mabM2RDfYDmfUvp7q93RjAke3Ev+wub0A4XDXHjQ3iyyvmk+qmwhbd2P1tJoC1GNx63vUPOcRgZ0Af2e6601HzZJvkjGPQ9EaU9ko7qoh5Q/s2dkNtNx0dCKi16n+KBtetnfImEHZjo7Q== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 26acff21-a546-41b6-869a-08d98c900774 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 08:20:48.1366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0902MB1683 Received-SPF: pass client-ip=40.92.72.62; envelope-from=arthur.miller@live.com; helo=EUR03-VE1-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:276730 Archived-At: Omar Polo writes: > But I'd like to add a small correction to your example. The sysctl is > not correct on OpenBSD (and maybe NetBSD too? I can't check.) It > should read > > (shell-command-to-string "sysctl -n hw.ncpuonline || sysctl -n hw.ncp") There you have a patch! Check the function 'comp-effective-async-max-jobs' in comp.el, line 3881. Fix the bsd-case in cond-statement and give Andrea a patch, so he does not have to bother :).