Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253604
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] regmap: rbtree: When adding a reg do a bsearch for target node |
| Date | 2015-10-22 11:10 +0200 |
| Message-ID | <qmk2J-69B-9@gated-at.bofh.it> (permalink) |
| References | <qm1CQ-4fn-45@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Oct 21, 2015 at 02:16:14PM +0100, Nikesh Oswal wrote: > From: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com> If you are going to use your non-opensource email, might as well use the cirrus one here. > > A binary search is much more efficient rather than iterating > over the rbtree in ascending order which the current code is > doing. > > During initialisation the reg defaults are written to the > cache in a large chunk and these are always sorted in the > ascending order so for this situation ideally we should have > iterated the rbtree in descending order. > > But at runtime the drivers may write into the cache in any > random order so this patch selects to use a bsearch to give > an optimal runtime performance and also at initialisation > time when reg defaults are written the performance of binary > search would be much better than iterating in ascending order > which the current code was doing. > > Signed-off-by: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com> > --- Patch looks fine to me though: Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] regmap: rbtree: When adding a reg do a bsearch for target node Nikesh Oswal <nikesh@opensource.wolfsonmicro.com> - 2015-10-21 15:30 +0200 Re: [PATCH] regmap: rbtree: When adding a reg do a bsearch for target node Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-10-22 11:10 +0200
csiph-web