On Thu, Jan 26, 2023 at 9:58 AM Colton Lewis <coltonlewis@xxxxxxxxxx> wrote: > > Ricardo Koller <ricarkol@xxxxxxxxxx> writes: > > > > nit: reservoir > > > Will fix > > > > Didn't see this before my previous comment. But, I guess it still > > applies: isn't it possible to know the number of events to store? to > > avoid the "100" obtained via trial and error. > > > That's what I thought I was calculating with sample_pages = > sizeof(latency_samples) / pta->guest_page_size. Both values are in bytes > so that should give the number of guest pages I need to allocate to hold > latency_samples. The 100 is a fudge factor added to the calculation > after encountering crashes. Any idea why the math above is incorrect? > Mm, I don't know to be honest. But I do think it's required to calculate the exact number of bytes needed. Otherwise, 100 might not be enough for a bigger VM with more samples. > > > reservoir > > > Will fix.