Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580491

Re: [PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE

From Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE
Date 2017-02-14 12:40 +0100
Message-ID <taJCG-1jr-17@gated-at.bofh.it> (permalink)
References <taHrb-8k8-11@gated-at.bofh.it> <taHrb-8k8-9@gated-at.bofh.it> <taIwW-CH-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks Michael,

On Tuesday 14 February 2017 03:50 PM, Michael Ellerman wrote:
> Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> writes:
>
>> emulate_step() uses a number of underlying kernel functions that were
>> initially not enabled for LE. This has been rectified since.
> When exactly? ie. which commit.

I found couple of commits:

6506b4718b ("powerpc: Fix Unaligned Loads and Stores")
dbc2fbd7c2 ("powerpc: Fix Unaligned LE Floating Point Loads and Stores")

There may be more.

Patch2 is to test emulate_step() for basic load/store instructions and it
seems to be working fine on LE.

>
> Should we backport this? ie. is it actually a bug people are hitting in
> the real world much?

Yes, we should backport this. kernel-space hw-breakpoint feature is broken
on LE without this. This is on ppc64le:

  $ sudo cat /proc/kallsyms  | grep pid_max
    c00000000116998c D pid_max

  $ sudo ./perf record -a --event=mem:0xc00000000116998c sleep 10


Before patch:
  It does not record any data and throws below warning.

  $ dmesg
    [  817.895573] Unable to handle hardware breakpoint. Breakpoint at 0xc00000000116998c will be disabled.
    [  817.895581] ------------[ cut here ]------------
    [  817.895588] WARNING: CPU: 24 PID: 2032 at arch/powerpc/kernel/hw_breakpoint.c:277 hw_breakpoint_handler+0x124/0x230
    ...

After patch:
  It records data properly.

  $ sudo ./perf report --stdio
    ...
    # Samples: 36  of event 'mem:0xc00000000116998c'
    # Event count (approx.): 36
    #
    # Overhead  Command        Shared Object     Symbol     
    # ........  .............  ................  .............
    #
        63.89%  kdumpctl       [kernel.vmlinux]  [k] alloc_pid
        27.78%  opal_errd      [kernel.vmlinux]  [k] alloc_pid
         5.56%  kworker/u97:4  [kernel.vmlinux]  [k] alloc_pid
         2.78%  systemd        [kernel.vmlinux]  [k] alloc_pid



>
> cheers
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/2] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 10:20 +0100
  [PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 10:20 +0100
    Re: [PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE Michael Ellerman <mpe@ellerman.id.au> - 2017-02-14 11:30 +0100
      Re: [PATCH v3 1/2] powerpc: Emulation support for load/store  instructions on LE Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 12:40 +0100
  [PATCH v3 2/2] powerpc: emulate_step tests for load/store instructions Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 10:20 +0100
    Re: [PATCH v3 2/2] powerpc: emulate_step tests for load/store instructions Michael Ellerman <mpe@ellerman.id.au> - 2017-02-14 11:50 +0100
      Re: [PATCH v3 2/2] powerpc: emulate_step tests for load/store  instructions Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-02-14 12:50 +0100
    Re: [PATCH v3 2/2] powerpc: emulate_step tests for load/store instructions Michael Ellerman <mpe@ellerman.id.au> - 2017-02-14 11:50 +0100

csiph-web