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

Re: [PATCH 18/36] Alloc: introduce page_list_for_each_reverse


  • To: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Mar 2022 08:35:23 +0100
  • 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=y3DPOzJfYnLuN2CUMbsCLzEVa402hEMBDzE2WeKXS48=; b=Kbm+8pvMN9+Fmul8hYFZabyUW7v0g/nc+vgiNiXWfEK691nBb2j5e/AAM0wXSOW+gpQKNwztgkGBjmiOxfvnWzSOSZu1vRT1hsVMpd9qdKISX7+sCbxp3bkE3XjvadDS181pcgjdUoiaA5mycwSmHvQ3QUF3ZC+eMD9l2LFkRkdqJTT0SIafwrbL9dVc/dD/mgCy6GmWZ270m20yApPMIy5weFNoQhOCxlVNpdYxj48Y4/rqTNcqk4P4n4jukOh4fEjlb4DBruXf20WPFaR5+paSX/eNxnxKVsb3iGE/JvkA4UGd9KZvA7T6kVQqUosbf4X3o6PwqitsakyzZNJ9ew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S8gphM8vYDazEKsgkWwJd8/4wV8MTiA/jm0s751M7CJj8uwzvNdZM4v2KN96zV067l2BrW6Ab2tjI2q2+uo866w5ExITcXxVg9ySrMch3xQYf3ZuvS5hzSwxOfG2MqWfUBh1SsARvdZbsbd33Yt7msW6J8MYQMOXVq6pymbS2k0v3DG+nx2c1SeGZpu5cyVMOojl88WOfZ0vm50pW/U+hoc2qjtvM0jw0100UNQKME6CsJDMpFhQ923OPaCyrPQIO5HUejrppPNmInlxugTa82PXaG0gJ/WMdA0lAniqp5UDOp4i5MFm6FhgYpb/6qSihE522hJiOBM1/1D82dwLJw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marco Solieri <marco.solieri@xxxxxxxxxx>, Andrea Bastoni <andrea.bastoni@xxxxxxxxxxxxxxx>, Luca Miccio <lucmiccio@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Mar 2022 07:35:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.03.2022 18:46, Marco Solieri wrote:
> --- a/xen/include/xen/mm.h
> +++ b/xen/include/xen/mm.h
> @@ -488,6 +488,8 @@ page_list_splice(struct page_list_head *list, struct 
> page_list_head *head)
>      list_for_each_entry_safe(pos, tmp, head, list)
>  # define page_list_for_each_safe_reverse(pos, tmp, head) \
>      list_for_each_entry_safe_reverse(pos, tmp, head, list)
> +# define page_list_for_each_reverse(pos, head) \
> +    list_for_each_entry_reverse(pos, head, list)
>  #endif

There are two sets of macros (for there being two flavors of lists),
and hence - even if you need only one form on Arm - the other form
should be introduced right away. I also think it would be far better
to merge this into the patch actually first needing the new
construct, as only then it'll be able to judge whether none of the
existing constructs would be a reasonable fit.

Jan




 


Rackspace

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