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

Re: [PATCH 2/2] xen/common: Use enhanced ASSERT_ALLOC_CONTEXT in xmalloc()


  • To: Henry Wang <Henry.Wang@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 5 May 2022 09:20:26 +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=sp07AszI1s7SokeGwBG60Tm9noCAWBn8yawQFWbTxu0=; b=NNsJp6EZNS4r8b+fXyClB+X//tQMCC0dCWUecGDpcVAKJB39i8u+X8ctdx+mdCVDRwUTXov2TxPBpxYrUo2l0Ipky9J5dgRZe+TJudKrzvqcIxqpAxbZuMSX8tlX5LAfrOLPvE4DpvqAJ53gLt+tPztFSZ+pKIuWFkDD0NqSoGR05yNc6xvC4oUf53DaS5pG/785v+NiyHFUgurs+b4B7WPElSxUqNN/PhsFVb/JdHb2EM3SURvM8ROf/ShZoqCp49VXjgl2EIROcUSxKDWFeAGoB3ykGMRyJyYNDsuSVKgSehEvnIu9LRTRJ6aXrJ1r9FxEqioiuIGKNOOwwUt8bA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eKBUMi467tJl/L01Wn0JBCcLuWvhAAL3dEWirMWh+QoJiOt1sW09JSuAdeVDEQKoa8LuhNIfNeJ/8SZL4PBzDtq1Qv33x9qw/V0vPejrAhqCd6xw7RTwqj9QFEjY+2HMTqGLHPlMpmTo6jMFY3qQi5eOzkaaKtHkQ0Nnxr/Nc2wzU56mu+VpI66zpsKLI39skvbRG0QhProyjAzBIgjMb3N+HHB1DI9UvYSNPobvpAnPuWxTnfdiUAur4vhAnoiK8LTNUN4ax4UnLl0GLbfIrZq6yDPq//NfPv6wIkGH/YYzbjz14Veyf7xf4qw0RzGHO8cPN+0Gb2zOqgccbKrndQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 05 May 2022 07:20:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.05.2022 04:54, Henry Wang wrote:
> xmalloc() will use a pool for allocation smaller than a page.
> The pool is extended only when there are no more space. At which
> point, alloc_xenheap_pages() is called to add more memory.
> 
> xmalloc() must be protected by ASSERT_ALLOC_CONTEXT. It should not
> rely on pool expanding to trigger the ASSERT_ALLOC_CONTEXT in
> alloc_xenheap_pages(). Hence, this commit moves the definition of
> ASSERT_ALLOC_CONTEXT to header and uses the ASSERT_ALLOC_CONTEXT
> to replace the original assertion in xmalloc().
> 
> Reported-by: Wei Chen <Wei.Chen@xxxxxxx>
> Suggested-by: Julien Grall <jgrall@xxxxxxxxxx>
> Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
> Change-Id: Ia463d2241e80e8a78d7dbb5b2318694d3ca5ed67

Just two formal remarks for starters: What's this last tag? And why am
I on the To: list of this patch, when ...

> ---
>  xen/common/page_alloc.c   | 7 -------
>  xen/common/xmalloc_tlsf.c | 2 +-
>  xen/include/xen/irq.h     | 7 +++++++
>  3 files changed, 8 insertions(+), 8 deletions(-)

... with this diffstat you should instead have _Cc_-ed REST maintainers?

Jan




 


Rackspace

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