From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3/5] xen: RCU/x86/ARM: discount CPUs that were idle when grace period started. Date: Mon, 14 Aug 2017 18:21:59 +0200 Message-ID: <1502727719.5719.41.camel@citrix.com> References: <20170814103927.GA68284@deinos.phlegethon.org> <1502717079.5719.39.camel@citrix.com> <20170814135440.GB68284@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8420282146818597036==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhI87-0000AU-20 for xen-devel@lists.xenproject.org; Mon, 14 Aug 2017 16:22:15 +0000 In-Reply-To: <20170814135440.GB68284@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Tim Deegan Cc: xen-devel@lists.xenproject.org, Julien Grall , Stefano Stabellini , Jan Beulich , Andrew Cooper List-Id: xen-devel@lists.xenproject.org --===============8420282146818597036== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-JhrQVk1RiNYDnI8fNyZp" --=-JhrQVk1RiNYDnI8fNyZp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2017-08-14 at 14:54 +0100, Tim Deegan wrote: > At 15:24 +0200 on 14 Aug (1502724279), Dario Faggioli wrote: > > About the former... I'm not sure which check of rcp->cur you're > > referring to. I think it's the one in rcu_check_quiescent_state(), > > but > > then, I'm not sure where to actually put the barrier... >=20 > I mean whatever one causes the CPU to DTRT about the new grace > period. > AFAICT that's the one in __rcu_pending().=C2=A0=C2=A0The important thing = is > that > that read mustn't be allowed to happen before the write to the > idle_cpumask. > Interestingly enough, someone seems to have had a very similar discussion before: https://lkml.org/lkml/2005/12/8/155 > =C2=A0=C2=A0I'd be inclined to put the barrier right after the > cpumask_set_cpu() in rcu_idle_enter(). >=20 And with conclusions similar to these: :-) https://lkml.org/lkml/2005/12/8/308 I've no idea why they then didn't put an actual barrier in place. This thread mention s390's ordering, as at the time, this mechanism was only in used there, but they've not added one when making things general. IAC, I'm fine putting down one. :-) Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-JhrQVk1RiNYDnI8fNyZp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZkc4oAAoJEBZCeImluHPunbsQAOc5S9F0a5Uv36GNBtSDfEaa Aae2AmZXHOF2yVPIZ7XcasjpbPevfbaCkDboudwjTTr653IezQ46uOLGpA2wKsEx JrGjwWDr0tJD0Bb1nj1U3TF/ITZU1GqfZe/VkzJGbPOFqXYwnEDm8ZW2G0dqtS4n Z/k61G/vzD3xz2UVamTakvTh45/6JSsDUntvNyGuUMjwidJLZzsEsrFAPbX1ZGxj 9Ed0zgUx1imTXBbGZmwte7PYWO4z+p8x4Y+278z2lp/D9D5SRlsJtpdNmZl7egQn G8emho2ktliKefGb0L1pnN1Mi1TFbCoIV53QUIosnxmQhuDk3DotLTz5kVoeCf3R P6fGqpRWqhmBtMX92S20rejQeYAOH2dOBt+/2TrGzkqXOj12PsB4CBD9ahBKuLq6 Si5BPjRbBX4//cj5/Sg2ntUB44dlUuvFAmqlYKp6ZmUjHHnMQYn2oC7gJEKOsjxY An93nf/FvKXOfMilyEvQ1aKNbg6eOjiPLvsIUlER7b/ykJEE3sF7mqBTR2daMHc9 xNmucldLYGs6M/ElAMv3CZXiV6ga4326dL9zcbeMxy7ql8+XINlE5tU/DDpa44UN JMoGdZwuE3S6eHMcsanhSZo4Zwdsvm4y9/I0buZAcs++HOzPLwtizD4UKaq9Mws2 s6TRm0qEf34/FEnEzKvd =/+de -----END PGP SIGNATURE----- --=-JhrQVk1RiNYDnI8fNyZp-- --===============8420282146818597036== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8420282146818597036==--