Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:35:34AM +, Mark Brown wrote: > On Thu, Mar 14, 2013 at 02:52:35PM +, Dimitris Papastamos wrote: > > > if (rbnode) { > > reg_tmp = (reg - rbnode->base_reg) / map->reg_stride; > > + /* Does this register exist? If not bail out. */ > > +

Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-15 Thread Dimitris Papastamos
On Fri, Mar 15, 2013 at 01:35:34AM +, Mark Brown wrote: On Thu, Mar 14, 2013 at 02:52:35PM +, Dimitris Papastamos wrote: if (rbnode) { reg_tmp = (reg - rbnode-base_reg) / map-reg_stride; + /* Does this register exist? If not bail out. */ + if

Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Mark Brown
On Thu, Mar 14, 2013 at 02:52:35PM +, Dimitris Papastamos wrote: > if (rbnode) { > reg_tmp = (reg - rbnode->base_reg) / map->reg_stride; > + /* Does this register exist? If not bail out. */ > + if (!(rbtree_ctx->reg_present[BIT_WORD(reg)] &

[PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Dimitris Papastamos
This patch aims to bring down the average number of nodes in the rbtree cache and increase the average number of registers per node. This should improve general lookup and traversal times. This is achieved by setting the minimum size of a block within the rbnode to the size of the rbnode itself.

[PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Dimitris Papastamos
This patch aims to bring down the average number of nodes in the rbtree cache and increase the average number of registers per node. This should improve general lookup and traversal times. This is achieved by setting the minimum size of a block within the rbnode to the size of the rbnode itself.

Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache

2013-03-14 Thread Mark Brown
On Thu, Mar 14, 2013 at 02:52:35PM +, Dimitris Papastamos wrote: if (rbnode) { reg_tmp = (reg - rbnode-base_reg) / map-reg_stride; + /* Does this register exist? If not bail out. */ + if (!(rbtree_ctx-reg_present[BIT_WORD(reg)] BIT_MASK(reg)))