Hi Julien, > -----Original Message----- > From: Julien Grall <[email protected]> > Subject: Re: [PATCH for-4.17 1/2] docs: Document the minimal requirement > of static heap > >>> 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. > >> > >> That's going to be hard. It will vary depending on your system and this > >> could change in the future as we add more features. For instance, I > >> expect the PCI passthrough will need some memory to keep track of all > >> the devices. > >> > >> I am worry the formula will become complex. Ideally we need to have a > >> very simple formula. If that's not possible, then we need to provide a > >> way for the user to estimate it at runtime (like what I suggested before). > > > > I agree, I think the simple formula can only be achieved is we have an > > estimation of the worst case scenario of those scattered memory usages. > > I remember I once had a try so let me try to find the results back that > > time... > > > > I am also very interested in the method that you proposed to provide a > > mechanism for users to get the system memory allocation at runtime. But > > IIUC this needs some work in another series. Could you please confirm if I > > am understanding correctly? Or probably Xen has some mechanisms that > > I am likely unaware? Thanks! > > It will depend the way you account memory statically allocated to > domains in Xen. > > We already provide the total amount of memory in the system and how > much > is free. The values can be retrieved using ``xl info``. > > * When not allocated, is this considered free or used? > * Are they included in the total memory? > > If the answer is no for both (possibly just one), then we will need to > provide extra hypercalls to expose the size of the xenheap and how much > is free.
Thanks for sharing your thoughts. I will add a follow-up series for this work. Before we have this mechanism, I think the patch 2/2 should be dropped. Kind regards, Henry > > Cheers, > > -- > Julien Grall
