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

RE: RFC Add extra sync release step for late callbacks.


  • To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Date: Fri, 29 Apr 2022 13:40:51 +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=M/Mxpl1Zo3tN+Nd54SxY6xsx+yJtp4AygYB53sP9yeU=; b=Cxu045LGXIUCUcxLX+fD+XZ3EIMYve0hTKjThfgIF4Z/203gcgkAnx6LeqsAXfypCdZ7M5PruQGskIrFMgr3UJ3Odw0qjWAUyxomAI+UhXFSmBIytHsoN8GBU5xFMx8KcBa8IW8JeLwYn0BbiGUHDsF+8gwMEz5qeWiAn5ZKhzPPDqahCJtlVY5+QfA3F1udjCA/6gvfzVm2OsUpL7ndbQixwVBwX1mHDLyseMBicNnlBtiECPkIQKR/WUcU92NeCWLhw3Ex6GaEKEncEHGspKI+mzBbUb0EsccuyTmMGFvldvRbcDDTaihpgJfRJVQKpV4PXEvBIzNehAXC7b6FRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nZqF13u2lbZDGGcf3p076v2TV1/hLsQOI7rMm5t3hy6QW8nDYrsDWxirDMReElbgPkOfbunVh3GDB5tR39qqehM54dxFuXB3LBTpdwSUNRLr+wXXuLQHRkh7eFCWlLATr7GQ48x7c5rjrvI2rp57m8R18cZwTlbquRhqlkunQloZo+vwSJko6x33E+2V/Vd7X/xoQduwGhIEKLDEdujBkn7kXL4l8KQJ8IKpO74q0JuyLj9MTi7yAbiIN59SV0hbd7Iv18SZ0E7tZrINzAp5FPlzZhhVQWlQaSnHS5E9Q+Yh1z7OKkl2hFASO8NJf5X8pzOntFWldUAS4TaQ41IMSw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Fri, 29 Apr 2022 13:41:01 +0000
  • Ironport-data: A9a23:5mJkdKkmuJUPcYlzmcuqeZHo5gzjJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xJKWmjSaP2JYTf0e9B1b4izoxgOuMDcnddjHFQ/ry0wFSMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EsLd9IR2NYy24DlWVLV4 rsenuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYZVsSLKjAsegmWRwfVAVfHf1b5e7BLi3q2SCT5xWun3rE5dxLVRhzF6tIv+F9DCdJ6 OASLy0LYlabneWqzbmnS+5qwMM+MM3sO4BZsXZlpd3bJa9+HdafHOOXtZkBg2pYasNmRJ4yY +IcYCBzbRKGYxRVJFoGIJk/gP2plj/0dDgwRFe9+vBpsjiNnVIZPL7FEv7QdtDRYMFuummUp EnA4z/rKxIFK4nKodaC2jf27gPVpgvjUZ8WPK218LhtmlL77nMSDlgOSx63rOe0jma6WslDM AoE9yw2t68w+Ue3CN7nUHWFTGWsuxcdX59aFb084QTUk67MuV/GWy4DUyJLb8EguIkuXzs22 1SVntTvQztyrLmSTnHb/bCRxd+vBRUowaY5TXdsZWM4DxPL+unfUjqnog5fLZOI
  • Ironport-hdrordr: A9a23:AReg3qFuQiOFa7X7pLqFSpHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5VoMkmsj6KdhrNhcYtKPTOW9VdASbsP0WKM+UyGJ8STzI9gPO JbAtBD4b7LfBdHZKTBkW+F+r8bqbHpnpxAx92utkuFJjsaCZ2Imj0JbjpzZXcGITWua6BYKL Osou584xawc3Ueacq2QlMfWfLYmtHNnJX6JTYbGh8O8mC1/HKVwY+/NyLd8gYVUjtJz7tn23 PCiRbF6qKqtOz+4gPA1lXU849dlLLau5t+7Y23+4sowwfX+0OVjbdaKvm/VfcO0aaSAWMR4Z vxStEbToJOAj3qDziISFDWqnTdOX4VmgPfIBmj8DXeSIXCNU0HItsEioRDfhTD7U08+Nl6za JQxmqc84FaFBXagU3GlpD1vjxR5zyJSEAZ4KcuZr1kIPkjQa4UqZZa8FJeEZ8GEi6/4Ic7EP N2BMWZ4PpNa1uVY33Qo2EqmbWXLz4ONwbDRlJHtt2e0jBQknw8x0wExNYHlnNF8J4mUZFL6+ nNL6wtnrBTSc0da757GY46MICKI32IRQiJPHOZIFzhGq1CM3XRq4Tv6LFw/+2ucIxg9upEpH yMO2koxlLau3ieffFm8Kc7gywlGl/NIwgF4vsul6RRq/n7WKfhNzGFRRQnj9agys9vd/HmZw ==
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AdhbABZj/QTUWYFgSjmTyVfnJrSFdwAofwQAAArqpOA=
  • Thread-topic: RFC Add extra sync release step for late callbacks.

Hi,

Sounds good. Some thought needed as to whether  to transition from a 
"completion count" model to a "individual state per CPU"..

Alternatively, perhaps have named states instead of the sequence #, and then 
the completion count is how many CPU's have reached that state (as opposed to 
in the previous state). The state model is nice and linear, and having a 
completion count removes the need for loops to scan thru states.

Also, if you wanted to remove the need to set boolean flags to in each of the 
processor structures (more needless loops), you can probably change that with a 
single state in the context as well.

Perhaps a "current state", "target next state", "reached target next count".

- Dpcs wait for "target next" <> "current state",
- "main" thread waits for "reached count = cpu count", and then sets "target 
next state = current state"

Will leave to your discretion. 

MH.


-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Durrant, Paul
Sent: 29 April 2022 09:21
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: RFC Add extra sync release step for late callbacks.

[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments 
unless you have verified the sender and know the content is safe.

On 28/04/2022 14:01, Martin Harvey wrote:
> This patch for RFC. I think it solves some longstanding suspend/resume 
> issues we have had.
> 

Yes, this fixes the breakage introduced by commit 9b7a47317031 ("Re-work the 
code in sync.c to provide per-CPU 'early' and 'late' callbacks...") but things 
are getting a bit messy now. At this point I think it best we have a state 
model with helper functions to transition between the states. It should be 
possible to call these from SyncWorker() as well as the main entry points and 
hence avoid some of the code duplication that already exists.

Since it's my idea, I won't ask you to do the re-work :-) I'll get a patch 
together today and post it to the list.

   Paul


 


Rackspace

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