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

Re: [PATCH RFC v2 5/5] x86/mwait-idle: squash stats update when not actually entering C-state


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 20 Jan 2022 17:00:52 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=KCOzx3Q42NLL6YhcYCShH92PjaeweN6rFj0ZfG+Yixw=; b=S+uKRyf6VMkLXBoR7X+gbf7jDt3RU6mgcVoTdcR7TfZUZwjkPvfcu+G0QrVANtWoIZsyEDkX/iUlcadtDbET8W3//GnNd6Eaj9UAWdSAitdCEuPU08oX4o1+6+bgPY5pe1PHKZTEHjvM4sVV79u51Vdcqe8uuJFgtifEr0Xauid55Omzn2YJCJU7mau3YWxpOFK9kZJYSqDmeFP5F2qk+HQkKr474gAHpOS13GSp7QLIbPkyT1pgsXE/v6Tei6BI/S0Px5Jr4/gelY0KNiabzvjezRVLN9GxCDjDFoMrTLuNIQOLojAnUFZrJuvx4E7KTxye0ap8qpOoyXgUopUmFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EbP2SkeFafZQsN6on8+wHreW14MawwC3ajup+5SMU96kBdPKMNl8H9iY4zVVy9VyuEHgHu5VKnjF+JkGZLnqlYUrhZKoNSME+ttaP2r4MU1mXXRYUDAx1EMxdQXHOhmFHz+lpjMEbJLzXzAaVyp8AMu2qKxAim/IXxu9OIaO72/zCix7Wb2EDLCnowKzXTQ/f+SEcm/99i5U0PLjelICGmWCkiP/RvlzMvJ677eOcOSMXfPOFcnvEJj6MBw4GYaeNLM9bTMucfRMVJI6EatQIsiNRuCBQREJVrvc47D9V0cxAoSLEKRLzMwjEkl2MFtC9iTOmWf3ZPoHsi2yVCZLJA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 20 Jan 2022 16:01:17 +0000
  • Ironport-data: A9a23:DtwmVqLeQAGYMOoLFE+ROZIlxSXFcZb7ZxGr2PjKsXjdYENS3zMAn TQbCG/QOa3camOkf4wjYInk80lSsZbSm9ZgSVFlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUakideSc+EH170Us5w7Zj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2Rrfwvx thkhKftE0AvMIvLwP5HUElxRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsF2gcsuNo/zNZ43sXB81zDJS/0hRPgvRo2Uv4MBhmlp2aiiG97QW PYjdzRWRSiDQDFPPE47V7A1hMCn0yyXnzpw9wvO+PtfD3Lo5BN1+KjgNpzSYNPibdVYmAOUq 3zL+0z9AwoGL5qPxDyd6HWui+TT2yThV+o6Fre16/pri1273XEIBVsdUl7TnBWiohfgAZQFc RVSo3dw6/hpnKC2cjXjdwWKjCCKszctYIcKVOs0zgbV0PDXsy/MUwDoUQV9QNAhscY3Qxkj2 VmIg87lCFRTjVGFdZ6O3uzK9G3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2jU0dNT2CA5sQkDuRYTzrdHGeKjM2YabQQ/ Gnl7Z6TnebCDwqR/X+IkNAc/nIptXNmp6jSRkaByQ/4A3LqT+z8rb1HzWRwx9bClp0sP0f2F mAtza8yrSosvm9xBOZ/2jP765OkN+k7tdYHsSDhuUcNz2poAe1Y4ZKXaGEoVkO0aqSwWdvtO OJjwYrPsx15X+UVmapoSH10w2l6zoq42+K8y7uvVLT5ejCAB4qActIgoxUNjHD7VA7gd162K VXm0qEqpt+F3r77WvAzumNcysvulu/oHIkn+JWpWdYS5EiZLhYqpFa1F9JEa0HADnx5OkcYa VT5fnnlbdrmG6hHjDkVjEF+q3uYp1zJGbKfqE6gL3a79AM90oJjXfxx6Qk7wM9HdwGOtx5Dt //Q9RVfYd1P7orhJJGdZY8qPSMex/wqDL3QRSvyAfcZeg600ykke+E3Fxy3pDvRKA1
  • Ironport-sdr: uKPX6JlmlQmI4aAnwWy/zP2cyjwfEIg/95vS6vKyDVoNH/CsyZQfpQQkbSAEYNpLOdAiGt0ab4 uYFXu87cK7Ah+tJj+MNmE1wU+UC6FEs/NqxczqN4TpM7aQS2VRKjImLFWtQsgtZERmg8wk/MJW 6umP3jPoejP4bZ7nLkgQsBnckvZNR0qvKPbFReK9ZURg0HJMZqjRX+4WA3b3wFmPQ7RQ6eo/EE uU7TQ4Tsw1t3gRHRLESpmZw9R/SOZPGCFf8AO5B1cBj1GX8KLkNtF33BKlsJ15h4bHJ20TLm7h ngGoYec9t5KppJQBW7NnPige
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jan 20, 2022 at 03:05:12PM +0100, Jan Beulich wrote:
> While we don't want to skip calling update_idle_stats(), arrange for it
> to not increment the overall time spent in the state we didn't really
> enter.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> RFC: Arguably more of what follows could be moved into the if() -
>      thoughts?

I would move at least the restoring of the TSC, but I would be fine
with moving everything up to local_irq_enable unless I'm missing
something.

I think you could likely also avoid the call to update_idle_stats so
there's no need to fetch the new tick count.

Thanks, Roger.



 


Rackspace

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