[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] xen/arm: Skip loops in init_pdx() when no PDX compression is used
- To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Mon, 14 Jul 2025 09:37:14 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=bAQve6ucj1tk0cDSsciK/KnWsvdAxmV8s5w7EhzdirE=; b=Cx/JiNwrvD8WQM37lDevWXf4XqSfibcMGJDPRxxu/OR2AQMXYBvCoth6rvveSBU4N0E6rKzeohPuSEPM1mkfXu+cvXH+bqzx1+DhVPYhiCCAOOFocZip+vWCLLLY1R5zkI5rvutbkl+JB8JYxCVda56dp+jUfy5poRFF9XKEDxGln1wJnvyd+sk4Mjp6APe9Iu9zGp5c9j/gkjk5F0QdtkryZ09WTpTnOjJZ6kwvwToVmFjNbWpqH/171jEquV7LimDVm1MzAcCjLMht/J5IHkzJjUyhE1SmSufRP9o2ZPOPODWPHZkiiTJlC6lpBnsqx9iKSbLil7AykUsOZZ9hyA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jvYpzPfRy32R4T8TNT40geyrafiGwYhWPk4hTkY7PeXT3J6wGtoCuiXJU4Q4Gu++yaaMRXqISvNJZIFXWwPHxiKuuqTVVF44BOuFPyDpk92P/yjfjLBUeKWw1ta+ifBGa+7RUN3TvV3wejVEzygx2xmo7N+KRhugWkmEuV+uAv3d0kluFSssZeVBaIPHvBCrxnWqnS0mCFSYkBuy/ONpe7puC/qpimNRtQI00ObI159POyfbawq+DecYJeQ2/V5YR54bgCUiDALjzwfSzNMT6OBK2L3CrRB2m2r3LQWFtepjpLxqCqiI3UbdCve3NBmVfynz1kDCCwKpjfynKu6dEQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 14 Jul 2025 07:37:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/07/2025 12:29, Julien Grall wrote:
> Hi Michal,
>
> On 04/07/2025 08:54, Michal Orzel wrote:
>> When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and
>> pfn_pdx_hole_setup() are just stubs doing nothing. It does not make
>> sense to keep the two loops iterating over all the memory banks.
>
> I saw this was already committed. But I have a question. Wouldn't the
> compiler be able to optimize and remove the loops? Asking because we are
> trying to limit the number of #ifdef in the code hence why we have stubs.
Before submitting a patch I did disassembled init_pdx() with and without my
patch and in the latter case the compiler did not optimize out the loops.
~Michal
|