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

Re: [PATCH] Replace usage of schedYield with KeStallExecutionProcessor


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Durrant <xadimgnik@xxxxxxxxx>
  • Date: Fri, 16 Sep 2022 07:58:06 -0700
  • Delivery-date: Fri, 16 Sep 2022 14:58:13 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 08/09/2022 09:26, Rachel Yan wrote:
From: Rachel Yan <Rachel.Yan@xxxxxxxxxx>

ETW trace Transmitter DPC times show improvement of up to twice the speed

Signed-off by: Rachel Yan <rachel.yan@xxxxxxxxxx>
---
  src/xenbus/gnttab.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xenbus/gnttab.c b/src/xenbus/gnttab.c
index 33373c2..392f43d 100644
--- a/src/xenbus/gnttab.c
+++ b/src/xenbus/gnttab.c
@@ -529,7 +529,7 @@ GnttabRevokeForeignAccess(
          if (InterlockedCompareExchange16(flags, New, Old) == Old)
              break;
- SchedYield();
+        KeStallExecutionProcessor(10);

Why 10, as opposed to some other random number? Surely just doing _mm_pause() would be simpler and have the same effect?

Also, can you please put the driver name in the subject line? I normally modify the .gitconfig in the repo to do this... In this case I can see from the name of the file which driver is being targetted, but that's not always the case. (And XENBUS doesn't have a 'Transmitter' so I think you really need more explanation in the commit comment too).

  Paul

      }
status = STATUS_UNSUCCESSFUL;




 


Rackspace

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