Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-11 Thread Rob Herring
On Tue, Dec 10, 2019 at 2:17 AM Frank Rowand wrote: > > On 12/9/19 7:51 PM, Rob Herring wrote: > > On Mon, Dec 9, 2019 at 7:35 AM Sebastian Andrzej Siewior > > wrote: > >> > >> On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: > >>> Is there a memory usage issue for the systems that led to this

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-10 Thread Frank Rowand
On 12/10/19 2:17 AM, Frank Rowand wrote: > On 12/9/19 7:51 PM, Rob Herring wrote: >> On Mon, Dec 9, 2019 at 7:35 AM Sebastian Andrzej Siewior >> wrote: >>> >>> On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: Is there a memory usage issue for the systems that led to this thread? >>> >>> No

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-10 Thread Frank Rowand
On 12/9/19 7:51 PM, Rob Herring wrote: > On Mon, Dec 9, 2019 at 7:35 AM Sebastian Andrzej Siewior > wrote: >> >> On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: >>> Is there a memory usage issue for the systems that led to this thread? >> >> No, no memory issue led to this thread. I was just t

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-09 Thread Rob Herring
On Mon, Dec 9, 2019 at 7:35 AM Sebastian Andrzej Siewior wrote: > > On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: > > Is there a memory usage issue for the systems that led to this thread? > > No, no memory issue led to this thread. I was just testing my patch and > I assumed that I did some

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-09 Thread Sebastian Andrzej Siewior
On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: > Is there a memory usage issue for the systems that led to this thread? No, no memory issue led to this thread. I was just testing my patch and I assumed that I did something wrong in the counting/lock drop/lock acquire/allocate path because the

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-07 Thread Frank Rowand
On 12/5/19 7:52 PM, Frank Rowand wrote: > On 12/3/19 10:56 AM, Rob Herring wrote: >> On Mon, Dec 2, 2019 at 10:28 PM Frank Rowand wrote: >>> >>> On 12/2/19 10:12 PM, Michael Ellerman wrote: Frank Rowand writes: > On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: >> I've been look

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-07 Thread Frank Rowand
On 12/6/19 5:40 PM, Segher Boessenkool wrote: > Hi, > > On Thu, Dec 05, 2019 at 07:37:24PM -0600, Frank Rowand wrote: >> On 12/3/19 12:35 PM, Segher Boessenkool wrote: >>> Btw. Some OFs mangle the phandles some way, to make it easier to catch >>> people using it as an address (and similarly, mang

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-06 Thread Segher Boessenkool
Hi, On Thu, Dec 05, 2019 at 07:37:24PM -0600, Frank Rowand wrote: > On 12/3/19 12:35 PM, Segher Boessenkool wrote: > > Btw. Some OFs mangle the phandles some way, to make it easier to catch > > people using it as an address (and similarly, mangle ihandles differently, > > so you catch confusion b

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-05 Thread Frank Rowand
On 12/5/19 10:35 AM, Sebastian Andrzej Siewior wrote: > On 2019-12-03 10:56:35 [-0600], Rob Herring wrote: >>> Another possibility would be to make the cache be dependent >>> upon not CONFIG_PPC. It might be possible to disable the >>> cache with a minimal code change. >> >> I'd rather not do that

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-05 Thread Frank Rowand
On 12/3/19 10:56 AM, Rob Herring wrote: > On Mon, Dec 2, 2019 at 10:28 PM Frank Rowand wrote: >> >> On 12/2/19 10:12 PM, Michael Ellerman wrote: >>> Frank Rowand writes: On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: > I've been looking at phandle_cache and noticed the following:

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-05 Thread Frank Rowand
On 12/3/19 12:35 PM, Segher Boessenkool wrote: > Hi! > > On Tue, Dec 03, 2019 at 03:03:22PM +1100, Michael Ellerman wrote: >> Sebastian Andrzej Siewior writes: >> I've certainly heard it said that on some OF's the phandle was just == >> the address of the internal representation, and I guess mayb

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-05 Thread Sebastian Andrzej Siewior
On 2019-12-03 10:56:35 [-0600], Rob Herring wrote: > > Another possibility would be to make the cache be dependent > > upon not CONFIG_PPC. It might be possible to disable the > > cache with a minimal code change. > > I'd rather not do that. > > And yes, as mentioned earlier I don't like the com

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-03 Thread Segher Boessenkool
Hi! On Tue, Dec 03, 2019 at 03:03:22PM +1100, Michael Ellerman wrote: > Sebastian Andrzej Siewior writes: > I've certainly heard it said that on some OF's the phandle was just == > the address of the internal representation, and I guess maybe for SLOF > that is true. It is (or was). In many OFs

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-03 Thread Rob Herring
On Mon, Dec 2, 2019 at 10:28 PM Frank Rowand wrote: > > On 12/2/19 10:12 PM, Michael Ellerman wrote: > > Frank Rowand writes: > >> On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: > >>> I've been looking at phandle_cache and noticed the following: The raw > >>> phandle value as generated by

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-02 Thread Frank Rowand
On 12/2/19 10:12 PM, Michael Ellerman wrote: > Frank Rowand writes: >> On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: >>> I've been looking at phandle_cache and noticed the following: The raw >>> phandle value as generated by dtc starts at zero and is incremented by >>> one for each phandle

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-02 Thread Michael Ellerman
Frank Rowand writes: > On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: >> I've been looking at phandle_cache and noticed the following: The raw >> phandle value as generated by dtc starts at zero and is incremented by >> one for each phandle entry. The qemu pSeries model is using Slof (which

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-02 Thread Michael Ellerman
Sebastian Andrzej Siewior writes: > I've been looking at phandle_cache and noticed the following: The raw > phandle value as generated by dtc starts at zero and is incremented by > one for each phandle entry. The qemu pSeries model is using Slof (which > is probably the same thing as used on real

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-02 Thread Sebastian Andrzej Siewior
On 2019-11-29 20:14:47 [-0600], Frank Rowand wrote: > The hash used is based on the assumptions you noted, and as stated in the > code, that phandle property values are in a contiguous range of 1..n > (not starting from zero), which is what dtc generates. > > We knew that for systems that do not m

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-11-29 Thread Frank Rowand
On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: > I've been looking at phandle_cache and noticed the following: The raw > phandle value as generated by dtc starts at zero and is incremented by > one for each phandle entry. The qemu pSeries model is using Slof (which > is probably the same thi

[RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-11-29 Thread Sebastian Andrzej Siewior
I've been looking at phandle_cache and noticed the following: The raw phandle value as generated by dtc starts at zero and is incremented by one for each phandle entry. The qemu pSeries model is using Slof (which is probably the same thing as used on real hardware) and this looks like a poiner valu