[PATCH v2 4/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization

2018-10-19 Thread Du Changbin
v/null 2>&1; \ sync'\ \ make -j8 >/dev/null Performance counter stats for 'make -j8' (5 runs): 233.574187771 seconds time elapsed ( +- 0.19% ) Signed-off-by: Du Changbin Acked-by: Steve

[PATCH v2 4/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization

2018-10-19 Thread Du Changbin
v/null 2>&1; \ sync'\ \ make -j8 >/dev/null Performance counter stats for 'make -j8' (5 runs): 233.574187771 seconds time elapsed ( +- 0.19% ) Signed-off-by: Du Changbin Acked-by: Steve

[PATCH v2 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-10-19 Thread Du Changbin
/fixmap.h:31: undefined reference to `__compiletime_assert_31' Makefile:1051: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- arch/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH v2 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-10-19 Thread Du Changbin
/fixmap.h:31: undefined reference to `__compiletime_assert_31' Makefile:1051: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- arch/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH v2 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-19 Thread Du Changbin
will allow the function tracer to trace more functions because it only traces functions that the compiler has not inlined. Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- Makefile | 6 ++ lib/Kconfig.debug | 17 + 2 files changed, 23 insertions(+)

[PATCH v2 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-19 Thread Du Changbin
will allow the function tracer to trace more functions because it only traces functions that the compiler has not inlined. Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- Makefile | 6 ++ lib/Kconfig.debug | 17 + 2 files changed, 23 insertions(+)

[PATCH v2 0/4] kernel hacking: GCC optimization for better debug experience (-Og)

2018-10-19 Thread Du Changbin
233.574187771 seconds time elapsed ( +- 0.19% ) Du Changbin (4): x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations ARM: mm: fix build error in fi

[PATCH v2 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif

2018-10-19 Thread Du Changbin
The level4_kernel_pgt is only defined when X86_5LEVEL is enabled. So surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif to make code correct. Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- arch/x86/include/asm/pgtable_64.h | 2 ++ arch/x86/kernel/head64.c

[PATCH v2 0/4] kernel hacking: GCC optimization for better debug experience (-Og)

2018-10-19 Thread Du Changbin
233.574187771 seconds time elapsed ( +- 0.19% ) Du Changbin (4): x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations ARM: mm: fix build error in fi

[PATCH v2 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif

2018-10-19 Thread Du Changbin
The level4_kernel_pgt is only defined when X86_5LEVEL is enabled. So surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif to make code correct. Signed-off-by: Du Changbin Acked-by: Steven Rostedt (VMware) --- arch/x86/include/asm/pgtable_64.h | 2 ++ arch/x86/kernel/head64.c

Re: [PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
On Thu, Oct 18, 2018 at 12:59:48PM -0400, Steven Rostedt wrote: > On Thu, 18 Oct 2018 16:25:46 + > Du Changbin wrote: > > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will prevent the co

Re: [PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
On Thu, Oct 18, 2018 at 12:59:48PM -0400, Steven Rostedt wrote: > On Thu, 18 Oct 2018 16:25:46 + > Du Changbin wrote: > > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will prevent the co

Re: [PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
On Thu, Oct 18, 2018 at 05:57:56PM +0100, Robin Murphy wrote: > On 18/10/18 17:25, Du Changbin wrote: > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will prevent the compiler from optimizing the

Re: [PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
On Thu, Oct 18, 2018 at 05:57:56PM +0100, Robin Murphy wrote: > On 18/10/18 17:25, Du Changbin wrote: > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will prevent the compiler from optimizing the

[PATCH 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-10-18 Thread Du Changbin
From: Changbin Du With '-Og' optimization level, GCC would not optimize a count for a loop as a constant value. But BUILD_BUG_ON() only accept compile-time constant values. Let's use __fix_to_virt() to avoid the error. arch/arm/mm/mmu.o: In function `fix_to_virt':

[PATCH 3/4] ARM: mm: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-10-18 Thread Du Changbin
From: Changbin Du With '-Og' optimization level, GCC would not optimize a count for a loop as a constant value. But BUILD_BUG_ON() only accept compile-time constant values. Let's use __fix_to_virt() to avoid the error. arch/arm/mm/mmu.o: In function `fix_to_virt':

[PATCH 4/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization

2018-10-18 Thread Du Changbin
From: Changbin Du This will apply GCC '-Og' optimization level which is supported since GCC 4.8. This optimization level offers a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is similar to '-O1' while perferring to keep debug ability

[PATCH 4/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization

2018-10-18 Thread Du Changbin
From: Changbin Du This will apply GCC '-Og' optimization level which is supported since GCC 4.8. This optimization level offers a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is similar to '-O1' while perferring to keep debug ability

[PATCH 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif

2018-10-18 Thread Du Changbin
From: Changbin Du The level4_kernel_pgt is only defined when X86_5LEVEL is enabled. So surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif to make code correct. Signed-off-by: Changbin Du Acked-by: Steven Rostedt (VMware) --- arch/x86/include/asm/pgtable_64.h | 2 ++

[PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
From: Changbin Du This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting this option will prevent the compiler from optimizing the kernel by auto-inlining functions not marked with the inline keyword. With this option, only functions explicitly marked with "inline" will be

[PATCH 0/4] kernel hacking: GCC optimization for better debug experience (-Og)

2018-10-18 Thread Du Changbin
Hi all, I have posted this series several months ago but interrupted by personal affairs. Now I get time to complete this task. Thanks for all of the reviewers. I know some kernel developers was searching for a method to dissable GCC optimizations, probably they want to apply GCC '-O0' option.

[PATCH 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif

2018-10-18 Thread Du Changbin
From: Changbin Du The level4_kernel_pgt is only defined when X86_5LEVEL is enabled. So surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif to make code correct. Signed-off-by: Changbin Du Acked-by: Steven Rostedt (VMware) --- arch/x86/include/asm/pgtable_64.h | 2 ++

[PATCH 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-10-18 Thread Du Changbin
From: Changbin Du This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting this option will prevent the compiler from optimizing the kernel by auto-inlining functions not marked with the inline keyword. With this option, only functions explicitly marked with "inline" will be

[PATCH 0/4] kernel hacking: GCC optimization for better debug experience (-Og)

2018-10-18 Thread Du Changbin
Hi all, I have posted this series several months ago but interrupted by personal affairs. Now I get time to complete this task. Thanks for all of the reviewers. I know some kernel developers was searching for a method to dissable GCC optimizations, probably they want to apply GCC '-O0' option.

[PATCH v3] scripts/gdb: fix lx-version

2018-10-17 Thread Du Changbin
1 21:43:30 CST 2018 Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux

[PATCH v3] scripts/gdb: fix lx-version

2018-10-17 Thread Du Changbin
1 21:43:30 CST 2018 Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux

Re: [PATCH] PCI: make pci_size() return real size

2018-10-17 Thread Du Changbin
Hi Bjorn. Have you checked this little improvment? The idea here is that this is not a hotspot, so readbility matters than trick. Thanks! On Sat, Oct 13, 2018 at 08:49:19AM +0800, changbin...@gmail.com wrote: > From: Du Changbin > > Currently, the pci_size() function actually retur

Re: [PATCH] PCI: make pci_size() return real size

2018-10-17 Thread Du Changbin
Hi Bjorn. Have you checked this little improvment? The idea here is that this is not a hotspot, so readbility matters than trick. Thanks! On Sat, Oct 13, 2018 at 08:49:19AM +0800, changbin...@gmail.com wrote: > From: Du Changbin > > Currently, the pci_size() function actually retur

[PATCH v2] scripts/gdb: fix lx-version for gdb 7.3-

2018-10-17 Thread Du Changbin
7.4 seems to be no such issue. Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts

[PATCH v2] scripts/gdb: fix lx-version for gdb 7.3-

2018-10-17 Thread Du Changbin
7.4 seems to be no such issue. Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts

[PATCH] scripts/gdb: fix lx-version for gdb 7.3-

2018-10-16 Thread Du Changbin
seems to be no such issue. Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux

[PATCH] scripts/gdb: fix lx-version for gdb 7.3-

2018-10-16 Thread Du Changbin
seems to be no such issue. Signed-off-by: Du Changbin --- scripts/gdb/linux/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 086d27223c0c..0aebd7565b03 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux

Re: kernel BUG at arch/x86/kvm/x86.c:LINE! (2)

2018-10-10 Thread Du Changbin
ff0 DR7: 0400 --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkal...@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#bug-status-trackin

Re: kernel BUG at arch/x86/kvm/x86.c:LINE! (2)

2018-10-10 Thread Du Changbin
ff0 DR7: 0400 --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkal...@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#bug-status-trackin

Re: [PATCH v5 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-06-07 Thread Du, Changbin
Hi, On Thu, Jun 07, 2018 at 09:47:18AM +0530, Viresh Kumar wrote: > +Greg/Alex, > > @Fegguang/build-bot: I do see mention of Greg and /me in your initial email's > body saying TO: Viresh, CC: Greg, but I don't see any of us getting cc'd in > your > email. Bug ? > > On 06-06-18, 14:26, Steven

Re: [PATCH v5 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-06-07 Thread Du, Changbin
Hi, On Thu, Jun 07, 2018 at 09:47:18AM +0530, Viresh Kumar wrote: > +Greg/Alex, > > @Fegguang/build-bot: I do see mention of Greg and /me in your initial email's > body saying TO: Viresh, CC: Greg, but I don't see any of us getting cc'd in > your > email. Bug ? > > On 06-06-18, 14:26, Steven

Re: [PATCH] scripts/faddr2line: show the code context

2018-06-03 Thread Du, Changbin
On Tue, May 29, 2018 at 06:03:32PM +0200, Peter Zijlstra wrote: > On Mon, Mar 19, 2018 at 03:23:25PM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > Inspired by gdb command 'list', show the code context of target lines. > > Here is a example: > > > > $ scripts/faddr2line

Re: [PATCH] scripts/faddr2line: show the code context

2018-06-03 Thread Du, Changbin
On Tue, May 29, 2018 at 06:03:32PM +0200, Peter Zijlstra wrote: > On Mon, Mar 19, 2018 at 03:23:25PM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > Inspired by gdb command 'list', show the code context of target lines. > > Here is a example: > > > > $ scripts/faddr2line

Re: [PATCH] scripts/faddr2line: show the code context

2018-06-03 Thread Du, Changbin
On Wed, May 30, 2018 at 08:01:48AM +1000, NeilBrown wrote: > On Tue, May 29 2018, Peter Zijlstra wrote: > > > On Tue, May 29, 2018 at 12:07:10PM -0500, Josh Poimboeuf wrote: > >> Yeah, this change really should have been an optional arg. It hurt the > >> readability and compactness of the

Re: [PATCH] scripts/faddr2line: show the code context

2018-06-03 Thread Du, Changbin
On Wed, May 30, 2018 at 08:01:48AM +1000, NeilBrown wrote: > On Tue, May 29 2018, Peter Zijlstra wrote: > > > On Tue, May 29, 2018 at 12:07:10PM -0500, Josh Poimboeuf wrote: > >> Yeah, this change really should have been an optional arg. It hurt the > >> readability and compactness of the

Re: [PATCH v4 4/4] asm-generic: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-05-10 Thread Du, Changbin
On Wed, May 09, 2018 at 08:52:24AM -0400, Steven Rostedt wrote: > On Wed, 9 May 2018 16:43:16 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du <changbin...@intel.com> > > > > With '-Og' optimization level, GCC would not optimize a count f

Re: [PATCH v4 4/4] asm-generic: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING

2018-05-10 Thread Du, Changbin
On Wed, May 09, 2018 at 08:52:24AM -0400, Steven Rostedt wrote: > On Wed, 9 May 2018 16:43:16 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > With '-Og' optimization level, GCC would not optimize a count for a loop > > as a constant value. But BUILD_BUG_ON() only accept

Re: [PATCH v3 2/5] regulator: add dummy function of_find_regulator_by_node

2018-05-09 Thread Du, Changbin
On Wed, May 09, 2018 at 05:21:14PM +0900, Mark Brown wrote: > On Sun, May 06, 2018 at 08:20:13AM +0800, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > If device tree is not enabled, of_find_regulator_by_node() should have > > a

Re: [PATCH v3 2/5] regulator: add dummy function of_find_regulator_by_node

2018-05-09 Thread Du, Changbin
On Wed, May 09, 2018 at 05:21:14PM +0900, Mark Brown wrote: > On Sun, May 06, 2018 at 08:20:13AM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > If device tree is not enabled, of_find_regulator_by_node() should have > > a dummy function since the function call is still there. >

Re: [PATCH v2 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-05 Thread Du, Changbin
On Thu, May 03, 2018 at 10:28:23AM -0400, Steven Rostedt wrote: > On Thu, 3 May 2018 21:45:46 +0800 > "Du, Changbin" <changbin...@intel.com> wrote: > > > > With that gcc comment, I still think CONFIG_OPTIMIZE_DEBUG is more > > > inl

Re: [PATCH v2 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-05 Thread Du, Changbin
On Thu, May 03, 2018 at 10:28:23AM -0400, Steven Rostedt wrote: > On Thu, 3 May 2018 21:45:46 +0800 > "Du, Changbin" wrote: > > > > With that gcc comment, I still think CONFIG_OPTIMIZE_DEBUG is more > > > inline with what it is and understandable than > &g

Re: [PATCH v2 0/5] kernel hacking: GCC optimization for debug experience (-Og)

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 03:56:31PM +0100, Daniel Thompson wrote: > On Wed, May 02, 2018 at 09:44:55PM +0800, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > Hi all, > > I know some kernel developers was searching for a method

Re: [PATCH v2 0/5] kernel hacking: GCC optimization for debug experience (-Og)

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 03:56:31PM +0100, Daniel Thompson wrote: > On Wed, May 02, 2018 at 09:44:55PM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > Hi all, > > I know some kernel developers was searching for a method to dissable GCC > > optimizations, probably they want to

Re: [PATCH v2 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 09:19:56PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 13:45:58 -0700 > Andrew Morton wrote: > > > On Wed, 2 May 2018 10:17:07 -0400 Steven Rostedt > > wrote: > > > > > > Comparison of vmlinux size: a bit smaller. >

Re: [PATCH v2 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 09:19:56PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 13:45:58 -0700 > Andrew Morton wrote: > > > On Wed, 2 May 2018 10:17:07 -0400 Steven Rostedt > > wrote: > > > > > > Comparison of vmlinux size: a bit smaller. > > > > > > > > w/o CONFIG_DEBUG_EXPERIENCE

Re: [PATCH v2 5/5] asm-generic: fix build error in fix_to_virt with CONFIG_DEBUG_EXPERIENCE

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 10:19:30AM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 21:45:00 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du <changbin...@intel.com> > > > > With '-Og' optimization level, GCC would not optimize a count f

Re: [PATCH v2 5/5] asm-generic: fix build error in fix_to_virt with CONFIG_DEBUG_EXPERIENCE

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 10:19:30AM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 21:45:00 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > With '-Og' optimization level, GCC would not optimize a count for a loop > > as a constant value. But BUILD_BUG_ON() only accept

Re: [PATCH v2 3/5] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 04:27:47PM -0400, Arnd Bergmann wrote: > On Wed, May 2, 2018 at 9:44 AM, <changbin...@intel.com> wrote: > > From: Changbin Du <changbin...@intel.com> > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > thi

Re: [PATCH v2 3/5] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

2018-05-03 Thread Du, Changbin
On Wed, May 02, 2018 at 04:27:47PM -0400, Arnd Bergmann wrote: > On Wed, May 2, 2018 at 9:44 AM, wrote: > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will prevent the compiler from optimizing the kernel by > > auto-inlining

Re: [PATCH 3/5] kernel hacking: new config NO_AUTO_INLINE to disable compiler atuo-inline optimizations

2018-05-02 Thread Du, Changbin
On Tue, May 01, 2018 at 10:54:20AM -0400, Steven Rostedt wrote: > On Tue, 1 May 2018 21:00:12 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du <changbin...@intel.com> > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting &

Re: [PATCH 3/5] kernel hacking: new config NO_AUTO_INLINE to disable compiler atuo-inline optimizations

2018-05-02 Thread Du, Changbin
On Tue, May 01, 2018 at 10:54:20AM -0400, Steven Rostedt wrote: > On Tue, 1 May 2018 21:00:12 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > This patch add a new kernel hacking option NO_AUTO_INLINE. Selecting > > this option will make compiler not auto-inline kernel

Re: [PATCH 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-02 Thread Du, Changbin
On Tue, May 01, 2018 at 08:25:27AM -0700, Randy Dunlap wrote: > Good morning. > > On 05/01/2018 06:00 AM, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > > > Signed-off-by: Changbin Du <changbin...@intel.com> &

Re: [PATCH 4/5] kernel hacking: new config DEBUG_EXPERIENCE to apply GCC -Og optimization

2018-05-02 Thread Du, Changbin
On Tue, May 01, 2018 at 08:25:27AM -0700, Randy Dunlap wrote: > Good morning. > > On 05/01/2018 06:00 AM, changbin...@intel.com wrote: > > From: Changbin Du > > > > > > Signed-off-by: Changbin Du > > --- > > Makefile | 4 > > include/linux/compiler-gcc.h | 2 +- > >

Re: [PATCH 2/5] regulator: add dummy of_find_regulator_by_node

2018-05-02 Thread Du, Changbin
On Wed, May 02, 2018 at 05:40:36AM +0900, Mark Brown wrote: > On Tue, May 01, 2018 at 09:00:11PM +0800, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > If device tree is not enabled, of_find_regulator_by_node() should have > > a

Re: [PATCH 2/5] regulator: add dummy of_find_regulator_by_node

2018-05-02 Thread Du, Changbin
On Wed, May 02, 2018 at 05:40:36AM +0900, Mark Brown wrote: > On Tue, May 01, 2018 at 09:00:11PM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > If device tree is not enabled, of_find_regulator_by_node() should have > > a dummy function since the function call is still there. >

Re: [PATCH 0/5] kernel hacking: GCC optimization for debug experience (-Og)

2018-05-02 Thread Du, Changbin
On Wed, May 02, 2018 at 09:33:15AM +0200, Ingo Molnar wrote: > > * changbin...@intel.com wrote: > > > Comparison of system performance: a bit drop. > > > > w/o CONFIG_DEBUG_EXPERIENCE > > $ time make -j4 > > real6m43.619s > > user19m5.160s > >

Re: [PATCH 0/5] kernel hacking: GCC optimization for debug experience (-Og)

2018-05-02 Thread Du, Changbin
On Wed, May 02, 2018 at 09:33:15AM +0200, Ingo Molnar wrote: > > * changbin...@intel.com wrote: > > > Comparison of system performance: a bit drop. > > > > w/o CONFIG_DEBUG_EXPERIENCE > > $ time make -j4 > > real6m43.619s > > user19m5.160s > > sys 2m20.287s > >

Re: [PATCH] iommu/vt-d: fix shift-out-of-bounds in bug checking

2018-04-26 Thread Du, Changbin
Hello, any reviewer? Thanks! On Fri, Apr 20, 2018 at 01:29:55PM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > It allows to flush more than 4GB of device TLBs. So the mask should be > 64bit wide. UBSAN captured this fault as below.

Re: [PATCH] iommu/vt-d: fix shift-out-of-bounds in bug checking

2018-04-26 Thread Du, Changbin
Hello, any reviewer? Thanks! On Fri, Apr 20, 2018 at 01:29:55PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > It allows to flush more than 4GB of device TLBs. So the mask should be > 64bit wide. UBSAN captured this fault as below. > > [3.760024] >

Re: [PATCH] Documentation: fix reST markup error in driver-api/usb/typec.rst

2018-04-08 Thread Du, Changbin
On Sun, Apr 08, 2018 at 09:19:58AM +0200, Greg KH wrote: > On Sun, Apr 08, 2018 at 10:47:12AM +0800, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > There is an format error in driver-api/usb/typec.rst that breaks sphinx > > do

Re: [PATCH] Documentation: fix reST markup error in driver-api/usb/typec.rst

2018-04-08 Thread Du, Changbin
On Sun, Apr 08, 2018 at 09:19:58AM +0200, Greg KH wrote: > On Sun, Apr 08, 2018 at 10:47:12AM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > There is an format error in driver-api/usb/typec.rst that breaks sphinx > > docs building. > > > > reST markup error: > >

Re: [PATCH] perf trace: remove redundant ')'

2018-04-03 Thread Du, Changbin
On Tue, Apr 03, 2018 at 04:19:07PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 28, 2018 at 03:26:31PM +0800, Du, Changbin escreveu: > > Hi Arnaldo, > > Just a kind reminder. Hope you didn't forget this. > > Ok, applied. > > - Arnaldo > Got it, thanks!

Re: [PATCH] perf trace: remove redundant ')'

2018-04-03 Thread Du, Changbin
On Tue, Apr 03, 2018 at 04:19:07PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 28, 2018 at 03:26:31PM +0800, Du, Changbin escreveu: > > Hi Arnaldo, > > Just a kind reminder. Hope you didn't forget this. > > Ok, applied. > > - Arnaldo > Got it, thanks!

Re: [PATCH] perf trace: remove redundant ')'

2018-03-28 Thread Du, Changbin
Hi Arnaldo, Just a kind reminder. Hope you didn't forget this. On Fri, Mar 16, 2018 at 09:50:45AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 16, 2018 at 03:51:09PM +0800, Du, Changbin escreveu: > > Hi Arnaldo, How about this simple one? Thanks. > > > > On Tue,

Re: [PATCH] perf trace: remove redundant ')'

2018-03-28 Thread Du, Changbin
Hi Arnaldo, Just a kind reminder. Hope you didn't forget this. On Fri, Mar 16, 2018 at 09:50:45AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Mar 16, 2018 at 03:51:09PM +0800, Du, Changbin escreveu: > > Hi Arnaldo, How about this simple one? Thanks. > > > > On Tue,

Re: [PATCH v2 1/4] selftests/Makefile: append a slash to env variable OUTPUT

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 03:19:26PM -0600, Shuah Khan wrote: > On 03/26/2018 09:11 PM, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > The tools/build/Makefile.build use 'OUTPUT' variable as below example: > > objprefix

Re: [PATCH v2 1/4] selftests/Makefile: append a slash to env variable OUTPUT

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 03:19:26PM -0600, Shuah Khan wrote: > On 03/26/2018 09:11 PM, changbin...@intel.com wrote: > > From: Changbin Du > > > > The tools/build/Makefile.build use 'OUTPUT' variable as below example: > > objprefix:= $(subst ./,,$(OUTPUT)$(dir)/) > > > > So it requires the

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 11:52:27AM +0200, Daniel Borkmann wrote: > On 03/27/2018 11:00 AM, Du, Changbin wrote: > > On Tue, Mar 27, 2018 at 10:52:57AM +0200, Daniel Borkmann wrote: > >> On 03/27/2018 05:06 AM, Du, Changbin wrote: > >>> On Mon, Mar 26, 2018 at 08:02:

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 11:52:27AM +0200, Daniel Borkmann wrote: > On 03/27/2018 11:00 AM, Du, Changbin wrote: > > On Tue, Mar 27, 2018 at 10:52:57AM +0200, Daniel Borkmann wrote: > >> On 03/27/2018 05:06 AM, Du, Changbin wrote: > >>> On Mon, Mar 26, 2018 at 08:02:

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 10:52:57AM +0200, Daniel Borkmann wrote: > On 03/27/2018 05:06 AM, Du, Changbin wrote: > > On Mon, Mar 26, 2018 at 08:02:30PM -0700, Alexei Starovoitov wrote: > >> On Tue, Mar 27, 2018 at 10:20:10AM +0800, Du, Changbin wrote: > >>> On Mon, Ma

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-27 Thread Du, Changbin
On Tue, Mar 27, 2018 at 10:52:57AM +0200, Daniel Borkmann wrote: > On 03/27/2018 05:06 AM, Du, Changbin wrote: > > On Mon, Mar 26, 2018 at 08:02:30PM -0700, Alexei Starovoitov wrote: > >> On Tue, Mar 27, 2018 at 10:20:10AM +0800, Du, Changbin wrote: > >>> On Mon, Ma

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
On Mon, Mar 26, 2018 at 08:02:30PM -0700, Alexei Starovoitov wrote: > On Tue, Mar 27, 2018 at 10:20:10AM +0800, Du, Changbin wrote: > > On Mon, Mar 26, 2018 at 07:55:13AM -0700, Alexei Starovoitov wrote: > > > On Mon, Mar 26, 2018 at 05:23:28PM +0800, changbin...@intel.com wro

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
On Mon, Mar 26, 2018 at 08:02:30PM -0700, Alexei Starovoitov wrote: > On Tue, Mar 27, 2018 at 10:20:10AM +0800, Du, Changbin wrote: > > On Mon, Mar 26, 2018 at 07:55:13AM -0700, Alexei Starovoitov wrote: > > > On Mon, Mar 26, 2018 at 05:23:28PM +0800, changbin...@intel.com wro

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
800, changbin...@intel.com wrote: > > From: Changbin Du <changbin...@intel.com> > > > > This patch fixed below errors of missing head files. > > > > tools/testing/selftests$ make > > ... > > clang -I. -I./include/uapi -I../../../include/uapi > > -

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
Hi Starovoitov, This one does have the issue you mentioned. [PATCH 2/4] selftests/gpio: fix paths in Makefile And can be fixed by: --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +OUTPUT ?= $(shell pwd)

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
On Mon, Mar 26, 2018 at 07:55:13AM -0700, Alexei Starovoitov wrote: > On Mon, Mar 26, 2018 at 05:23:28PM +0800, changbin...@intel.com wrote: > > Signed-off-by: Changbin Du <changbin...@intel.com> > > --- > > tools/testing/selftests/bpf/Makefile | 5 +++-- > > 1

Re: [PATCH 4/4] selftests/bpf: fix compiling errors

2018-03-26 Thread Du, Changbin
On Mon, Mar 26, 2018 at 07:55:13AM -0700, Alexei Starovoitov wrote: > On Mon, Mar 26, 2018 at 05:23:28PM +0800, changbin...@intel.com wrote: > > Signed-off-by: Changbin Du > > --- > > tools/testing/selftests/bpf/Makefile | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > >

Re: [PATCH] perf trace: remove redundant ')'

2018-03-16 Thread Du, Changbin
Hi Arnaldo, How about this simple one? Thanks. On Tue, Mar 13, 2018 at 06:40:01PM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > There is a redundant ')' at the tail of each event. So remove it. > $ sudo perf trace --no-syscalls -e 'kmem:

Re: [PATCH] perf trace: remove redundant ')'

2018-03-16 Thread Du, Changbin
Hi Arnaldo, How about this simple one? Thanks. On Tue, Mar 13, 2018 at 06:40:01PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > There is a redundant ')' at the tail of each event. So remove it. > $ sudo perf trace --no-syscalls -e 'kmem:*' -a >899.342

[Q] How does linux kernel lockdep record lock-class dependency?

2018-03-15 Thread Du, Changbin
Hello everyone, I got a warning as below which is a AB-BA deadlock issue. But I don't understand how the 'existing dependency' happened. It looks like: kvm_read_guest() held (>mmap_sem), then reading userspace memory (which is not ready yet) caused page_fault() invoked, then in i915_gem_fault()

[Q] How does linux kernel lockdep record lock-class dependency?

2018-03-15 Thread Du, Changbin
Hello everyone, I got a warning as below which is a AB-BA deadlock issue. But I don't understand how the 'existing dependency' happened. It looks like: kvm_read_guest() held (>mmap_sem), then reading userspace memory (which is not ready yet) caused page_fault() invoked, then in i915_gem_fault()

Re: [PATCH 00/17] Include linux trace docs to Sphinx TOC tree

2018-03-07 Thread Du, Changbin
On Wed, Mar 07, 2018 at 10:46:49AM -0700, Jonathan Corbet wrote: > On Tue, 27 Feb 2018 17:43:37 -0500 > Steven Rostedt <rost...@goodmis.org> wrote: > > > On Tue, 27 Feb 2018 17:34:22 +0800 > > "Du, Changbin" <changbin...@intel.com> wrote: > >

Re: [PATCH 00/17] Include linux trace docs to Sphinx TOC tree

2018-03-07 Thread Du, Changbin
On Wed, Mar 07, 2018 at 10:46:49AM -0700, Jonathan Corbet wrote: > On Tue, 27 Feb 2018 17:43:37 -0500 > Steven Rostedt wrote: > > > On Tue, 27 Feb 2018 17:34:22 +0800 > > "Du, Changbin" wrote: > > > > > Ten days past, will you accept this

Re: [PATCH v2 0/2] perf sched map: re-annotate shortname if thread comm changed

2018-03-06 Thread Du, Changbin
On Tue, Mar 06, 2018 at 11:17:07AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 06, 2018 at 08:53:02AM +0100, Jiri Olsa escreveu: > > On Tue, Mar 06, 2018 at 11:37:35AM +0800, changbin...@intel.com wrote: > > > From: Changbin Du <changbin...@intel.com> > &

Re: [PATCH v2 0/2] perf sched map: re-annotate shortname if thread comm changed

2018-03-06 Thread Du, Changbin
On Tue, Mar 06, 2018 at 11:17:07AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 06, 2018 at 08:53:02AM +0100, Jiri Olsa escreveu: > > On Tue, Mar 06, 2018 at 11:37:35AM +0800, changbin...@intel.com wrote: > > > From: Changbin Du > > > > > > v2: > > > o add a patch to move

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-05 Thread Du, Changbin
I just done final version, please check v2. Thanks for your comments! On Mon, Mar 05, 2018 at 11:37:54PM +0100, Jiri Olsa wrote: > On Mon, Mar 05, 2018 at 03:11:36PM +0800, Du, Changbin wrote: > > SNIP > > > > > on the other hand it's simple enough and looks > > &

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-05 Thread Du, Changbin
I just done final version, please check v2. Thanks for your comments! On Mon, Mar 05, 2018 at 11:37:54PM +0100, Jiri Olsa wrote: > On Mon, Mar 05, 2018 at 03:11:36PM +0800, Du, Changbin wrote: > > SNIP > > > > > on the other hand it's simple enough and looks > > &

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-04 Thread Du, Changbin
On Fri, Mar 02, 2018 at 11:43:12AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 23, 2018 at 07:40:40PM +0800, changbin...@intel.com escreveu: > > From: Changbin Du <changbin...@intel.com> > > > > This is to show the real name of thread that created via fork-

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-04 Thread Du, Changbin
On Fri, Mar 02, 2018 at 11:43:12AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 23, 2018 at 07:40:40PM +0800, changbin...@intel.com escreveu: > > From: Changbin Du > > > > This is to show the real name of thread that created via fork-exec. > > See below example for shortname *A0*. > >

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-04 Thread Du, Changbin
Hi, On Fri, Mar 02, 2018 at 11:47:32PM +0900, Namhyung Kim wrote: > Hi, > > On Fri, Mar 02, 2018 at 12:38:45PM +0100, Jiri Olsa wrote: > > On Fri, Mar 02, 2018 at 06:52:54PM +0800, Du, Changbin wrote: > > > Hello, any comment? > > > > sry, overlooked this

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-04 Thread Du, Changbin
Hi, On Fri, Mar 02, 2018 at 11:47:32PM +0900, Namhyung Kim wrote: > Hi, > > On Fri, Mar 02, 2018 at 12:38:45PM +0100, Jiri Olsa wrote: > > On Fri, Mar 02, 2018 at 06:52:54PM +0800, Du, Changbin wrote: > > > Hello, any comment? > > > > sry, overlooked this

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-02 Thread Du, Changbin
Hello, any comment? On Fri, Feb 23, 2018 at 07:40:40PM +0800, changbin...@intel.com wrote: > From: Changbin Du <changbin...@intel.com> > > This is to show the real name of thread that created via fork-exec. > See below example for shortname *A0*. > > $ sudo ./perf sched

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-02 Thread Du, Changbin
Hello, any comment? On Fri, Feb 23, 2018 at 07:40:40PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > This is to show the real name of thread that created via fork-exec. > See below example for shortname *A0*. > > $ sudo ./perf sched map > *A0 80393.050639 secs A0

Re: [PATCH v2] tracing/power: Polish the tracepoints cpu_idle and cpu_frequency

2018-03-02 Thread Du, Changbin
On Fri, Mar 02, 2018 at 11:39:16AM +0100, Rafael J. Wysocki wrote: > On 3/2/2018 11:15 AM, Du, Changbin wrote: > > On Fri, Mar 02, 2018 at 11:18:10AM +0100, Rafael J. Wysocki wrote: > > > On Fri, Mar 2, 2018 at 10:41 AM, Du, Changbin <changbin...@intel.com> > > >

Re: [PATCH v2] tracing/power: Polish the tracepoints cpu_idle and cpu_frequency

2018-03-02 Thread Du, Changbin
On Fri, Mar 02, 2018 at 11:39:16AM +0100, Rafael J. Wysocki wrote: > On 3/2/2018 11:15 AM, Du, Changbin wrote: > > On Fri, Mar 02, 2018 at 11:18:10AM +0100, Rafael J. Wysocki wrote: > > > On Fri, Mar 2, 2018 at 10:41 AM, Du, Changbin > > > wrote: > > >

  1   2   3   4   5   >