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

Re: [PATCH] Updates to Xen hypercall preemption


  • To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
  • From: Per Bilse <Per.Bilse@xxxxxxxxxx>
  • Date: Thu, 22 Jun 2023 10:01:55 +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=IXE/YD8684+0fw2ydjJowhNGE1JxvY9C6qEH/ogslGw=; b=AZm/3OwRw/jK7IGJqq+oN1d3OyBtWCs/CZD/jLKnAfAaRYJHzNnQwQUYjJdhAetqgQx7t7dcHZHX0BSlW7SSCS8RpBLKy3PTS6P1vWlygTqJ1W3SsmQCkYRWUIUscl0kK8tnYLJbsjai1AOyZ6fPdRe8SseKpLYVOuDXij1WggU/RhtQXrEbHlxpo5DaRF/f9ArLTF9yNnCEoTTpG+VBOjnt35uF8hDI606Rz9NAEwIr6UgI56A0z5a+MeBuE0COXeGSAv9Ee6cUC9kdX0hLNeUQoJM/EBQj9TkWIAcpByGhV0BKrWZ6yNZWWynJttEk/Szgt7YnzbfZyE9Qz71A5w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPT7brvBUkvIjaaEDN8ghOW3dCwEeEBkT5F8xeYzbXCCyUfNMBL2pA2+ok+bRmm1rFkdn1MZd1eS3MnYFqDrO3V8j/Pow0WxTY6jxJI9NS5k0lFBQBhzW+zR85j3F0fvEalEBpQb1LIqNaChOUEQCs7WXgRoZpyaSIFnMREAszUMBihAUWUli0/9OYTPGXKwz0BYz1QQKU5UsxZhBmjjgMtsvJGhz/srJiwnf9AwT2ci/2GXtWSlQA1Xc4STOX3E6HinyeAkoLpSzJNbEpfdJAgzX+u34xfWQ22caGMe16IOIxz6hdbjPJIiMXlW+ufegFtTk6Tilfd3eTbluzwIcg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, "open list:X86 ENTRY CODE" <linux-kernel@xxxxxxxxxxxxxxx>, "moderated list:XEN HYPERVISOR INTERFACE" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 22 Jun 2023 10:02:15 +0000
  • Ironport-data: A9a23:gGt8Pq6I3Tke4LAlfGSpbwxRtDzHchMFZxGqfqrLsTDasY5as4F+v mMeXWqCM6mKa2L0etgjYdzgpkkG6JGGyNA3SlA5q31jHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35JwehBtC5gZlPa4R5geE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5my tkYNyESQUm/1qGU+LKDF/RmqcsSBZy+VG8fkikIITDxK98DGMqGaYOaoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OkUooj+GF3Nn9I7RmQe1tk1zej GPC5GnRCRAGLt2PjzGC9xpAg8eWxHikBNNDSuDQGvhCgF2BzzUrVjYqTgGrv+OLhU67QIttJ BlBksYphe1onKCxdfHlUgG1umysvxgSQdNcHuQ2rgaXxcL85xuFAUAHQyRHZdhgs9U5LRQ22 VuZt9foAyFzqrqTSGLb+rr8hTazPycSBXUPaS8NUU0O5NyLiIsrphvLT9tlQOi5g7XdFTjuz naKpS4lirM7ic8NyrX9/FbbjjbqrZ/MJiYltlv/XW+/6A59Iom/aOSA6UDSxeRRMIGDCFKGu RAsmceE6/sVJYqQjyHLS+IIdJmy/OqMOjDYhV9pHrEi+i6r9nrleppfiBl5IEpqKc8CdSXef F7IuQhR6ZlQO1OndaZyJYm2DqwCyanmCMSgVf3OaNdKSoZ+eRXB/yx0Y0OUmWf3nyAEgaw5f JuWb8uoJXIbErh8iiq7Qf8H1r0mzTx4wnncLa0X1Dyi2LuaIXSTGbEMNQLUavhjtfzd5gLI7 9xYKs2GjQ1FV/HzaTXW9ohVKk0WKX88Btb9rMk/mvO/HzeK0VoJU5f5qY7NsaQ+90iJvo8kJ k2AZ3I=
  • Ironport-hdrordr: A9a23:BKHo66oMXVk1sIRrIoLTymAaV5rbeYIsimQD101hICG9Evb0qy nOpoV+6faQslwssR4b9uxoVJPvfZq+z+8R3WByB8bAYOCOggLBQL2Ki7GC/9SJIUbDH4VmpM VdmsZFaOEYdmIK6voT4GODYqodKNvsytHWuQ8JpU0dMz2DaMtbnnZE4h7wKDwReOHfb6BJbq Z14KB81kOdUEVSVOuXLF8fUdPOotXa/aiWHCLvV3YcmXGzZSrD0s+ALySl
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZpFMl91hHG7ZDuUq21h7QjP0mVK+VdZEAgAAsiICAAAxVgIAA6kGA
  • Thread-topic: [PATCH] Updates to Xen hypercall preemption

On 6/21/2023 9:04 PM, Peter Zijlstra wrote:
> On Wed, Jun 21, 2023 at 07:19:21PM +0000, Per Bilse wrote:
>> On 6/21/2023 5:40 PM, Peter Zijlstra wrote:
>>> I don't understand it -- fundamentally, how can linux schedule when the
>>> guest isn't even running? Hypercall transfers control to the
>>> host/hypervisor and leaves the guest suspended.
>>
>> Hi Peter, as noted in earlier note to Andy, this is essentially existing
>> code that other commits have rendered ineffective over time.  Hence,
>> the finer details of how or why it works haven't changed since it was
>> first introduced.
> 
> That doesn't mean you don't have to explain how stuff works
Hi Peter, first of all I want to say that the vigilance and dedication
you and so many other people show for the kernel project and the
integrity of the code is highly appreciated.  It isn't so that "we"
(whomever that may be) are ignorant of that, and I have personally
enjoyed the freedoms of BSD, and later Linux, systems for longer than
I care to remember.  There is, however, a scope to every patch.

In this case we change CONFIG_PREEMPTION to CONFIG_PREEMPT in two
places; the other (quite minor) changes follow on from that, partly
to avoid a repeat in the future.  The code that is en- or disabled
by this change has already been through all the dscussion, reviews,
considerations, and gnashing of teeth that time-honoured traditions
require.  Maybe things were different at the time it was committed,
but that's nothing new -- a few years ago I was fixing IPv6 code
from the end of the last century, and it's entirely unsustainable
to repeat and rehash libraries of old discussions and code simply
because an ifdef is changed.

In all its brutality, the current state of affairs is that the kernel
has bugs that will cause it to crash or otherwise malfunction in
certain circumstances.  There is code present in the kernel that will
prevent that, but this code has become ineffective due to oversights
in commits made since the code was introduced.  We thought it was
in everybody's best interests to ensure this code was re-enabled,
that's all.  I fully support you and everybody else in your desire to
maintain the highest possible standards, and as I said to Andy wrt
his suggestion, I'll see what I can do.  In the meantime, I highly
recommend not shooting the messenger.

Best,

   -- Per


 


Rackspace

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