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

RE: [PATCH for-4.17 1/2] docs: Document the minimal requirement of static heap


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 14 Oct 2022 08:58:14 +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=2wb5r6reTnNDlEtTPWq9l4CeLPdCvnAggvKIf7zFl2U=; b=CccaOGj84fn6qNDUTVm50iPC/bPZ5SZILNmG0bYpLMJzf/BF+zJn3Av4Gmgc+bSgzJeEY2nMtQzMkvrF8GsuxZ3go2GooOuHdR1OoMCpPN+gSDpS6xs3n/Tn5hm6aUycvK3LXY+tme003VjbWyz1XxLq0oih5SdyylCL7vRmtk1EGTXyVyhVUwFo3texOC4H4lw+PIfbDMgqpGh6Y17V8PW1KoVnzy6J2XsIRUoX02vPSNLxwzehjtYNZtrefxs54vofuxrjAIBf50AP1nwDeCQyr6w8kjRAJKniYxCQmAacxSqvbkX4ExcJy4Nx7RjID/qAmCJCBw2mIFtEAoWU2g==
  • 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=2wb5r6reTnNDlEtTPWq9l4CeLPdCvnAggvKIf7zFl2U=; b=MKNu/pnqZl9iWnseqoRQXl75TVpnISzyZR1VTO8ZsOsIkjKikjMeRJ/KSPKSjwdHnQjaW5YJ7eU/olPJ79W1/mhdqzfvNB70y95bPkomHT+UpofAQg5wIRmYLbX1l0EeJHjvWv4OXTo5usHIhrivdZLhDXVwaqYvZdxeAmqWnVSZRt+++rZaTTSORGq3BrvKZr6m92P6sXURGpdV1nuTfXVCGPifNNRk0NUD6iTh4JoRay0UD0H2DfpN8RcrzlBtING6jtlF1BeLU9510MgWMsCRp2NSciwXfwWf5/yBqfEwLIshsqtL/VON2+DdS5Rm7i4YUHD7p9nz9xEKBYMC+w==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eSgI+VNfGKvnYVLGG5yEo5QGYDCU3qbsgp1mPksy/ETVynQHrDzcQ7adE8NVlPhLaJW2/tKZ6guJWJA2PfRHsHZSj4NLH9bGvcH8rYKwqhq9wYa2v+JByVxoHc2wxYiX0UbmBUDmYf81wbPD5puCETOYHRu+L5gJg7/TFvy5ZqHA2bUeYcDhICSleeoXhOtosryLbzMu4f6WsQz8z4Ie9a7GLYdsdYyDbNTxmQMZpE8TXVIFtOlcyinMThMKPJBTk+KXiJylQdqhqwXACl1/RJcC8UCld+CiNkNUsi2qsFEE6J2j5fQFyoPX2dsffM3ahgyInW95gOwj0cq75xoJ1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jlozsO6I/z8+6b8Ud04WgUPJ5OOjuT16E9pAqCObTOzD3tGbWyxla/OvNuW39ho66fwkGoRKO5a3VUjGSdH9ot7y0ATE30eGqilbZWe+mpBmEhW2PhLhdts4ODrJi5jT4QszsHmMy2EGUVNP16gpIHALgbidd1vhX2MGbsIGz+aLrr3klQ8/1En7PBGRXbR/8xWJlcKfAZN4HmJ6/Bpx2NOKTB+7CvJ/dp6rzHPXIJ+pIWc4nTpKc4rsrVn7dyG2AWfmvoC0xSW8DyErQPIFqp2APd9SPt1BjUx5DJWGkm4EjAGbgqHSGGBcsG/eZnqfuoRgv0td4Mz4/ZtU/pqupA==
  • 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>
  • Delivery-date: Fri, 14 Oct 2022 08:58:34 +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: AQHY3q+bU7An58kRd0C18nD7mqtwpK4Nk9IAgAAAuGA=
  • Thread-topic: [PATCH for-4.17 1/2] docs: Document the minimal requirement of static heap

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Subject: Re: [PATCH for-4.17 1/2] docs: Document the minimal requirement
> of static heap
> 
> Hi Henry,
> 
> > +Users should be mindful that the static heap should at least satisfy the
> > +allocation of the P2M maps for all guests. Currently, the minimal
> requirement
> > +of per-domain P2M pages pool is in-sync with function
> > +libxl__get_required_paging_memory() (for xl-created domUs) and
> > +domain_p2m_pages() (for dom0less domUs), that is, 1MB per vCPU, plus
> 4KiB per
> > +MiB of RAM for the P2M map, and plus 512KiB to cover extended regions.
> 
> I think this wording is OK if the feature is a tech preview. However, if
> this is security supported, we need to provide some more details about
> the size.
> 
> In particular, this doesn't tell a user how they can find the size that
> would fit them. Can this be decided with a formula?

My feeling of the formula would be:

My feeling of the formula would be:

Total heap size needed per guest =  1MB * num_guest_vcpu +
    4KB * guest_ram_size_in_mb + 512KB +
    the memory allocated from heap by xzalloc/xzalloc_array for various uses
    for example alloc_domain_struct(), d->shared_info, evtchn_bucket, etc.

Is this formula somehow make sense to you? I think we need to have a
rough estimation of the last part (boot time allocation) though.

Kind regards,
Henry

> 
> If not, could a user configure his system without the reserved heap and
> find out the memory usage from dom0 (or a debug keys)?
> 
> Cheers,
> 
> 
> --
> Julien Grall

 


Rackspace

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