From: Julien Grall <julien@xen.org>
To: Henry Wang <Henry.Wang@arm.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Wei Liu <wl@xen.org>,
Wei Chen <wei.chen@arm.com>, Julien Grall <jgrall@amazon.com>
Subject: Re: [PATCH v3 2/2] xen/common: Use enhanced ASSERT_ALLOC_CONTEXT in xmalloc()
Date: Sun, 15 May 2022 12:40:45 +0100 [thread overview]
Message-ID: <5c0e81f1-fac4-f14f-f4a1-2a00f6d16f47@xen.org> (raw)
In-Reply-To: <20220507025434.1063710-3-Henry.Wang@arm.com>
Hi,
On 07/05/2022 03:54, Henry Wang wrote:
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index e866e0d864..ea59cd1a4a 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -162,13 +162,6 @@
> static char __initdata opt_badpage[100] = "";
> string_param("badpage", opt_badpage);
>
> -/*
> - * Heap allocations may need TLB flushes which may require IRQs to be
> - * enabled (except when only 1 PCPU is online).
> - */
> -#define ASSERT_ALLOC_CONTEXT() \
> - ASSERT(!in_irq() && (local_irq_is_enabled() || num_online_cpus() <= 1))
> -
FYI, the patch introducing ASSERT_ALLOC_CONTEXT() has been reverted. I
intend to re-introduce it once your previous patch and the one fixing
the ITS (not yet formally sent) have been committed.
I have also checked that none of the ASSERTs() would be triggered on my
x86 setup. So:
Tested-by: Julien Grall <jgrall@amazon.com>
Acked-by: Julien Grall <jgrall@amazon.com>
On a side note (no action expected for you), I noticed that the
ASSERT()s would only trigger from CPU2 and onwards at least for Arm.
This is because num_online_cpus() would still be 1 when bringing-up CPU1.
I went through the original discussion and I am not sure why we switched
from < SYS_STATE_smp_boot to num_online_cpus() (aside that Arm doesn't
set it). Aynway, this is not a major issue here as this is an ASSERT().
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2022-05-15 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 2:54 [PATCH v3 0/2] Adjustment after introducing ASSERT_ALLOC_CONTEXT Henry Wang
2022-05-07 2:54 ` [PATCH v3 1/2] xen/arm: Defer request_irq on secondary CPUs after local_irq_enable Henry Wang
2022-05-15 10:58 ` Julien Grall
2022-05-16 17:07 ` Julien Grall
2022-05-07 2:54 ` [PATCH v3 2/2] xen/common: Use enhanced ASSERT_ALLOC_CONTEXT in xmalloc() Henry Wang
2022-05-15 11:40 ` Julien Grall [this message]
2022-05-24 1:53 ` Henry Wang
2022-06-08 9:42 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c0e81f1-fac4-f14f-f4a1-2a00f6d16f47@xen.org \
--to=julien@xen.org \
--cc=Henry.Wang@arm.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgrall@amazon.com \
--cc=sstabellini@kernel.org \
--cc=wei.chen@arm.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.