[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/3] tools/xentop: Fix calculation of used memory.
On Thu, Feb 20, 2020 at 12:48:16AM +0000, Wei Liu wrote: > The code looks correct to me, but I would like to add the following > commit message to this change. > > Used memory should be calculated by subtracting free memory from total > memory. Fixes: c588c002cc1 ("tools: remove tmem code and commands") > > > On Wed, Feb 19, 2020 at 09:31:30PM +0100, Sander Eikelenboom wrote: > > Signed-off-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx> > > --- > > tools/xenstat/xentop/xentop.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c > > index af11ebfbf7..13b612f26d 100644 > > --- a/tools/xenstat/xentop/xentop.c > > +++ b/tools/xenstat/xentop/xentop.c > > @@ -969,7 +969,7 @@ void do_summary(void) > > "%u crashed, %u dying, %u shutdown \n", > > num_domains, run, block, pause, crash, dying, shutdown); > > > > - used = xenstat_node_tot_mem(cur_node); > > + used = xenstat_node_tot_mem(cur_node)-xenstat_node_free_mem(cur_node); > > Also, I will add spaces around "-". > > Acked-by: Wei Liu <wl@xxxxxxx> > > > freeable_mb = 0; > > > > /* Dump node memory and cpu information */ > > -- > > 2.20.1 > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |