mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/7 v2] globalvar: add multiple device support
Date: Fri, 15 Mar 2013 09:12:29 +0100	[thread overview]
Message-ID: <20130315081229.GB1906@pengutronix.de> (raw)
In-Reply-To: <20130313180100.GJ1568@game.jcrosoft.org>

On Wed, Mar 13, 2013 at 07:01:00PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> HI,
> 
> 	v2:
> 	fix bootargs
> 
> 	this will allow to reduce the scope of device and params to search
> 	during boot time
> 
> 	we keep the retro compatibility
> 
> The following changes since commit 092bfd5eb55d1b2d7ed098aa9723a2fa63b86192:
> 
>   fix another brown paper bag bug introduced with compile time loglevel (2013-03-06 23:53:04 +0100)
> 
> are available in the git repository at:
> 
>   git://git.jcrosoft.org/barebox.git delivery/globalvar
> 
> for you to fetch changes up to 2a749c4b65f823da50537798a2feeaf4a01d2212:
> 
>   bootargs: switch globalvar to it's own device (2013-03-13 14:35:29 +0800)

I still don't see why we should take this. You say it's about speed.
I made some measurments. I read some global variables 1000 times each,
below times are in ms:

Vanilla -next tree:
-------------------------------------
global.linux.mtdparts.nand0:	49178
global.dhcp.rootpath:		45282
dhcp.rootpath:			90329
global.sumsen:			47681

-next with your patches:
-------------------------------------
global.linux.mtdparts.nand0:	11407
global.dhcp.rootpath:		13961
dhcp.rootpath:			92394
global.sumsen:			 5087

-next with register_device(&global_device) moved to pure_initcall:
-------------------------------------
global.linux.mtdparts.nand0:	 8467
global.dhcp.rootpath:		 5162
dhcp.rootpath:			90096
global.sumsen:			 6541

(Moving registration of the global device simply has the effect that
it is in the beginning of the devices list, thus we can find it faster)

So your patches indeed make reading the global variables significantly
faster, but a simple one-liner patch shows makes it even faster.

So, no. We don't introduce new APIs just for the sake of it.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2013-03-15  8:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 18:01 Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05 ` [PATCH 1/7] params: allow to access first sub-device and params via env Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 2/7] globalvar: add it's own bus Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 3/7] globalvar: allow to register multiple device Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 4/7] net: switch to global device Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 5/7] dhcp: switch globalvar to it's own device Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 6/7] bootm: " Jean-Christophe PLAGNIOL-VILLARD
2013-03-13 18:05   ` [PATCH 7/7] bootargs: " Jean-Christophe PLAGNIOL-VILLARD
2013-03-15  8:12 ` Sascha Hauer [this message]

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=20130315081229.GB1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.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