DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
	"Ferruh Yigit" <ferruh.yigit@intel.com>
Cc: "Xueming Li" <xuemingl@mellanox.com>,
	"Wenzhuo Lu" <wenzhuo.lu@intel.com>,
	"Jingjing Wu" <jingjing.wu@intel.com>,
	"Bernard Iremonger" <bernard.iremonger@intel.com>,
	"Anatoly Burakov" <anatoly.burakov@intel.com>, <dev@dpdk.org>,
	"Asaf Penso" <asafp@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v1] app/testpmd: add memory dump command
Date: Fri, 3 Apr 2020 18:34:37 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C60F3E@smartserver.smartshare.dk> (raw)
In-Reply-To: <20200403090852.29db0d1b@hermes.lan>

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger
> Sent: Friday, April 3, 2020 6:09 PM
> 
> On Fri, 3 Apr 2020 14:29:06 +0100
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> > > +			socket_stats.heap_totalsz_bytes / 1.0e6,
> > > +			socket_stats.heap_allocsz_bytes / 1.0e6,
> > > +			(double)socket_stats.heap_allocsz_bytes * 100 /
> > > +			(double)socket_stats.heap_totalsz_bytes,
> > > +			socket_stats.heap_freesz_bytes / 1.0e6,
> > > +			socket_stats.alloc_count,
> > > +			socket_stats.free_count);
> >
> > This gives an output like [1], can you please divide to (1024*1024)
> to convert
> > byte to Mb, than it can give more clear numbers.
> 
> Agree, the standard is to use 1024*1024 for memory megabytes.

That was the old standard. It has been 1000*1000 so for a decade now.

1000000 is the internationally agreed standard for the MB (megabyte) unit. It has been adopted by all major standardization organs, and is the legally binding definition.

If you want to use 1024*1024, the correct unit is MiB (mebibyte). And in this case, it probably makes sense. Just use the correct MiB unit instead of the incorrect MB unit.

For further information, please also refer to:
https://en.wikipedia.org/wiki/Megabyte

> And 1000*1000 for bytes in networking.

Yes.

  reply	other threads:[~2020-04-03 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 13:03 [dpdk-dev] [PATCH] " Xueming Li
2020-04-02 15:55 ` Ferruh Yigit
2020-04-03  6:53 ` [dpdk-dev] [PATCH v1] " Xueming Li
2020-04-03  6:53 ` Xueming Li
2020-04-03 13:29   ` Ferruh Yigit
2020-04-03 16:04     ` Stephen Hemminger
2020-04-03 16:08     ` Stephen Hemminger
2020-04-03 16:34       ` Morten Brørup [this message]
2020-04-05  2:49 ` [dpdk-dev] [PATCH v2] " Xueming Li
2020-04-05  2:49 ` Xueming Li
2020-04-07  9:21   ` Ferruh Yigit
2020-04-07 11:24     ` Xueming(Steven) Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35C60F3E@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=anatoly.burakov@intel.com \
    --cc=asafp@mellanox.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=xuemingl@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).