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

Re: Core parking broken with NR_CPUS=1


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 22 Feb 2023 16:20:50 +0000
  • 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=ry1zgO45iuqBc571aeuGCh+3uDngkmuUFg84b/u2b2s=; b=ZiuiDMiJ93OsSNvehNXEEjsLouDDFftu8mwwo0eJHV5jhRc1/DobVpdKgUsTDKddIUVN8FkXl7lU4haCUDvoA1T+GptdRKzstJNnKtHoRYytN7dR4c6W0btOd3VNOJzGDxHkS8j8D5ZmRm6/QFOody1BtOorRcW0ev07i/KFVNjc5cHygi19dQkcscwt6WKQPE2i/8KVe6hOl5vtTMIdY093HJNOzsoFFXkHSyVnFU8SoS1e1VEN0Xi16LT1vdfdLZ234bas/AWXiV1JIc+H/xFL80OlZkaSapHrU9ISSb2Dpo7sN8w49PiiJw1c2IIa0IGF8W8+SVTdfGtRAEOGKw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPMnepnX+Cx+ZQlH8ukoQBdY2I1fNyTjhwavu2J6Sw1qyO+K7F2wVAmhCFEMUr2pdfUXXqoKJ0BaucXUcWXFhaDy47z5BmNXoksoUBCc172WA38lJjWxNjHgFNL2RAAxw5/HCCgftMiBY7VDHf/ZU2z1FB/Yuqqnn4VBr2T7oZdP6E+vTl2sXp8xbqHLNsBxR8T36gtJm1bKaHMGS7yQUGbOjrtbZVSFrwjjeWlNI16OVfW7rY6jvmrftIFk/sLnMB30WUSSI/deEqLSx2bAQdOgwV0ltLzxFleJ7HNvCugaDVU81mF3/g31f1QgarlioPg5NukMhTMiLeiwaIWVvg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 22 Feb 2023 16:21:24 +0000
  • Ironport-data: A9a23:8qWVDawMMinp3KZRPo16t+fkxyrEfRIJ4+MujC+fZmUNrF6WrkVVn DdMDTzVPPiCY2Lwfd10PIqwoUwCv8OHyIdlHAVoqiAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UwHUMja4mtC5QRkP6oT5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KWNW9 adCKHM3VTaoh/uY3q6qE8l1iMt2eaEHPKtH0p1h5RfwKK98BLX8GeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvTaVkFIZPLvFabI5fvSjQ8lPk1nej WXB52njWTkRNcCFyCrD+XWp7gPKtXKrBdpJSuXhnhJsqGyunG1LByQkaWuAut6wiHS9ecNtd GVBr0LCqoB3riRHVOLVXRe1vXqFtR40QMdLHqsx7wTl4rXQyxaUAC4DVDEpQMc9qMY8SDgu1 1mIt9DkHzpitPuSU3313r2JtyG7PS8ZKnALTSABRAoBpdLkpekbnh/JC9puDqOxptn0Ai3rh SCHqjAkgLcehtJN0L+0lW0rmBqpr5nNCwsqvAPeWzv/6hsjPNL7IYu19VLc8PBMap6DSUWMt 2QFnM7Y6/0SCZaKl2qGR+Bl8KyV2stp+Qb02TZHd6TNPRz3oBZPoag4DOlCGXpU
  • Ironport-hdrordr: A9a23:XPLLIqCww3fl1crlHemo55DYdb4zR+YMi2TDgXoBLSC9E/b5qy nApp8mPHPP4gr5O0tApTnjAsa9qCjnhPtICOAqVN+ftW/d1VdAR7sN0WKN+VHd84KVzJ876U /NGZIOa+EZrDJB/KTH3DU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/02/2023 4:17 pm, Jan Beulich wrote:
> On 22.02.2023 17:04, Andrew Cooper wrote:
>> While testing the rebuilt debian unstable container, I found:
>>
>> common/core_parking.c: In function 'core_parking_remove':
>> common/core_parking.c:230:53: error: array subscript 1 is above array
>> bounds of 'unsigned int[1]' [-Werror=array-bounds]
>>   230 |         core_parking_cpunum[i] = core_parking_cpunum[i + 1];
>>       |                                  ~~~~~~~~~~~~~~~~~~~^~~~~~~
>> common/core_parking.c:31:21: note: while referencing 'core_parking_cpunum'
>>    31 | static unsigned int core_parking_cpunum[NR_CPUS] = {[0 ...
>> NR_CPUS-1] = -1};
>>       |                     ^~~~~~~~~~~~~~~~~~~
>>
>>
>> which is an legitimate complaint - this logic is simply broken with
>> NR_CPUS=1.
>>
>> In principle, I think the best fix is probably to have CORE_PARKING
>> depend on NR_CPUS > 1, except none of the interacting x86 code has been
>> written in a way that would be compatible.
>>
>> But it also occurs to me that this is the kind of thing an embedded x86
>> usecase would want to compile.  Frankly, its niche even on regular x86
>> use-cases.
>>
>> Except having looked at the code, it's a different to the other thing we
>> call core parking which is the smt=0 logic to keep the stacks valid for
>> cores/threads we don't want to use, because of #MC broadcast problems -
>> and this logic does need to stay.
>>
>> Thoughts?
> See "core-parking: fix build with gcc12 and NR_CPUS=1" sent back in September
> last year.

I'd clearly missed that thread, but the final part seems to have agreed
on a NR_CPUS check, with you saying that you'd send a v2 "in a minute".

~Andrew



 


Rackspace

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