DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4B2JwlLp1986406
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4B2JwlLp1986406
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Md0J261y
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C86933858403
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1733169525;
	bh=OHk9402K4xL5iLPpq0mZQgLDS+lkbhT78mk1rlOWmEk=;
	h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
	 List-Help:List-Subscribe:From:Reply-To:From;
	b=Md0J261yBX2IxGa0zugo5EHaGye8RfrL8z8qPjpKS6mr5+EsOZOWMRHr5P8VwMJxK
	 zD5KXleStmgfs/Lw9D6BChCs98aSnMukAIo5fw5MOTv/ZLoTR2gzR2CH+dx+vPMyfR
	 OtdA2A759NqefTQokpPRSqM528DJxX9pmn8yCh20=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A48E3858D34
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A48E3858D34
ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1733169449; cv=pass;
 b=lXFHdnEHQ8Cyk+8e8Mj1QaTuCFiU5M91NUj+zt/moAEjmUUphDuzUE92Jf9Zn8wgC6tLwU28qaXFQBu2ER7i9H1et7KIBEDA05Wx1m8e9mOvDIZInI5G+6f3BLTVSXMwkVqyYfGtnPPQls4PsjZ7aP8xw/JDnyHYkGq0JJqAoCM=
ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key;
 t=1733169449; c=relaxed/simple;
 bh=NAopG5RoWOhV0VKBU6ky0f65oizpyy8ydvrRNgIHbb0=;
 h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;
 b=w3+RJVypefUGSPAfsIpOTaojTSLXXq/st3uWtRllQnub/Tw8wOOBSj03bbWobwD86oFIK3xgfJ9zr34vJ0iMLUll6AGA9hDaPrRnh9OCYye9x3YEYQwD24UgeHE6Ix44eShYwuQAiGlPPlZRv6O0pp3hq7S9bZy7H3CDDmTybIM=
ARC-Authentication-Results: i=2; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A48E3858D34
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=L5wHZgeEFgrYIUZgpu02Pdf6tE+TGmt/Or9FE2BYPspiNRITT3cLGVOeCAoTrS9a1a0MxBnWCGtlKxvo8qsq0wZ07Lvw3ykWYU5as4N5B1w7FFQk1ryWEdDUrXJix78VDFhXUmqLGA6UdhQCpyEoOgwsQTD7/Q2Ri4PdSaffOL7CsEbq1CynRHlbzRoA7NZ4uWw+skTjCgbngX0dAkVpLnIl77Kv5a51YroaDg+0/dNdhCeAfxoHYynOe1CxSNB3TiAVXjmN75FdjwKTJEeqFZIOupGRwsAXnozdkx+7hgkU9OdBMeJfpKqZvZSloayoiRMaXIpUV3oTxIzmqDQ+xg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector10001;
 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=NAopG5RoWOhV0VKBU6ky0f65oizpyy8ydvrRNgIHbb0=;
 b=DSz+e3ZKHUiXPxr3U+MqxeisCYaP5r5Wy1/QUR5upjnwllU3Yg1MJZEpnvm5j6+D72KF0RcAJx12C7q9EcrL0S42Jgf4UvLWL/v0yCH8eKppJtJJreQdf1r0UL6MmXsTaDPpTlPlppeijqKy25bYForuUS1z2KBL2lSpkoyCsU0ismfrptVGnosVJFaOIZeU5SRWwV70GX1lMuNugFng34EJdddcNgtt2MoLqzydYoZ7YauPKY3trkX9wbZuzf5S2VpMnTQwPskdktjcRuXW1KUoDJmf+yFywsGiZsRv0QsFRWsl68/VRT5GZKrEoUg4M3EEnJs2pB10C20mDwtt6Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Calling GetConsoleProcessList in tight loop allocates new buffer via
 condrv ioctl results in excessive page-faults with Windows Terminal
Thread-Topic: Calling GetConsoleProcessList in tight loop allocates new buffer
 via condrv ioctl results in excessive page-faults with Windows
 Terminal
Thread-Index: AQHbRPMcd9qU498ldEyUKLvAgrLCng==
Date: Mon, 2 Dec 2024 19:57:25 +0000
Message-ID: <PH7PR11MB64522B9A097A9A5D963E5C23A4352@PH7PR11MB6452.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
msip_labels: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR11MB6452:EE_|BL4PR11MB8822:EE_
x-ms-office365-filtering-correlation-id: e1d53e39-b792-41e0-b3bd-08dd130b8ade
x-microsoft-antispam: BCL:0;
 ARA:14566002|19110799003|8062599003|15030799003|8060799006|461199028|15080799006|10035399004|3412199025|4302099013|440099028|102099032|1602099012;
x-microsoft-antispam-message-info: =?iso-8859-1?Q?qsAnXVHiow6qJb5qF06itLCkQjkw95gyefTEUvf+hHSKoqHWVdisdkkkA8?=
 =?iso-8859-1?Q?9Q/eYMjGPll8omUH99VrwykE+PunLYO9L88Iz4TzKK1ChCLay130Wk9GP/?=
 =?iso-8859-1?Q?vVGfBVwULFmUTgMgJJ+D04Wm3RNDwhJAINoUJIepkZYxskeEFnE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?Q?yB6d+HCXlgxLSrC+gW1/M5TVNVb8+gO6BzFFrb6ZLBU0hO/IC4vgeW0EtM?=
 =?iso-8859-1?Q?xofyvCWReoDwTh84OHW+nkmFh9/RB0l8uCil/i3lx3goLAueSGAMFgZiI1?=
 =?iso-8859-1?Q?mykkzgO/HOOBAssJ6yDuq4n48U9KP+m9rPfPO6FCOW0V98mhqkIGxNpAah?=
 =?iso-8859-1?Q?BC6zkDHjUG1GwQ=3D=3D?=
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?TFvQS2xe42jfAcaQmS9jRby6hwHKgj1FEb97GZe/7uvq2XVZVbPkgJIVZH?=
 =?iso-8859-1?Q?rZv//e3M4e1COTKgwnbYK2GdKKILCqDaXTnLQLz1XxHByiZ2JxGoU/aJzV?=
 =?iso-8859-1?Q?MEaeffyouE6Nqe6jkvHEA7+xunUezqe2WySOEoRI2mUewPpF/xM98u82N+?=
 =?iso-8859-1?Q?w4XjBz/5JcOAnZMcV5vQoty3FKU3RUf1ocP33HfmSaKTmuK0JSnfBtKIhc?=
 =?iso-8859-1?Q?v34WrgHQU8fKbNTg4TFec0x+NX0zX57A1/JcDxpVKbRNKV3hjfPnvepULR?=
 =?iso-8859-1?Q?QxjVWOgdXKF0u5zzxB4Z4h72WpQWK4lR1RjTkbJUSmucgvwxn75/s0Pcr+?=
 =?iso-8859-1?Q?93S8oYtpP0D6rCLIR915zLEa8I3XwJ289PhrfyypyzYNeVg9VNPGYNmpUY?=
 =?iso-8859-1?Q?z9rPlOAMfIFuAeuVXyzOHIqFMnlMQsXrXpwJxVqCDX/kfBU7W23MqjQ2mB?=
 =?iso-8859-1?Q?nUMm8G/ram06K1ZhNa7xOaDVXu9HIql1Ibp/QyyGD2h6nDSv+kIUo4hkhw?=
 =?iso-8859-1?Q?6lvhuGGFp5fGHqOuwvyOD2S2VFh7+aVYBetfiPU/ONhswD2V/ZOSZC3cS0?=
 =?iso-8859-1?Q?eju7RGoLa9JHqdb9Z5VIA5N0ZjFts2KKG5IznwOIBTRQ9PO0jAPyXWLKGO?=
 =?iso-8859-1?Q?kA9cLEqNnH7TM+WFh/R8vIk3+B3HTb+Rv9Jf+MGMO7w85RCZW96eap8i+Z?=
 =?iso-8859-1?Q?SDFhyqmPKe0/lU5+noQsVYKY2XPkGDZ8HHRJpA+kW0fNcE7Sb1++4cfMa+?=
 =?iso-8859-1?Q?t4XwGqZMzKAwkytfGLRjF6uGMFcICWG9AFWChMcsw57CyyaxB7A0mlngxc?=
 =?iso-8859-1?Q?xXqzsjF6qVfkiZ5OAp6opSexs/2f2NqiOJ+sP7SmNV1m9vMmnNcuBmwjez?=
 =?iso-8859-1?Q?U8hk9/2lN+FUfZYwJ/PdotvkXwWXT5Y7ZKGoMwptRxsG3DMQ+4MNvvqHfn?=
 =?iso-8859-1?Q?ZZ8izpDprN9O/DXG0oNOOzK8C6Ak12gH4egtr2lm9gYOAiWR24nGkoFvlQ?=
 =?iso-8859-1?Q?YGLtEEkUAyu4+w/hl3QUuQrM58zds4Hx3dzoDcoZ9EjG93BWD/fZBDrUTe?=
 =?iso-8859-1?Q?/uJ9lZIAQ3abVD47IIoMaip9WjMbuOT9Z6/Sj/gLOo9xt2sW+RBSIn5SQU?=
 =?iso-8859-1?Q?Tqii5iDXPO7frl++IianJZjFsT1+5fDV6cG/AwTGtxG6iYqsMFzhdEh3bA?=
 =?iso-8859-1?Q?SCwUnQUouXQtM2tHWakEsCuh1aED8pchIEFvB7Ry88qJVydqScjdtcDvcn?=
 =?iso-8859-1?Q?NuZd8DV9lYKkG9koF/SkG6d9M05uKLs4EHNe+7+OU=3D?=
MIME-Version: 1.0
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6452.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: e1d53e39-b792-41e0-b3bd-08dd130b8ade
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2024 19:57:25.1336 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL4PR11MB8822
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Steven Buehler via Cygwin <cygwin@cygwin.com>
Reply-To: Steven Buehler <buehlersj@outlook.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

Hello,

I am experiencing an abnormal number of page-faults per second (averaging 800 to over 2000) when using Cygwin within the Windows Terminal app. This produces visible stutters and cursor movement during terminal screen redraws.

I have opened an issue on the Windows Terminal GitHub issues page. The initial investigation by one of the Windows Terminal developers has determined that "Cygwin is calling console APIs in its steady state. It looks like it's calling GetConsoleProcessList in a tight loop, which results in the allocation of a new buffer that is returned to their process via condrv's ioctl interface. I don't think there's anything we can do about that, other than stopping them from doing so."

Following this response, I am attempting to bring this issue to the Cygwin developer team's awareness for a possible resolution. Please see https://github.com/microsoft/terminal/issues/18264 for a detailed discussion and accompanying video demonstration of the page-fault counter.

Thanks,
Steven

-- 
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
