[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Use of newer locking primitives...
- To: Paul Durrant <xadimgnik@xxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Martin Harvey <martin.harvey@xxxxxxxxxx>
- Date: Tue, 30 Aug 2022 12:00:50 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- 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=+I4FZXKh4YgvaikDu4V5hQmJD6Yc55SbPKH1PQzWbz0=; b=hniNoCJQIFO5MCS0Xcw3W4j5URp3yZADl3oCvkMHqwFRMPnQ9Awzq2SCxpkF8KpSkIRJWf7TRT62nNIqAtEiBrrSR42h5uJqs/2WkphjGTWvTTaauehmNbG+AMc2SyPwg8cpZZGBoQzU5plB5KNV3adkRC37rXifSUHmWYjR/s7T8R5RQI3HfEyouzQt5IZTp9kSZSuPkNvDkCQliBWp61Wj3UW525Dqhi/tqw5VCdv1egSiaNrFn2Jgvt53WsbQ3Zt7XPRh3HOx4weW0Beli4MVk/3TtPJSSIjWbt7bhWJeVAJKJt7OXUPu/w/gunnvGxcC3B0Qb1sEzQlJ8mrH0Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MmftRhyDMMGD8C6YoO3ZOUBRNFT4DH4HOL24uhe6n87Owkz3/IytRIH3Ad2tdJBM+Fckz5V4YPkYiTWqVqRiXCyLB1qaIvp2W8GgiXEWgqa6kyaZGjH22wdXHcI4cGLEq3AaWNdjiJ0Ve9XXp4KKRr3M5XF7tmFKoeyxH1K0V569wpT6gRsw3uLsyzV7VvCQOfjZWM7NgU3Vt+SmYe1gKTKCQ4DWfJ3awjF9uoPrOFKlEHfFFjt2vbqwpG+brx9QsoMuAscbw6ccYM0V1T/BXGmwQoie7cYepheZP0XlGnpr+aUu7y+FE1z/39xsrDb5mL0WgDMw9tAPqDFR9Xrhtw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Delivery-date: Tue, 30 Aug 2022 12:01:04 +0000
- Ironport-data: A9a23:LLrPBK4tqe0vXyfQ00Ig3wxR2vbMJeamayYv2z7Jzl8q3hzsZEP+nkxmKEPf8Hef3zy27J1ACkIEyQy1kr1dnnTDx0xjDv+LcbH3q/f4j0SAuhIWJIdH7s7gamLLC8wTp/TFPo1Kd85gIQ0CTcEe/sAPYkbYd6gfoHWu1ZeRD5Mbqz2o85SDQfbGC10IlF4hnL/2cOwilYHshtBBrDLDLmmiFGYluwIRRqRkness3qMKm/BVHoJehKdu8//ZXueQpxkfbpfSQSiux9o0E3tqOJzft6MlOO75hiJcY8daKAJO24XhM+eMmtfbG5fEEk15h+Zwcb79NFHrlVD+vSumk5DwZXic7gnkvnQfF9FbUScYumyn5T6IPU2xKiuOUs+ZmC9IulQGQDFk2eB74pEsRTfudY4uf9ANiyw7UNo3pMXOR8hkb66J0qRSRiv4TQDwbAytFLlzzakDcNkKBz48ZOF5qLLQ3prmIEXVkyqtRfKYr9pxBBhJ9imyAN5f2PD7P5ihfDU81A0sbLvYvjxctCQoFD0VtsHFIrn0qP5N92Rc8Dy6MF6c/BXd4Fzb+uNxHG2CbwtMuYrshRlJ+7to4ok9H6UwMEonHYVAXiPg8dYPzlq90lhEu/w1sWTdIP/5Os7HFS7Fql5cB8czT/4bAG98vCcR2d83IdUQBtCPk2oY3aODUB1qCmili4iBdJTJUWpegw/DYMxIVLxcpwkAS6kHcfmWAg6zGdyImR2YNG2SPhGvWoJWOqK0BUUzukf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XfwkddvokmlTiWLlpyLtyoBPKmqr8vUFyqO4r4nBR5iNrgr2Au6huQ4iiQIwI9qDhMkUH2YqNkifTJv9R53kidhoiCjDw5IT/oNaqgbDEqeYmz6QAUHNHJy5c+sQdy14MzV+QS5T3bEFgNn1QGE9hllPfQkHulua48vJMaL3K0wZrVCXgYgr6RIckUrrNVvytyQZg9EXpkmzoigNxgyiLPtHSXl68gGnHQfAl2Y5RcXZshBiJDswQrkDsy3hnOwdUrsHrzRJfIQe9UAcaiy+6xAU3W8VSmiRBbearEY60ajdCCn5608iNwWnSHdNC3AiAekfI9x/FCoVPwreku36C04eYqPV3MUT0eoFM5Z9EuYYeX64mW6drWVTkwTjhjgsuxKcvWvv4AALcfkF2sgSEVeIoubC62r4nQviUytmGto5W+kVDuU6RGh4HRLbKPJtf9ajaYHEMK87f0ZF9qh0Gl8wf6fRBN3s4AuCmPbg7Ie/vvw5Ek8km5WHzgINJYqop7F+Df9uC2Xb4oORr7kx
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Thread-index: Adi8ZD8ojTv0cYRiTIesy/wwgsnlOAAAgQyAAABev9A=
- Thread-topic: Use of newer locking primitives...
Well now you mention it, I've seen a cpl of amusing cases where
TransmitterRingPollDpc takes 4ms to complete, which leads to Tx jitter. I can
see two potential issues:
- The use of the Tx ring lock as both a lock and a queue. If we undo the "roll
our own" bit on this and use a plain lock and a plain queue, we can then use
the faster sync privitives as tested, debugged, tuned, and tweaked by Microsoft.
- We do a XenBus GntTabRevoke for every single damn fragment individually on
the Tx fast path. There are probably some ways of batching / deferring these so
as to make everything run a bit more smoothly.
MH.
-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
Paul Durrant
Sent: 30 August 2022 12:47
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: Use of newer locking primitives...
[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
unless you have verified the sender and know the content is safe.
On 30/08/2022 12:35, Martin Harvey wrote:
> Hello folks.
>
> Has anyone taken it upon themselves to try using higher performance
> locking primitives, (i.e. Queued spinlocks) in our drivers? Anyone see
> any issues where we depend on the implementation of locking
> primitives, or could we just do a “drop in” (i.e. search and replace)
> replacement?
>
We have various wrappers around locks in a lot of places so a drop-in
replacement might be doable. I did think about using in-stack queued spinlocks
at one point but the extra argument makes that a pain. Still, probably worth
doing if anyone has the time and motivation.
Paul
|