[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v2] Limit the amount of work done for each Receiver DPC


  • To: Martin Harvey <martin.harvey@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Owen Smith <owen.smith@xxxxxxxxxx>
  • From: Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Date: Mon, 6 Jun 2022 12:00:04 +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=V4mRuDONUAtfWwuNXYuZrEmhjSZ/D/jtDie5x95u3yk=; b=HFLiRK/12ewvSJaLCfZQc2GtfpiPQsN1ap0QhbFY/M14yggb0WVnVYoX6VOSoC8cr3qMWj4qQKDmxavFdHehBG8qT/niIHZbA7yZcYXhAx3s1SVz3ZR/s9JCjdU5wJe1nllh2rhQgK474qJEGNsjlYA2IlcLcJVBpv2Ha87/1L/S3DhcATQoSB/8nGI4G+Gvc7Zn3y+OXqH3W9UXjCX0o1foIJ/6NIgQxmmN9vKCS+cThRowA2dIyvEcJTDWk3ZMj9au8gbUcD3UmgDLaDicCs/9+CKlQuJmq2PxfGx6VVKqx7awjTIMNeqGjXevHQgRj2MP84V2r486kXnHPiSgwg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkZks+5elQCm28jhKyzBqyNnRXd61ddRLGHv4anAnrQN60udm3VerU9t/BVGfuBC43R/YKqxnJ1VaSwDNmj6a9qU32Z9oyWt9rIJp3oXuWG/RxC4T+aRzBW4IcUVUp7lSXXRS8O8tDC6tDOvCB6I23GRYVYw5vJyliXTu/CKGNE/8+bEg2bqLXVPI2MkkWFmiP7umoewR0cu7b3cCafjnBZYx+yg7+c+ts9kDrSzboC6XXw7mb1v1LB9elApRm+Fd7SxAXYyiAMmH5iIbvhji5D64TKQKYo8QnniftRIR07RACuGRoRyl1jTWodarT3JPodwbF+lelDVStxOkgqB9w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 06 Jun 2022 12:00:28 +0000
  • Ironport-data: A9a23:G0t0uK9l88tdPJYLaQGxDrUD7H+TJUtcMsCJ2f8bNWPcYEJGY0x3n zMbCzrQaf/cZzCgfIwnPdiy8xgDu5WGx9VnTQZrqCE8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ44f5fs7Rh2NQw34DkW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnb3vU0AtF6/TpPwyfiVELH59YKJd/6CSdBBTseTLp6HHW13F5qw0SWsQbcgf8OsxBnxS/ /sFLjxLdgqEm++93LO8TK9rm9gnK87oeogYvxmMzxmAVapgHc+FHviMvIEJtNszrpkm8fL2Y sMDdTtpKhTJeQNCK38cCY4knffujX76G9FdgA3P9PFuvDaOpOB3+InVEeLVWvvWfOUWwRmEr 0jfxkKoPR5PYbRzzhLAqBpAnNTnhSrmXKoCGbv+8eRl6HWMx2pWEANTWValrP2Rjk+lR8kZO 0ES4jApr6U56AqsVNaVYvGjiHuNvxpZUdwAFeQ/sVuJ0vCNvVffAXUYRDlcbtBgrNUxWTEhy l6OmZXuGCBrt7qWD3ma8994sA+PBMTcFkdaDQdscOfPy4C5/unfUjqnog5fLZOI
  • Ironport-hdrordr: A9a23:3Ohsmqo97xI2oEWQKJeNimsaV5uAL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6Ku90KnpewK+yXcH2/hqAV7EZniqhILIFvAp0WKG+VHd8kLFh4lgPM tbEpSWTeeAdWSS7vyKrDVQcexQpuVvmZrA7Yix854ud3ASV0gK1XYaNu/vKDwTeOAwP+tdKH Pz3Kp6jgvlXU5SQtWwB3EDUeSGjcbMjojabRkPAANiwBWSjBuzgYSKXSSw71M7aXdi0L0i+W /Kn0jS/aO4qcy2zRfayiv684lWot380dFObfb8y/T9aw+cyjpAVr4RGYFqjwpF5d1HL2xa1O Ukli1QfPibLUmhOV1d7yGdnTUImwxelkMKgWXo/UcL5/aJCw7SQvAx+r5xY1/X7VEts8p717 8O12WFt4BPBReFhyjl4cPUPisa33ZcjEBS5tL7tUYvJ7f2qYUh3rA37QdQCtMNDSj64IcoHK 1nC9zd/u9fdRefY2rCtmdizdSwVjBrdy32CXQqq4iQyXxbjXp5x0wXyIgWmWoB7os0T91B6/ 7fOqplmblSRosdbL57Bu0GXcyrY1a9CS7kISaXOxDqBasHM3XCp9r+56g0/vijfNgSwJ47iP 36ISdlXK4JCjfT4OG1rex2G0r2MRuAtBzWu7Fjzok8vKHgT7z2NiDGQEwykqKb0ociPvE=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHYdnXhM853CaX5dkS4JamzRTB2U607/02AgAYxeUCAABtgAA==
  • Thread-topic: [PATCH v2] Limit the amount of work done for each Receiver DPC

+    if (!IsListEmpty(&Ring->PacketComplete)) {
+        // Re-run for the remainder from the back of DPC queue.
+        Ring->BackPressured = TRUE;
+        if (KeInsertQueueDpc(&Ring->QueueDpc, NULL, NULL))
+            Ring->QueueDpcs++;
+    } else {
+        Ring->BackPressured = FALSE;
+
+        // PollDpc is zeroed before final flush, don't queue it here.
+        if (!Ring->Flush && KeInsertQueueDpc(&Ring->PollDpc, NULL, NULL))
+            Ring->PollDpcs++;
+    }
 }

Additionally, there's a problem here in your rewrite. We only want to queue the 
PollDpc when we go from the backpressured to the non-backpressured state. Doing 
this in the low load case will run the entire PollDpc rx path continuously, 
which is definitely a mistake.

MH.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.