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

Re: [PATCH v2 3/3] xen/sched: fix cpu hotplug


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 Aug 2022 14:27:07 +0200
  • 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=Ri7srvcfFaLIkvSc3BfmGZtcsqYBhgWWRtcMM8QMR4M=; b=LtHGkBw5XseRBsYC7/aeoTW0Qv3gBk3rQQ20r5izR7o5hUqR1VuoAUNOJHq89oT8Ep5GW+tpHEs60KJ7Agg/NfeEe4jyGIrJwbklKT2j9YE4w2YiNiHWJuhDXiL9KmrgPYRV/TBcQINvaNZGAteWhnaZ0yJmjrD/B9YgqAuO6PF6ygUdQ/N7EWItvefDASBfGq10q8jXhWrgR0QKsXdcDaV1Q1g3FshMVriyC37/prHmLrs27x5D6YCQlbTsnyae0nARTuxOznY4idHfDubv6e7rPSspNNAKbAAXAaPY8UsPD5EWZRMel4dEQKF0FEC5hIxkkd1UbYePp9pxBJwUGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WoGh6z9YfeNr4QRkn3azunn4Nn4skxlK2NlbaoI/UIC87et8f3xgOeu2MyL4qmlj13uZVQIBO1W5mb7OuCc9nrBxNvO9I7v8g3qCpOR8YeXS7G4nhbE8ZHMHq7+aCYnQOGs19eQuLQTZCWv9/VbE1dVLtzyE+W8V9xbxibLOjTpP5R5XSG8WjW42K8YvCZYcclqzBOddR2P4l3YOy/JYMaiViC4pcMUb0Tu602jEdDxxnbH69qfxpiGCAtYjNH9V105ksXmUbjn45KvxgRPHt83LJNjprJyCt1LqqdsOnntGkmHBagmeNelMjX2sfbAcpjPdC53iadG5UbskYI6Egg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Gao Ruifeng <ruifeng.gao@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 15 Aug 2022 12:27:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.08.2022 13:04, Juergen Gross wrote:
> Cpu cpu unplugging is calling schedule_cpu_rm() via stop_machine_run()
> with interrupts disabled, thus any memory allocation or freeing must
> be avoided.
> 
> Since commit 5047cd1d5dea ("xen/common: Use enhanced
> ASSERT_ALLOC_CONTEXT in xmalloc()") this restriction is being enforced
> via an assertion, which will now fail.
> 
> Before that commit cpu unplugging in normal configurations was working
> just by chance as only the cpu performing schedule_cpu_rm() was doing
> active work. With core scheduling enabled, however, failures could
> result from memory allocations not being properly propagated to other
> cpus' TLBs.
> 
> Fix this mess by allocating needed memory before entering
> stop_machine_run() and freeing any memory only after having finished
> stop_machine_run().
> 
> Fixes: 1ec410112cdd ("xen/sched: support differing granularity in 
> schedule_cpu_[add/rm]()")
> Reported-by: Gao Ruifeng <ruifeng.gao@xxxxxxxxx>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

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