public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common/cmd_ext_common: measure throughput
Date: Wed, 17 Oct 2012 12:16:14 +0200	[thread overview]
Message-ID: <507E856E.5040908@gmail.com> (raw)
In-Reply-To: <20121017100543.292622029CB@gemini.denx.de>

Dear Wolfgang Denk,

On 17.10.2012 12:05, Wolfgang Denk wrote:
> Dear Andreas Bie?mann,
> 
> In message <1350467910-2014-1-git-send-email-andreas.devel@googlemail.com> you wrote:
>> This patch adds time measurement and throughput calculation for the ext2load and
>> ext4load commands.
> ...
>> +	unsigned long time_start;
> ...
>> +	time_start = get_timer(0);
>>  	if (ext4fs_read((char *)addr, filelen) != filelen) {
>>  		printf("** Unable to read \"%s\" from %s %d:%d **\n",
>>  		       filename, argv[1], dev, part);
>>  		ext4fs_close();
>>  		goto fail;
>>  	}
>> +	time_start = get_timer(time_start);
> 
> There, "time_start" is clearly a mis-nomer.  How about
> s/time_start/time/ ?

sounds better, however this is a plane copy from Simons tftp measurement
patch.

>> +		print_size(filelen / time_start * 1000, "/s");
> 
> Does this give reasonable results for small files, say when loading a
> 20 byte file ?

Well, possible no:

---8<---
U-Boot> ext2load mmc 0 10020000 /etc/hosts
Loading file "/etc/hosts" from mmc device 0:1
20 bytes read in 0 ms
U-Boot> ext2load mmc 0 10020000 /etc/shadow
Loading file "/etc/shadow" from mmc device 0:1
95 bytes read in 0 ms
U-Boot>  ext2load mmc 0 10020000 /etc/passwd
Loading file "/etc/passwd" from mmc device 0:1
366 bytes read in 0 ms
U-Boot> ext2load mmc 0 10020000 /etc/services
Loading file "/etc/services" from mmc device 0:1
18465 bytes read in 3 ms (5.9 MiB/s)
U-Boot>
--->8---

But as you see extremely short transfers are omitted due to time
difference of '0' (at least on my avr32 system here).
The main aim for this patch was to measure performance gain of Josh Wu's
gen_atmel_mci patch for multiple block access, hopefully this is useful
for others.
I would like to have some feedback how the measurement is for very small
files on other systems. Then I could provide a v2 which uses another
variable name for the time.

Best regards

Andreas Bie?mann

  reply	other threads:[~2012-10-17 10:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17  9:58 [U-Boot] [PATCH] common/cmd_ext_common: measure throughput Andreas Bießmann
2012-10-17 10:05 ` Wolfgang Denk
2012-10-17 10:16   ` Andreas Bießmann [this message]
2012-10-25 19:03     ` Tom Rini
2012-10-26  8:20 ` [U-Boot] [PATCH v2] " Andreas Bießmann
2012-10-30 11:49   ` [U-Boot] [PATCH v3] fs/fs.c: do_fsload: " Andreas Bießmann
2012-10-31  7:39     ` Andreas Bießmann
2012-11-04 18:00       ` Tom Rini
2012-11-14 12:59     ` Anatolij Gustschin

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=507E856E.5040908@gmail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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