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

Re: [PATCH] xen: fix for_each_cpu when NR_CPUS=1


  • To: Dario Faggioli <dfaggioli@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 11 Mar 2021 17:29:30 +0100
  • 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-SenderADCheck; bh=7ldEafCVFZbmjJ0KDRx6tD8FfKkQZCByBg8+UiYZVbY=; b=MyI/3rxlnhLo0JCnl1wiHHs74a4ZQBXbWUotqNsPX4vW3Ly/kJpgKDgjn01S6N8mPrb8AH0vJBNGnRGAtspX63+3BDPA1CgKVwqJnpOgDExbrpcmpMILCVt6wqxKM/K5ARNiL4Cqis+XQWHXj8VxyVgPmG3929et/b9ilF+JItobbqTQ+FO988XP7MS199gyLjqN6n+Cq1nNCwbl2Tw2QH3iLOfFmek9zIKhR8BPRG1Vo2zje6TUkEngomxrWn5EthubDc653EeUHB2g6D9wti1Q9oTNaQP+RtQ1tCk/JYP/yjlLUf6pLrzCMKK3I/HE7N1q70RpmmBqHQhBJF3/ZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C5uRLxMBq/ilq4k/ErNlN9b+HK5cB+kC4WK+S6EhtecBRXnxc2WzF07KORZae4m6jpCT9G4j1J34cFJbzdblmN4ns76xXfSC0zS43Y+JoaRC1OGHKljcf9GAUjn2axkx4JeVqdUfaf1jY/e+y44icZJDYkMts9GeDbnNkSdYefhg4mBMUDYj9fnIprldeDmkB/a5q0EVKHY2PIVax75clYPGUVahOaSmPE9dRsDf0Zmdt5rPwbOQJNxDCoo/pu46kCSCn50sGpuj/XQlI5xQC3BYgir4Lq1xhkzRhZaNmSA810Ero6EF3lftk0ejbMj7E7JB272TUiUa5h2Pz2FJow==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 11 Mar 2021 16:30:15 +0000
  • Ironport-hdrordr: A9a23:e/rDgqrOh19NVVg6bWNMOjYaV5v5L9V00zAX/kB9WHVpW+SFis Gjm+ka3xfoiDAXHEotg8yEJbPoex7h3LR+iLNwAZ6JWg76tGy0aLxz9IeK+UyFJwTS1M54kZ 1hfa93FcHqATFB5/rSzQGkH78br+Wv37uvgY7loUtFaSFPR+Ve4xxiCgCde3cGITVuIZYiDp KT6o5milObCBcqR/+2DHUEQOTPzuej/P7bSCULGgI97022hS6ogYSQLzGjwhwcXzlTqI1Sk1 TtrgqR3MSemsD+8DDw/Sv575NamNzuo+EzefCku4wuBRjHziqtbIRlcbWesD4yu/HH0idXrP D85y0OEu42x3TNfnykgRaF4Xie7B8er0XM5HXdoXz/rdf3TDg3YvAx+75xQ1/ixGcL+PRfuZ g7uF6xht5sIj7r2BnZ3ZzuUSpnk0KlyEBS6tI7vjhkfqY1LINKoZd3xjIyLL4wWBjUxaoAC+ dUAMTV9J9tACmnRkGchGVpzdC2N05DZyuucwwHssyR5TBcgGp0+Use3NAehXcN7vsGOuF529 g=
  • Ironport-sdr: z+N+NGt3BpVnJFWIh1F0EkkhW4vw3sxGEZmGPtRMZpQk4UmFP/eaHI7y4GJh3A4pEQdrrHmKpa qe8zZxqMFN5501yUHghHouYiK8Y1npBtHRtoVwf61VLOxpxgK3AOxj1ccURQWztBz+5YAfYHXz /OeYa1UpJMRSD8HctUk9upwH3Pjf+eamVwKQwAjNYGERBDVf/vJAnNFM/NzpuuM+kMF/OO9tVn edmeDU2dnZeaLB19Wc6+ZLV0CTaCawAhWSBzRaO4z8kqTvXrow6j3sUQkrIDzkOXlrDeT/qP7P 0gs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Mar 11, 2021 at 05:21:16PM +0100, Dario Faggioli wrote:
> On Thu, 2021-03-11 at 12:28 +0100, Jan Beulich wrote:
> > On 11.03.2021 10:40, Dario Faggioli wrote:
> > > 
> > > Removing the special casing of NR_CPUS == 1 makes things work again.
> > > 
> > > Signed-off-by: Dario Faggioli <dfaggioli@xxxxxxxx>
> > 
> > Doesn't this want a Reported-by: Roger?
> > 
> It definitely does! And I even forgot to Cc him... Sorry Roger :-(

No problem! Thanks for sending the patch.

> Will you add it, or do you want me to resubmit with it?
> 
> > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> > 
> Thanks
> 
> > And FTR I don't really mind the other NR_CPUS == 1 piece of logic to
> > remain there.
> > 
> Ok. I agree with Juergen that they're totally useless, but at least
> they're not wrong.
> 
> Oh, BTW, since you mentioned in your other email the fact that this
> comes from Linux, I've had a look there and there's a comment in their
> cpumask.h file, under the NR_CPUS==1 define, looking like this:
> 
> /* Uniprocessor.  Assume all masks are "1". */
> 
> https://elixir.bootlin.com/linux/latest/source/include/linux/cpumask.h#L149
> 
> Of course, that does not make the fact that for_each_cpu and
> for_each_cpu_not are identical less weird, and the whole thing still
> does not make sense, at least not to me.
> 
> I'm wondering whether or not it is worth to report this to them too, as
> I have the impression that they just don't care.

I would report it, worse case they will just ignore, but it would be
nice to get it fixed there also, so that someone else doesn't have to
discover the same brokenness.

Roger.



 


Rackspace

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