Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-04-01 Thread Sudeep Holla



On 01/04/15 05:40, Michael Ellerman wrote:

On Tue, 2015-03-31 at 18:14 +0100, Sudeep Holla wrote:


On 31/03/15 11:56, Michael Ellerman wrote:

On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote:

This patch removes the redundant sysfs cacheinfo code by reusing
the newly introduced generic cacheinfo infrastructure through the
commit 246246cbde5e ("drivers: base: support cpu cache information
interface to userspace via sysfs")



Removing the include doesn't fix it, it needs cacheinfo_cpu_on/offline().



I agree, had a quick look at that, and it requires some rework not sure
if that should be in generic code or ppc specific.


Yeah OK.

Also if I just remove the references from the suspend code, it still causes
changes to the result, some of which look wrong:

--- cpu0.before 2015-04-01 15:34:58.985470973 +1100
+++ cpu0.after-no-power 2015-04-01 15:36:31.313435304 +1100
@@ -3,22 +3,24 @@
  ./cpu0/cache/index0/level:1
  ./cpu0/cache/index0/number_of_sets:8
  ./cpu0/cache/index0/shared_cpu_map:,00ff
+./cpu0/cache/index0/shared_cpu_list:0-7<- additional, OK
  ./cpu0/cache/index0/coherency_line_size:128
  ./cpu0/cache/index0/ways_of_associativity:64
-./cpu0/cache/index1/size:32K   <- we lost the size of 
the Icache?
  ./cpu0/cache/index1/type:Instruction
  ./cpu0/cache/index1/level:1
-./cpu0/cache/index1/number_of_sets:4   }-.
-./cpu0/cache/index1/shared_cpu_map:,00ff .
-./cpu0/cache/index1/coherency_line_size:128  .   These changes are 
no good
-./cpu0/cache/index1/ways_of_associativity:64 .
+./cpu0/cache/index1/shared_cpu_map:, .
+./cpu0/cache/index1/shared_cpu_list:0-47   }-
  ./cpu0/cache/index2/size:512K
  ./cpu0/cache/index2/type:Unified
  ./cpu0/cache/index2/level:2
  ./cpu0/cache/index2/number_of_sets:8
  ./cpu0/cache/index2/shared_cpu_map:,00ff
+./cpu0/cache/index2/shared_cpu_list:0-7<- additional, OK
+./cpu0/cache/index2/ways_of_associativity:0<- this is new but 
wrong I think
  ./cpu0/cache/index3/size:8192K
  ./cpu0/cache/index3/type:Unified
  ./cpu0/cache/index3/level:3
  ./cpu0/cache/index3/number_of_sets:8
  ./cpu0/cache/index3/shared_cpu_map:,00ff
+./cpu0/cache/index3/shared_cpu_list:0-7
+./cpu0/cache/index3/ways_of_associativity:0<- ditto



Thanks for the log. It's been long time since I looked at this code.
It would be good to know if Anshuman had looked at this issue. If not
I will start looking at this in couple of days.

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Michael Ellerman
On Tue, 2015-03-31 at 18:14 +0100, Sudeep Holla wrote:
> 
> On 31/03/15 11:56, Michael Ellerman wrote:
> > On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote:
> >> This patch removes the redundant sysfs cacheinfo code by reusing
> >> the newly introduced generic cacheinfo infrastructure through the
> >> commit 246246cbde5e ("drivers: base: support cpu cache information
> >> interface to userspace via sysfs")
> 
> > Removing the include doesn't fix it, it needs cacheinfo_cpu_on/offline().
> >
> 
> I agree, had a quick look at that, and it requires some rework not sure
> if that should be in generic code or ppc specific.

Yeah OK.

Also if I just remove the references from the suspend code, it still causes
changes to the result, some of which look wrong:

--- cpu0.before 2015-04-01 15:34:58.985470973 +1100
+++ cpu0.after-no-power 2015-04-01 15:36:31.313435304 +1100
@@ -3,22 +3,24 @@
 ./cpu0/cache/index0/level:1
 ./cpu0/cache/index0/number_of_sets:8
 ./cpu0/cache/index0/shared_cpu_map:,00ff
+./cpu0/cache/index0/shared_cpu_list:0-7<- additional, OK
 ./cpu0/cache/index0/coherency_line_size:128
 ./cpu0/cache/index0/ways_of_associativity:64
-./cpu0/cache/index1/size:32K   <- we lost the size of 
the Icache?
 ./cpu0/cache/index1/type:Instruction
 ./cpu0/cache/index1/level:1
-./cpu0/cache/index1/number_of_sets:4   }-.
-./cpu0/cache/index1/shared_cpu_map:,00ff .
-./cpu0/cache/index1/coherency_line_size:128  .   These changes are 
no good
-./cpu0/cache/index1/ways_of_associativity:64 .
+./cpu0/cache/index1/shared_cpu_map:, .
+./cpu0/cache/index1/shared_cpu_list:0-47   }-
 ./cpu0/cache/index2/size:512K
 ./cpu0/cache/index2/type:Unified
 ./cpu0/cache/index2/level:2
 ./cpu0/cache/index2/number_of_sets:8
 ./cpu0/cache/index2/shared_cpu_map:,00ff
+./cpu0/cache/index2/shared_cpu_list:0-7<- additional, OK
+./cpu0/cache/index2/ways_of_associativity:0<- this is new but 
wrong I think
 ./cpu0/cache/index3/size:8192K
 ./cpu0/cache/index3/type:Unified
 ./cpu0/cache/index3/level:3
 ./cpu0/cache/index3/number_of_sets:8
 ./cpu0/cache/index3/shared_cpu_map:,00ff
+./cpu0/cache/index3/shared_cpu_list:0-7
+./cpu0/cache/index3/ways_of_associativity:0<- ditto


cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Sudeep Holla



On 31/03/15 11:56, Michael Ellerman wrote:

On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote:

This patch removes the redundant sysfs cacheinfo code by reusing
the newly introduced generic cacheinfo infrastructure through the
commit 246246cbde5e ("drivers: base: support cpu cache information
interface to userspace via sysfs")

Signed-off-by: Sudeep Holla 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: Michael Ellerman 
Cc: Anshuman Khandual 
Cc: linuxppc-...@lists.ozlabs.org
---
  arch/powerpc/kernel/cacheinfo.c | 811 +---
  arch/powerpc/kernel/cacheinfo.h |   8 -
  arch/powerpc/kernel/sysfs.c |  12 +-
  3 files changed, 91 insertions(+), 740 deletions(-)
  delete mode 100644 arch/powerpc/kernel/cacheinfo.h

Hi,

This patch is not tested. Last time Anshuman tested, he had seen issues.
The core driver has changed a lot after that. Since PPC depends a lot
on DT for cache information, there might be issues in the core later
which I could not identify with ARM/ARM64. It would be much appreciable
if someone help me in testing and fixing those so that PPC can migrate
to new/common cacheinfo infrastructure. This resend is rebased on v4.0-rc1


Doesn't build for me.

   arch/powerpc/platforms/pseries/suspend.c:29:36: fatal error: 
../../kernel/cacheinfo.h: No such file or directory
   #include "../../kernel/cacheinfo.h"



Right, sorry for missing this. I just tested corenet32_smp_defconfig.
Also after some digging I found that this patch was written before the
commit 6b36ba8492ab (" powerpc/pseries: Update dynamic cache nodes for
suspend/resume operation"). I had a quick looks at that patch and I am
not sure if we can support that with generic cacheinfo implementation.


Anshuman must have worked around that somehow to test it previously?



I think he tried before the above mentioned commit was introduced.


Removing the include doesn't fix it, it needs cacheinfo_cpu_on/offline().



I agree, had a quick look at that, and it requires some rework not sure
if that should be in generic code or ppc specific.

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC/RFT, RESEND] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-03-31 Thread Michael Ellerman
On Mon, 2015-23-02 at 18:18:20 UTC, Sudeep Holla wrote:
> This patch removes the redundant sysfs cacheinfo code by reusing
> the newly introduced generic cacheinfo infrastructure through the
> commit 246246cbde5e ("drivers: base: support cpu cache information
> interface to userspace via sysfs")
> 
> Signed-off-by: Sudeep Holla 
> Cc: Benjamin Herrenschmidt 
> Cc: Paul Mackerras 
> Cc: Michael Ellerman 
> Cc: Anshuman Khandual 
> Cc: linuxppc-...@lists.ozlabs.org
> ---
>  arch/powerpc/kernel/cacheinfo.c | 811 
> +---
>  arch/powerpc/kernel/cacheinfo.h |   8 -
>  arch/powerpc/kernel/sysfs.c |  12 +-
>  3 files changed, 91 insertions(+), 740 deletions(-)
>  delete mode 100644 arch/powerpc/kernel/cacheinfo.h
> 
> Hi,
> 
> This patch is not tested. Last time Anshuman tested, he had seen issues.
> The core driver has changed a lot after that. Since PPC depends a lot
> on DT for cache information, there might be issues in the core later
> which I could not identify with ARM/ARM64. It would be much appreciable
> if someone help me in testing and fixing those so that PPC can migrate
> to new/common cacheinfo infrastructure. This resend is rebased on v4.0-rc1

Doesn't build for me.

  arch/powerpc/platforms/pseries/suspend.c:29:36: fatal error: 
../../kernel/cacheinfo.h: No such file or directory
  #include "../../kernel/cacheinfo.h"

Anshuman must have worked around that somehow to test it previously?

Removing the include doesn't fix it, it needs cacheinfo_cpu_on/offline().

cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/