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

Re: sched=null vwfi=native and call_rcu()


  • To: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • From: Dario Faggioli <dfaggioli@xxxxxxxx>
  • Date: Fri, 14 Jan 2022 18:42:06 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=SXAiKZrxUwHYDgc+8CtOmUZsCUkL+4OdmdmE7Pw3DKU=; b=PQhrmNLzrpB2/OumGrz4aE0weSXBvvwZDQelwzSUAS1/fMHd1Z4FfijcNefYDYHeDObvtWd2G+om5Rh/fNNN0QoxNy60gXsw0b3ay+tRl0/HsH/FG1IrWl1mLJvEZ7Pq7EbzJ2V2TbBQQ6YfHgpGF+grc6FjNsE51lz+6nmkVsGiV+aV2YDa8J5Ba40Sr++M2EUOUegM6/3Tm250A2OIckRXLRkr05tkTEoAFZj0A6V+s5/PRMBNhnHyokZNmvyuMzjhkLiV9n/sfNs/Au5iI8l/5Zbl69DqLNhv4kDrRfKkk2oAdmah8w7zFj6ZXriYzZAqTiddttlNyHCkyo38bg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qkts9igTcr5kvNKmGQxWkvK3fqmMr8Y3QwiHjmPk6epAvIuGMel9uYYC6zY1T8sXidCqRaEF8jAvLn8CNivZQzcRpQLc/Icmvvv8Mofcfypm/VWB3mcpyiGaHCkFnI3Ilg9uQaeeJW1Hn9hI3uoClYsrkbhnnmzsvRNcUqqq4ml+iaic+yenQMaVRIwedaxu7cBq53A3Q2UHnN3ZPGQgwnLSkfe0wwyJK8ie/zgh9kS1C+qB9iy7rx6mgYRakkkHyLVMktXGN8HHA7PxyC6vV/emApKkv/0co0z2cYSzTwVg3apnwusnyaV/ezoBKlshgIDCeGSpmeygfEyBkUWAHg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>, Juergen Gross <JGross@xxxxxxxx>, "bertrand.marquis@xxxxxxx" <bertrand.marquis@xxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 14 Jan 2022 18:42:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYApYKuS+jUHjGSkKX+nXJsixuaaxVueAAgAETSYCADBqFgA==
  • Thread-topic: sched=null vwfi=native and call_rcu()

On Thu, 2022-01-06 at 17:52 -0800, Stefano Stabellini wrote:
> On Thu, 6 Jan 2022, Julien Grall wrote:
> > 
> > This issue and solution were discussed numerous time on the ML. In
> > short, we
> > want to tell the RCU that CPU running in guest context are always
> > quiesced.
> > For more details, you can read the previous thread (which also
> > contains a link
> > to the one before):
> > 
> > https://lore.kernel.org/xen-devel/fe3dd9f0-b035-01fe-3e01-ddf065f182ab@xxxxxxxxx/
> 
> Thanks Julien for the pointer!
> 
> Dario, I forward-ported your three patches to staging:
> https://gitlab.com/xen-project/people/sstabellini/xen/-/tree/rcu-quiet
> 
Hi Stefano!

I definitely would like to see the end of this issue, so thanks a lot
for your interest and your help with the patches.

> I can confirm that they fix the bug. Note that I had to add a small
> change on top to remove the ASSERT at the beginning of
> rcu_quiet_enter:
> https://gitlab.com/xen-project/people/sstabellini/xen/-/commit/6fc02b90814d3fe630715e353d16f397a5b280f9
> 
Yeah, that should be fine.

> Would you be up for submitting them for upstreaming? I would prefer
> if
> you send out the patches because I cannot claim to understand them
> completely (except for the one doing renaming :-P )
> 
Haha! So, I am up for properly submitting, but there's one problem. As
you've probably got, the idea here is to use transitions toward the
guest and inside the hypervisor as RCU quiescence and "activation"
points.

Now, on ARM, that just meant calling rcu_quiet_exit() in
enter_hypervisor_from_guest() and calling rcu_quiet_enter() in
leave_hypervisor_to_guest(). Nice and easy, and even myself --and I'm
definitely not an ARM person-- cloud understand it (although with some
help from Julien) and put the patches together.

However, the problem is really arch independent and, despite not
surfacing equally frequently, it affects x86 as well. And for x86 the
situation is by far not equally nice, when it comes to identifying all
the places from where to call rcu_quiet_{enter,exit}().

And finding out where to put them, among the various functions that we
have in the various entry.S variants is where I stopped. The plan was
to get back to it, but as shamefully as it sounds, I could not do that
yet.

So, if anyone wants to help with this, handing over suggestions for
potential good spots, that would help a lot.

Alternatively, we can submit the series as ARM-only... But I fear that
the x86 side of things would then be easily forgotten. :-(

Thanks again and Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part


 


Rackspace

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