Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 12:19, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: >> On 02/28/18 11:31, Andy Shevchenko wrote: >>> On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >>> The question is why O(1) is so important? O(log(n))

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 12:19, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: >> On 02/28/18 11:31, Andy Shevchenko wrote: >>> On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >>> The question is why O(1) is so important? O(log(n)) wouldn't work? >> >> O(1) is not critical. It was

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Rob Herring
On Wed, Feb 28, 2018 at 2:19 PM, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: >> On 02/28/18 11:31, Andy Shevchenko wrote: >>> On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >>> The question

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Rob Herring
On Wed, Feb 28, 2018 at 2:19 PM, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: >> On 02/28/18 11:31, Andy Shevchenko wrote: >>> On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >>> The question is why O(1) is so important? O(log(n)) wouldn't work? >> >> O(1) is not

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Andy Shevchenko
On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: > On 02/28/18 11:31, Andy Shevchenko wrote: >> On Wed, Feb 28, 2018 at 9:04 PM, wrote: >> The question is why O(1) is so important? O(log(n)) wouldn't work? > > O(1) is not critical. It was

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Andy Shevchenko
On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: > On 02/28/18 11:31, Andy Shevchenko wrote: >> On Wed, Feb 28, 2018 at 9:04 PM, wrote: >> The question is why O(1) is so important? O(log(n)) wouldn't work? > > O(1) is not critical. It was just a nice side result. > > >> Using radix_tree()

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 11:31, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >> Create a cache of the nodes that contain a phandle property. Use this >> cache to find the node for a given phandle value instead of scanning >> the devicetree to find the node. If

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 11:31, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:04 PM, wrote: > >> Create a cache of the nodes that contain a phandle property. Use this >> cache to find the node for a given phandle value instead of scanning >> the devicetree to find the node. If the phandle value is

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Andy Shevchenko
On Wed, Feb 28, 2018 at 9:04 PM, wrote: > Create a cache of the nodes that contain a phandle property. Use this > cache to find the node for a given phandle value instead of scanning > the devicetree to find the node. If the phandle value is not found > in the cache,

Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Andy Shevchenko
On Wed, Feb 28, 2018 at 9:04 PM, wrote: > Create a cache of the nodes that contain a phandle property. Use this > cache to find the node for a given phandle value instead of scanning > the devicetree to find the node. If the phandle value is not found > in the cache, of_find_node_by_phandle()

[PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will

[PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will fall back to the tree