Re: [PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-25 Thread Shi, Yang
On 11/25/2015 7:16 AM, Nicolas Pitre wrote: On Wed, 25 Nov 2015, Jon Masters wrote: On 11/18/15, 1:15 PM, Yang Shi wrote: As what Pavel Machek reported [1], some userspace applications depend on bogomips showed by /proc/cpuinfo. Although there is much less legacy impact on aarch64 than arm,

Re: [PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Shi, Yang
On 11/25/2015 4:26 PM, kbuild test robot wrote: Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as

Re: [PATCH 1/2] arm64: bpf: add 'store immediate' instruction

2015-11-23 Thread Shi, Yang
: On Thu, Nov 12, 2015 at 11:33 AM, Shi, Yang wrote: On 11/11/2015 4:39 AM, Will Deacon wrote: Wait a second, we're both talking rubbish here :) The STR (immediate) form is referring to the addressing mode, whereas this patch wants to store an immediate value to memory, which does need moving

Re: [PATCH 1/2] arm64: bpf: add 'store immediate' instruction

2015-11-23 Thread Shi, Yang
: On Thu, Nov 12, 2015 at 11:33 AM, Shi, Yang <yang@linaro.org> wrote: On 11/11/2015 4:39 AM, Will Deacon wrote: Wait a second, we're both talking rubbish here :) The STR (immediate) form is referring to the addressing mode, whereas this patch wants to store an immediate value to memory,

Re: [V2 PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-19 Thread Shi, Yang
On 11/19/2015 9:59 AM, Catalin Marinas wrote: On Wed, Nov 18, 2015 at 10:48:55AM -0800, Yang Shi wrote: As what Pavel Machek reported [1], some userspace applications depend on bogomips showed by /proc/cpuinfo. Although there is much less legacy impact on aarch64 than arm, but it does break

Re: [V2 PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-19 Thread Shi, Yang
com> Cc: <sta...@vger.kernel.org> #3.12+ Signed-off-by: Yang Shi <yang@linaro.org> Patch applied as a fix for stable, basically returning back to the pre-3.12 behaviour. If there is a need for some more useful information here, it can be done as an additional patch, though without cc: sta

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:41 PM, Z Lim wrote: On Wed, Nov 18, 2015 at 1:07 PM, Shi, Yang wrote: On 11/18/2015 12:56 AM, Zi Shen Lim wrote: emit_a64_mov_i64(r3, size, ctx); - emit(A64_ADD_I(1, r4, fp, MAX_BPF_STACK), ctx); + emit(A64_SUB_I(1, r4, fp

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 12:56 AM, Zi Shen Lim wrote: During code review, I noticed we were passing a bad buffer pointer to bpf_load_pointer helper function called by jitted code. Point to the buffer allocated by JIT, so we don't silently corrupt other parts of the stack. Signed-off-by: Zi Shen Lim ---

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:55 AM, Andrew Morton wrote: On Wed, 18 Nov 2015 10:39:23 -0800 "Shi, Yang" wrote: On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup

Re: [PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:47 AM, Will Deacon wrote: Hello, On Wed, Nov 18, 2015 at 10:15:05AM -0800, Yang Shi wrote: As what Pavel Machek reported [1], some userspace applications depend on bogomips showed by /proc/cpuinfo. Although there is much less legacy impact on aarch64 than arm, but it does

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup writeback is not enabled, any derefs of mdtc variables should trigger warnings. Ugh... I don't know. Compiler

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:11 AM, Tejun Heo wrote: Hello, On Tue, Nov 17, 2015 at 03:38:55PM -0800, Andrew Morton wrote: --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space *mapping, for (;;) { unsigned

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:53 AM, Arnd Bergmann wrote: On Tuesday 17 November 2015 15:38:55 Andrew Morton wrote: On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi wrote: When building kernel with gcc 5.2, the below warning is raised: mm/page-writeback.c: In function 'balance_dirty_pages.isra.10':

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:53 AM, Arnd Bergmann wrote: On Tuesday 17 November 2015 15:38:55 Andrew Morton wrote: On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi <yang@linaro.org> wrote: When building kernel with gcc 5.2, the below warning is raised: mm/page-writeback.c: In fu

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:11 AM, Tejun Heo wrote: Hello, On Tue, Nov 17, 2015 at 03:38:55PM -0800, Andrew Morton wrote: --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space *mapping, for (;;) { unsigned

Re: [PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-18 Thread Shi, Yang
I won't re-tread that path this time around. I do, however, have some comments on the patch. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/cpuinfo.c | 5 + arch/arm64/kernel/smp.c | 7 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/a

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup writeback is not enabled, any derefs of mdtc variables should trigger warnings. Ugh... I don't know. Compiler

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:55 AM, Andrew Morton wrote: On Wed, 18 Nov 2015 10:39:23 -0800 "Shi, Yang" <yang@linaro.org> wrote: On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was st

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:41 PM, Z Lim wrote: On Wed, Nov 18, 2015 at 1:07 PM, Shi, Yang <yang@linaro.org> wrote: On 11/18/2015 12:56 AM, Zi Shen Lim wrote: emit_a64_mov_i64(r3, size, ctx); - emit(A64_ADD_I(1, r4, fp, MAX_BPF_STACK), ctx); +

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 12:56 AM, Zi Shen Lim wrote: During code review, I noticed we were passing a bad buffer pointer to bpf_load_pointer helper function called by jitted code. Point to the buffer allocated by JIT, so we don't silently corrupt other parts of the stack. Signed-off-by: Zi Shen Lim

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/16/2015 8:41 PM, Alexei Starovoitov wrote: On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. ... CC:

Re: [PATCH V3 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/13/2015 6:39 PM, Z Lim wrote: Yang, I noticed another thing... On Fri, Nov 13, 2015 at 10:09 AM, Yang Shi wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp

Re: [PATCH V3 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/13/2015 6:39 PM, Z Lim wrote: Yang, I noticed another thing... On Fri, Nov 13, 2015 at 10:09 AM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JI

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/16/2015 8:41 PM, Alexei Starovoitov wrote: On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct

Re: [PATCH 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-13 Thread Shi, Yang
On 11/12/2015 7:28 PM, Z Lim wrote: On Thu, Nov 12, 2015 at 1:57 PM, Yang Shi wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to

Re: [PATCH 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-13 Thread Shi, Yang
On 11/12/2015 7:28 PM, Z Lim wrote: On Thu, Nov 12, 2015 at 1:57 PM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp regist

Re: [PATCH 1/2] arm64: bpf: add 'store immediate' instruction

2015-11-12 Thread Shi, Yang
On 11/11/2015 4:39 AM, Will Deacon wrote: On Wed, Nov 11, 2015 at 12:12:56PM +, Will Deacon wrote: On Tue, Nov 10, 2015 at 06:45:39PM -0800, Z Lim wrote: On Tue, Nov 10, 2015 at 2:41 PM, Yang Shi wrote: aarch64 doesn't have native store immediate instruction, such operation Actually,

Re: [PATCH 1/2] arm64: bpf: add 'store immediate' instruction

2015-11-12 Thread Shi, Yang
On 11/11/2015 4:39 AM, Will Deacon wrote: On Wed, Nov 11, 2015 at 12:12:56PM +, Will Deacon wrote: On Tue, Nov 10, 2015 at 06:45:39PM -0800, Z Lim wrote: On Tue, Nov 10, 2015 at 2:41 PM, Yang Shi <yang@linaro.org> wrote: aarch64 doesn't have native store immediate instr

Re: [PATCH 2/2] arm64: bpf: add BPF XADD instruction

2015-11-10 Thread Shi, Yang
On 11/10/2015 4:08 PM, Eric Dumazet wrote: On Tue, 2015-11-10 at 14:41 -0800, Yang Shi wrote: aarch64 doesn't have native support for XADD instruction, implement it by the below instruction sequence: Load (dst + off) to a register Add src to it Store it back to (dst + off) Not really what is

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-10 Thread Shi, Yang
On 11/9/2015 12:00 PM, Z Lim wrote: On Mon, Nov 9, 2015 at 10:08 AM, Shi, Yang wrote: I added it to stay align with ARMv8 AAPCS to maintain the correct FP during function call. It makes us get correct stack backtrace. I think we'd better to keep compliant with ARMv8 AAPCS in BPF JIT prologue

Re: [V3 PATCH] arm64: remove redundant FRAME_POINTER kconfig option and force to select it

2015-11-10 Thread Shi, Yang
On 11/10/2015 2:37 AM, Catalin Marinas wrote: On Mon, Nov 09, 2015 at 10:09:55AM -0800, Yang Shi wrote: FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine it in arch/arm64/Kconfig.debug. Actually, the one defined in arm64 directory is never used. That's not true

Re: [V3 PATCH] arm64: remove redundant FRAME_POINTER kconfig option and force to select it

2015-11-10 Thread Shi, Yang
. Yang ARM64 depends on frame pointer to get correct stack backtrace and need FRAME_POINTER kconfig option enabled all the time. However, currect implementation makes it could be disabled, so force it to be selected by ARM64. Signed-off-by: Yang Shi <yang@linaro.org> Patch applied

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-10 Thread Shi, Yang
On 11/9/2015 12:00 PM, Z Lim wrote: On Mon, Nov 9, 2015 at 10:08 AM, Shi, Yang <yang@linaro.org> wrote: I added it to stay align with ARMv8 AAPCS to maintain the correct FP during function call. It makes us get correct stack backtrace. I think we'd better to keep compliant with ARMv8

Re: [PATCH 2/2] arm64: bpf: add BPF XADD instruction

2015-11-10 Thread Shi, Yang
On 11/10/2015 4:08 PM, Eric Dumazet wrote: On Tue, 2015-11-10 at 14:41 -0800, Yang Shi wrote: aarch64 doesn't have native support for XADD instruction, implement it by the below instruction sequence: Load (dst + off) to a register Add src to it Store it back to (dst + off) Not really what is

Re: [PATCH V2 0/2] arm64: cleanup FRAME_POINTER kconfig option and force to select it

2015-11-09 Thread Shi, Yang
On 11/9/2015 10:14 AM, Catalin Marinas wrote: On Mon, Nov 09, 2015 at 09:43:55AM -0800, Yang Shi wrote: According to the discussion on the mailing list, this version adds a new patch to force select FRAME_POINTER for ARM64. Change v2 --> v1: 1. Adds a new patch to force select FRAME_POINTER 2.

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-09 Thread Shi, Yang
On 11/8/2015 2:29 PM, Z Lim wrote: On Sat, Nov 7, 2015 at 6:27 PM, Alexei Starovoitov wrote: On Fri, Nov 06, 2015 at 09:36:17PM -0800, Yang Shi wrote: ARM64 JIT used FP (x29) as eBPF fp register, but FP is subjected to change during function call so it may cause the BPF prog stack base

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-09 Thread Shi, Yang
tion call stack | | +-+ low Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Thanks for tracking it down. That looks like fundamental bug in arm64

Re: [PATCH V2 0/2] arm64: cleanup FRAME_POINTER kconfig option and force to select it

2015-11-09 Thread Shi, Yang
On 11/9/2015 10:14 AM, Catalin Marinas wrote: On Mon, Nov 09, 2015 at 09:43:55AM -0800, Yang Shi wrote: According to the discussion on the mailing list, this version adds a new patch to force select FRAME_POINTER for ARM64. Change v2 --> v1: 1. Adds a new patch to force select FRAME_POINTER 2.

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-06 Thread Shi, Yang
Please ignore this one, forgot to cc to linux-arm-kernel list. Sorry for the inconvenience. Yang On 11/6/2015 9:34 PM, Yang Shi wrote: ARM64 JIT used FP (x29) as eBPF fp register, but FP is subjected to change during function call so it may cause the BPF prog stack base address change too.

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:51 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:39:07AM -0800, Shi, Yang wrote: On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one to disable FRAME_POINTERS (not sure it has any effect on the aarch64 gcc though). No, it doesn't. Actually

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 8:25 AM, Will Deacon wrote: On Fri, Nov 06, 2015 at 04:21:09PM +, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 12:50:02PM +, Mark Rutland wrote: On Fri, Nov 06, 2015 at 12:30:09PM +, Will Deacon wrote: On Wed, Nov 04, 2015 at 09:37:51AM -0800, Yang Shi wrote:

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-06 Thread Shi, Yang
all stack | | +-+ low Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> --- arch/arm64/net/bpf_jit_comp.c | 38 +++--- 1 file changed, 31 insertions(+), 7 dele

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 8:25 AM, Will Deacon wrote: On Fri, Nov 06, 2015 at 04:21:09PM +, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 12:50:02PM +, Mark Rutland wrote: On Fri, Nov 06, 2015 at 12:30:09PM +, Will Deacon wrote: On Wed, Nov 04, 2015 at 09:37:51AM -0800, Yang Shi wrote:

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one to disable FRAME_POINTERS (not sure it has any effect on the aarch64 gcc though). No, it doesn't. Actually

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:51 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:39:07AM -0800, Shi, Yang wrote: On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/4/2015 10:25 AM, Z Lim wrote: On Wed, Nov 4, 2015 at 10:21 AM, Shi, Yang wrote: On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim wrote: case BPF_ALU | BPF_DIV | BPF_X: case BPF_ALU64 | BPF_DIV | BPF_X

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim wrote: case BPF_ALU | BPF_DIV | BPF_X: case BPF_ALU64 | BPF_DIV | BPF_X: + { + const u8 r0 = bpf2a64[BPF_REG_0]; + + /* if (src == 0) return 0 */ +

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
t JIT/interpreter sets A and X to 0."). Reported-by: Shi, Yang Thanks for coming up with the fix promptly. s/Shi, Yang/Yang Shi Tested with the latest 4.3 kernel. Tested-by: Yang Shi Yang CC: Xi Wang CC: Alexei Starovoitov CC: Catalin Marinas CC: linux-arm-ker...@lists.infradead.org CC: li

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/4/2015 10:25 AM, Z Lim wrote: On Wed, Nov 4, 2015 at 10:21 AM, Shi, Yang <yang@linaro.org> wrote: On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim <zlim@gmail.com> wrote: case BPF_ALU | BPF_DIV | BPF_X: ca

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
t JIT/interpreter sets A and X to 0."). Reported-by: Shi, Yang <yang@linaro.org> Thanks for coming up with the fix promptly. s/Shi, Yang/Yang Shi Tested with the latest 4.3 kernel. Tested-by: Yang Shi <yang@linaro.org> Yang CC: Xi Wang <xi.w...@gmail.com> CC: Alexei St

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim wrote: case BPF_ALU | BPF_DIV | BPF_X: case BPF_ALU64 | BPF_DIV | BPF_X: + { + const u8 r0 = bpf2a64[BPF_REG_0]; + + /* if (src == 0)

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 9:24 AM, Steven Rostedt wrote: On Mon, 02 Nov 2015 09:12:29 -0800 "Shi, Yang" wrote: Yes, it is common practice for converting sleepable spin lock to raw spin lock in -rt to avoid scheduling in atomic context bug. Note, in a lot of cases we don't just convert spin_lo

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 10/31/2015 11:37 AM, Daniel Borkmann wrote: On 10/31/2015 02:47 PM, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700, Yang Shi wrote: When running bpf samples on rt kernel, it reports the below warning: BUG:

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 12:59 AM, Thomas Gleixner wrote: On Sun, 1 Nov 2015, Alexei Starovoitov wrote: On Sat, Oct 31, 2015 at 09:47:36AM -0400, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700, Yang Shi wrote: When running

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 10/31/2015 11:37 AM, Daniel Borkmann wrote: On 10/31/2015 02:47 PM, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700, Yang Shi wrote: When running bpf samples on rt kernel, it reports

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 12:59 AM, Thomas Gleixner wrote: On Sun, 1 Nov 2015, Alexei Starovoitov wrote: On Sat, Oct 31, 2015 at 09:47:36AM -0400, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700,

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 9:24 AM, Steven Rostedt wrote: On Mon, 02 Nov 2015 09:12:29 -0800 "Shi, Yang" <yang@linaro.org> wrote: Yes, it is common practice for converting sleepable spin lock to raw spin lock in -rt to avoid scheduling in atomic context bug. Note, in a lot of cas

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-05 Thread Shi, Yang
On 10/1/2015 3:15 PM, Shi, Yang wrote: On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi wrote: BUG: sleeping function called from invalid context

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-05 Thread Shi, Yang
On 10/1/2015 3:15 PM, Shi, Yang wrote: On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function

Re: [PATCH] perf: change samples type to unsigned long long

2015-10-02 Thread Shi, Yang
On 10/2/2015 12:10 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Oct 02, 2015 at 04:08:38PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Sep 29, 2015 at 02:49:43PM -0700, Yang Shi escreveu: When run "perf record -e", the number of samples showed up is wrong on some 32 bit systems, i.e.

Re: [PATCH] perf: change samples type to unsigned long long

2015-10-02 Thread Shi, Yang
On 10/2/2015 12:10 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Oct 02, 2015 at 04:08:38PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Sep 29, 2015 at 02:49:43PM -0700, Yang Shi escreveu: When run "perf record -e", the number of samples showed up is wrong on some 32 bit systems, i.e.

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi wrote: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi wrote: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917 in_atomic(): 0, irqs_disabled(): 128, pid: 342, name: perf 1 lock held by perf/342: #0:

Re: [PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 8:07 AM, Catalin Marinas wrote: On Wed, Sep 30, 2015 at 03:59:04PM -0700, Yang Shi wrote: diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index cebf786..eb520d0 100644 --- a/arch/arm64/kernel/debug-monitors.c +++

Re: [PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 8:07 AM, Catalin Marinas wrote: On Wed, Sep 30, 2015 at 03:59:04PM -0700, Yang Shi wrote: diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index cebf786..eb520d0 100644 --- a/arch/arm64/kernel/debug-monitors.c +++

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917 in_atomic(): 0, irqs_disabled(): 128, pid: 342, name: perf 1 lock held by perf/342

Re: [v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Shi, Yang
On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function called from invalid context at kernel/l

RE: [Patch 0/1]drm_irq: Introducing the irq_thread support

2012-09-05 Thread Shi, Yang A
[mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter Sent: Wednesday, September 05, 2012 9:27 PM To: Liu, Chuansheng Cc: 'linux-kernel@vger.kernel.org' (linux-kernel@vger.kernel.org); dri-de...@lists.freedesktop.org; alexander.deuc...@amd.com; airl...@redhat.com; Shi, Yang A Subject: Re

RE: [Patch 0/1]drm_irq: Introducing the irq_thread support

2012-09-05 Thread Shi, Yang A
[mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter Sent: Wednesday, September 05, 2012 9:27 PM To: Liu, Chuansheng Cc: 'linux-kernel@vger.kernel.org' (linux-kernel@vger.kernel.org); dri-de...@lists.freedesktop.org; alexander.deuc...@amd.com; airl...@redhat.com; Shi, Yang A Subject: Re

<    1   2   3