[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v2 4/5] x86/mwait-idle: enable interrupts before C1 on Xeons
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 25 Jan 2022 13:43:17 +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=8ONJ70hCXD8kypWhi8Wak21xcfjf5HAl0rY91zoG3lc=; b=HB81HDCAGqyUAqTHrh/XA80jS0utGjePisi4i9XuG6sYR/ZvnXh8bIzWUzvItCJ3vpJjM/VaDt4I8whtRt9BIs+eeuRGO8kaX6ADRPw1TflUdQTRMHag0GlDlyoH0Qr7XgjMQ9MXxCTDE5vLiZpOfY4lChrH2BrE9IVpIm4VSglFGLX3ED0Q0/0rO7lvbAu+yMlbvE5sdvL4/UgEq41U6clrjoRiGcpAWjsLqIM0yfBn2KhtJKWpABpCtnJ/o1i14vkCvRawWerE8Zk1FCaEm7IvK65H/GxhMt9auSSp0uVwlRotP5n9Bq4yiGlgDa3Hu6gnX26GKWE7ydr01IQFLw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GsL3zbHjTj9icTmlHNaodeDKfr8K37WsR8K1o5a8eLo3buVzd7X+2lcbH8QRZwwKLMNpwweowRAdJ95sLdSPpmsrSHR5EMWItYrGcSKWuTujVMvkQCLPOX6UcOTWw0uXnm9wXgFE2PcM/N7UDactsM5cY5NPu7xWJEEM9EwHxucLHlv3vh7noTjSUHqNp+3S1VAFAQYBccrZEVf/KlYzjCy8UoZ75v0GcjLAbJ+gEwghfrwunGx9ZDWmJ5iJ5cCb41V+lI181hcjTRo3fFrJQjZW+neP6DRckPVAPm/GD4ZW5DSqM/Vw6iGH7yLRmDdlFoddaFAXnZuA+wGhXI33dw==
- Authentication-results: esa5.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: Tue, 25 Jan 2022 12:43:39 +0000
- Ironport-data: A9a23:Q2/5m6vvxnDlpO9XHnyglh34DOfnVLBZMUV32f8akzHdYApBsoF/q tZmKTjTPP/cMTTxc48iPY6//EtTu5aHyoNnG1dvryk8EXsR+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHdJZS5LwbZj2NYx24XhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpljaSBcwkwb5T3vNs4SUZ3DBFhZLxpweqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DJoQQt2sm1TjEJf0nXYrCU+PB4towMDIY2JoXQquAP JRxhTxHPBHqQCd2EUwsEZMfntmOvCbfTzphkQfAzUYwyzeKl1EguFT3C/LKfvSaSMMTmVyXz krW8mK8DhwEOdi3zTue7mnqluLJhTn8Wo8ZCPu/7PECqF+Zy3EXCRYWfUCmuvT/gUm7M++zM GRNpHBo9/JrshX2EJ+tBHVUvUJooDYkY+tqHfRr0Tqp9Y/OvCmGNnddXxF4PYlOWNANeRQm0 VqAntXMDDNpsaGIRX/1yop4vQ9eK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juRYTzra3GeKjM2YqbQQ/ Gnl7R6TnebCD4qR/X+IkNAc/nIptXNmp6jSRkaByQ/4A3LqT+z8rb1HzWRwx9bClp0sPsf2F mAtza8yrSosvm9xBOZ/2jP765OkN+k7tdYHsSDhuUcNz2poAe1Y4ZKXaGEoVkO0aySwWdvtO OJjwYrPsx15X+UVmapoSH10w2l6zoq42+K8y7QvVLT5ejCAB4qActIgoxUNjHD7VA7gd162K VXm0qEqpt+F3r77WXAzumNcysvulu/oHIkn+JWpWdYS5EiZLhYqpFa1F9JEa0HADnx5OkcYa dT5fnnlbVrmG6hHjLkVjEF+q3oYp1zJGbIfqE6gL3U79AM90oJi3fxx6Qk7wE9HdwGOt55Dt //Q9ZVfYd1P7grhJJGdZQ8qPSMexnwqDL3QSqvyAfcZeo600ykke+C3Fxy3pDtRKA1
- Ironport-sdr: C/pgaRfZhxHCUyJV9Ki4DAHK9U8AbTiaRGq7Xkibn+J72cwsLY/5ZWxkbwv0mpsT1fazQMJBtw cFec4GONjCIBBCeG4iUc5aHvGxzP5Wpxi/E+GXMqtdjZ5c/KuNP64OQFjwjcY/YYt9gni0HHmT J22hJLvKVW0F6X9z+gVcTh3j/Jem5vzSe8OtIb8ssKGycO6MFarL1xF1G4XZ91AfZLZ6zt8qdV dd1fkHUQVJShWT1DNpXdKVfSvk6FbuMf2t592IhOZs0vgyZQZ9PA0apu9qXjIcShEV2AXRyBHf OzQYRkrX+vE1Fm72HiKQKiT4
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Jan 24, 2022 at 03:44:53PM +0100, Jan Beulich wrote:
> On 20.01.2022 16:52, Roger Pau Monné wrote:
> > On Thu, Jan 20, 2022 at 03:04:39PM +0100, Jan Beulich wrote:
> >> From: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
> >> Unlike Linux we want to disable IRQs again after MWAITing, as
> >> subsequently invoked functions assume so.
> >
> > I'm also wondering whether there could be interrupts that rely on some
> > of the housekeeping that's done when returning from mwait. I guess
> > it's unlikely for an interrupt handler to have anything to do with the
> > TSC not having been restored.
>
> Actually this is a good point you make: We don't want to enable
> IRQs when cstate_restore_tsc() is not a no-op, or else we might
> confuse the time rendezvous. (I thought that I would remember
> TSC to stop only in deeper C-states, but maybe I'm mixing this up
> with the APIC timer.)
There's a comment in time.c that mentions the TSC only stopping in
'deep C states'. Also note that in that case the rendezvous function
already updates the TSC, so I'm not sure whether calling it with an
out of date TSC would be harmful - it will be updated anyway to match
the master TSC.
Might be safer to disable interrupts unconditionally on CPUs that
don't have a non-stop TSC just to be on the safe side.
Thanks, Roger.
|