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

RE: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 7 Sep 2022 10:45:34 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=MVS6KWJ3EQcyzPz7EYIqtfvTRq7OQDT6ANZPuue9gFA=; b=ZiMMTZUFGIVSWZSoPsLysOS8OHfS5HRlivLXGnINuPxMJxvKikLMxKQii6LXbb6pgNYk0toJCw5lJQ3XZR9IaMnZA2iueRCtUp2G6Dj9tpod/EzkfmQXfVny8+IiqVvqP3FAh2VHzqyOtBlsm9MoyK9BnFzD0MzhmuLVCd5ozpu8ML6hzNrUSYA6iNTzYZleWxJi7/EFuCmgZnJB5+91JQ3FSKLiTkByUZ2jRtsFe4EjrurRvNzKhOd3sLgGZdE82mohknF4EvSc6k4B8BwL+6+puCdTuWNjsWpSKPCRb+HYx4g7RuNrofU9t755IpK5YtX4nVnK5X4B+q+9G9Zd3Q==
  • 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=MVS6KWJ3EQcyzPz7EYIqtfvTRq7OQDT6ANZPuue9gFA=; b=RSioXe5rd4nNsmcBLDozeTxw7iI7MLEckWID5Z5hFbEkWBW0x9+kkyzTSS0DGX2gPOmKfTCI6BR48iOPsa5OOYAQtbUeNcVvRyV2UCLZdtgFTGggLXeIOVFhwOzqEyJGEnv+DYrZXAn762XJvCcJLoRAZhlTvTW7U/yvceDugVfOWjZJmaVoG1+BoMHqLGXz17b49ZCkQSYg0pQE8KPoBV+S/o+/XKrkTTGxIgdYQ0feR30b5YhI1qvdtiwZPwx+PaD/M0bXurPGlb7DT0TA0miQsD3HgbX/RZ2hB4s1mTtCBLX4wVrLru9HqDmq905oyi8jjt0yJ6N6Ee4YwR473Q==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LyXtsKQJZSQhf6Glz4n4fQf6uTUwODkKg46zip9+jSM7tAGDutJblS9V5hwXZd2dYNHXMDMBSeMJ8tGBdjkGM9MhGe6Td8nul0kKu0sYcrMhblKMrQXVgRJnI0vv7lKSApRzR3lSki5BrNQUPfsE+QiHWscWbxNm6EzxG52756wAKlt2Q5RZZx4vtdGUa6GXxMvswWL2Zy6FJq9AYzBnsEeSZd4RQFhal4G45mFOovI74D4SDpaFPwJaKKD2pQAQ9itHPgrhJa889jDE3z6evwzMyVgAYzCBfT2KWoA944xAkq8tN+js6AzunexHMc5CYSKcYWmoyfYhiEzfrAED8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G1IzgoHmrWw27ITnbq37ZECZxFYV8b2fL0ZAwf2EtmYya+lbtHv+V8qgnrXcSoCes326Ak171jmlnpMtLliyunM5sSHsBt5+OUkOGLIeQ5DhcwTcU9jYQQ2arxQnYWNhU1L8CMm39iH4qxLlT9Vik+Jpa53/hAo8PV0qhpqZcSCay8bU122V6EeP8x/UzZJntz5Up9L33HLR3F8nZRcgZCW6pw442dI2cbsfbs2yEoaHAV33y2e0L5/5t8/kcl98epFjxqfiVUl6bQ9imo/a6Xj/f6v4ZJmqsERLuxeirLlVIgJmmd/DpNoqFgXfCGqCH+Df4p0svqoqPvAcDK84Cw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>
  • Delivery-date: Wed, 07 Sep 2022 10:45:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYwpUJ7IYztv5II0KGaSuPgw9aFq3Twt6AgAAE4DA=
  • Thread-topic: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> > -    /* find first memory range not bound to a Xen domain */
> > -    for ( i = 0; i < mem->nr_banks && mem->bank[i].xen_domain; i++ )
> > +    /* find first memory range not bound to a Xen domain nor heap */
> 
> This comment could become stale if we are adding a new type. So how about:
> 
> /* find the first memory range that is reserved for device (or firmware) */

Ok, will use this one.

> 
> > +enum membank_type {
> > +    /*
> > +     * The MEMBANK_DEFAULT type refers to either reserved memory for
> the
> > +     * device (or firmware) or any memory that will be used by the 
> > allocator.
> 
> I realize the part of the 'or' is what I suggested. However, I wasn't
> correct here (sorry).

No problem, actually, I've learned a lot about how Xen does the memory
management from your comments. So I should say thank you.

> 
> In the context of 'mem' this is referring to any RAM. The setup code
> will then find the list of the regions that doesn't overlap with the
> 'reserved_mem' and then give the pages to the boot allocator (and
> subsequently the buddy allocator). Also...
> 
> > +     * The meaning depends on where the memory bank is actually used.
> 
> ... this doesn't tell the reader which means applies where. So I would
> suggest the following:
> 
> The MEMBANK_DEFAULT type refers to either reserved memory for the
> device/firmware (when the bank is in 'reserved_mem') or any RAM (when
> the bank is in 'mem'

Ok will follow that.

> 
> The rest of the code looks good to me. So once we settled on the two
> comments above:
> 
> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks!

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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