[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 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 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 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 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] 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 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 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: 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

[PATCH] dynamic_debug: add wildcard support to filter files/functions/modules

2013-07-25 Thread Du, Changbin
From: "Du, Changbin" This patch add wildcard '*'(matches zero or more characters) and '?' (matches one character) support when qurying debug flags. Now we can open debug messages using keywords. eg: 1. open debug logs in all usb drivers echo "file drivers/usb/* +p" >

[PATCH v3] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-29 Thread Du, Changbin
From: "Du, Changbin" This patch add wildcard '*'(matches zero or more characters) and '?' (matches one character) support when qurying debug flags. Now we can open debug messages using keywords. eg: 1. open debug logs in all usb drivers echo "file drivers/usb/* +p" >

[PATCH v4 1/2] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-30 Thread Du, Changbin
From: "Du, Changbin" This patch add wildcard '*'(matches zero or more characters) and '?' (matches one character) support when qurying debug flags. Now we can open debug messages using keywords. eg: 1. open debug logs in all usb drivers echo "file drivers/usb/* +p" >

[PATCH v4 2/2] dynamic-debug-howto.txt: update since new wildcard support

2013-10-30 Thread Du, Changbin
From: "Du, Changbin" Add the usage of using new feature wildcard support. Signed-off-by: Du, Changbin --- Documentation/dynamic-debug-howto.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto

[PATCH v5 0/3] add wildcard support for dynamic debug

2013-11-16 Thread Du, Changbin
From: "Du, Changbin" These patches are to make it easier to filter kernel debug logs which we want. Whith wildcard support, below command can enable all usb debug logs: #echo "file drivers/usb/* +p" > /dynamic_debug/control This patch only enables two wildcard: '*'

[PATCH v5 1/3] lib/parser.c: add match_wildcard function

2013-11-16 Thread Du, Changbin
From: "Du, Changbin" match_wildcard function is a simple implementation of wildcard matching algorithm. It only supports two usual wildcardes: '*' - matches zero or more characters '?' - matches one character This algorithm is safe since it's of non-recursion. Signed-

[PATCH v5 2/3] dynamic_debug: add wildcard support to filter files/functions/modules

2013-11-16 Thread Du, Changbin
From: "Du, Changbin" Add wildcard '*'(matches zero or more characters) and '?' (matches one character) support when qurying debug flags. Now we can open debug messages using keywords. eg: 1. open debug logs in all usb drivers echo "file drivers/usb/* +p" > /dynamic

[PATCH v5 3/3] dynamic-debug-howto.txt: update since new wildcard support

2013-11-16 Thread Du, Changbin
From: "Du, Changbin" Add the usage of using new feature wildcard support. Signed-off-by: Du, Changbin --- Documentation/dynamic-debug-howto.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto

[PATCH v2] dynamic_debug: add wildcard support to filter files/functions/modules

2013-10-28 Thread Du, Changbin
From: "Du, Changbin" This patch add wildcard '*'(matches zero or more characters) and '?' (matches one character) support when qurying debug flags. Now we can open debug messages using keywords. eg: 1. open debug logs in all usb drivers echo "file drivers/usb/* +p" >

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

2018-03-02 Thread Du, Changbin
> >> That rather isn't the case if negative values are ever passed to the > >> tracepoint, right? > >> > > yes. > >> Which seems to be the reason why you want to make this change, isn't it? > >> > > yes, to improve readability. > > > >> So maybe fix the code using the tracepoint(s) to avoid

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:18:10AM +0100, Rafael J. Wysocki wrote: > On Fri, Mar 2, 2018 at 10:41 AM, Du, Changbin wrote: > >> >> That rather isn't the case if negative values are ever passed to the > >> >> tracepoint, right? > >> >> > >>

[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 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 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 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-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 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 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 2/3] Documentation: convert trace/ftrace-design.txt to rst format

2018-02-16 Thread Du, Changbin
On Thu, Feb 15, 2018 at 10:57:05PM -0500, Steven Rostedt wrote: > On Fri, 16 Feb 2018 11:12:18 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > Signed-off-by: Changbin Du > > --- > > .../trace/{ftrace-design.txt => ftrace-design.rst} | 248 > > +++-- > >

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-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

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 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 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 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 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 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 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 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 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 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 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 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 1/2] mm, thp: introduce dedicated transparent huge page allocation interfaces

2017-10-17 Thread Du, Changbin
Hi Khandual, Thanks for your review. On Tue, Oct 17, 2017 at 01:38:07PM +0530, Anshuman Khandual wrote: > On 10/16/2017 02:49 PM, changbin...@intel.com wrote: > > From: Changbin Du > > > > This patch introduced 4 new interfaces to allocate a prepared > > transparent huge page. > > -

Re: [PATCH 2/2] mm: rename page dtor functions to {compound,huge,transhuge}_page__dtor

2017-10-17 Thread Du, Changbin
Hi Khandual, > > long freed); > > bool isolate_huge_page(struct page *page, struct list_head *list); > > void putback_active_hugepage(struct page *page); > > -void free_huge_page(struct page *page); > > +void huge_page_dtor(struct page *page); > >

Re: [PATCH 1/2] mm, thp: introduce dedicated transparent huge page allocation interfaces

2017-10-18 Thread Du, Changbin
Hi Hocko, On Tue, Oct 17, 2017 at 12:20:52PM +0200, Michal Hocko wrote: > [CC Kirill] > > On Mon 16-10-17 17:19:16, changbin...@intel.com wrote: > > From: Changbin Du > > > > This patch introduced 4 new interfaces to allocate a prepared > > transparent huge page. > > -

Re: [PATCH 1/2] mm, thp: introduce dedicated transparent huge page allocation interfaces

2017-10-18 Thread Du, Changbin
On Tue, Oct 17, 2017 at 02:12:46PM +0300, Kirill A. Shutemov wrote: > On Mon, Oct 16, 2017 at 05:19:16PM +0800, changbin...@intel.com wrote: > > @@ -501,6 +501,45 @@ void prep_transhuge_page(struct page *page) > > set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR); > > } > > > > +struct page

Re: [PATCH 0/2] mm, thp: introduce dedicated transparent huge page allocation interfaces

2017-10-18 Thread Du, Changbin
Hi Morton, On Tue, Oct 17, 2017 at 04:28:16PM -0700, Andrew Morton wrote: > On Mon, 16 Oct 2017 17:19:15 +0800 changbin...@intel.com wrote: > > > The first one introduce new interfaces, the second one kills naming > > confusion. > > The aim is to remove duplicated code and simplify transparent

Re: [PATCH v15 4/7] drm/i915/gvt: Add opregion support

2017-10-10 Thread Du, Changbin
On Tue, Oct 10, 2017 at 05:50:04PM +0800, Tina Zhang wrote: > Windows guest driver needs vbt in opregion, to configure the setting > for display. Without opregion support, the display registers won't > be set and this blocks display model to get the correct information > of the guest display

Re: Does perf-annotate work correctly?

2017-10-13 Thread Du, Changbin
Hi Jiri, Sorry, missed you (but get_maintainer.pl doesn't list you). Here is ealier email. https://lkml.org/lkml/2017/9/12/158 Do you think if this is a real issue? btw, is their a dedicated mailist for perf? Thanks. On Wed, Sep 13, 2017 at 05:14:09PM +0800, Du, Changbin wrote: > >

Re: Does perf-annotate work correctly?

2017-10-16 Thread Du, Changbin
On Mon, Oct 16, 2017 at 11:28:53AM +0200, Jiri Olsa wrote: > On Fri, Oct 13, 2017 at 06:15:00PM +0800, Du, Changbin wrote: > > Hi Jiri, > > Sorry, missed you (but get_maintainer.pl doesn't list you). Here is ealier > > email. > > https://lkml.org/lkml/2017/9/1

Re: Does perf-annotate work correctly?

2017-10-16 Thread Du, Changbin
On Mon, Oct 16, 2017 at 11:30:51AM +0200, Jiri Olsa wrote: > On Fri, Oct 13, 2017 at 06:15:00PM +0800, Du, Changbin wrote: > > Hi Jiri, > > Sorry, missed you (but get_maintainer.pl doesn't list you). Here is ealier > > email. > > https://lkml.org/lkml/2017/9/1

Re: [PATCH] perf ftrace: Fix the buffer size in __write_tracing_file

2018-01-07 Thread Du, Changbin
Hi Olsa, What about this fix now? Thanks! On Tue, Dec 26, 2017 at 05:26:56PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > The terminal character '\0' should take into account as size of the string > buffer. Without this fix, the '--graph-funcs', '--nograph-funcs' and >

Re: [PATCH] perf ftrace: Fix the buffer size in __write_tracing_file

2018-01-08 Thread Du, Changbin
On Mon, Jan 08, 2018 at 03:34:57PM +0100, Jiri Olsa wrote: > On Mon, Jan 08, 2018 at 11:05:12AM +0800, Du, Changbin wrote: > > Hi Olsa, > > What about this fix now? Thanks! > > > > On Tue, Dec 26, 2017 at 05:26:56PM +0800, changbin...@intel.com wro

Re: [PATCH 1/3] tracing: detect the string termination character when parsing user input string

2018-01-09 Thread Du, Changbin
hi Rostedt, On Tue, Jan 09, 2018 at 05:54:34PM -0500, Steven Rostedt wrote: > On Tue, 9 Jan 2018 17:55:46 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > The usersapce can give a '\0' terminated C string or even has '\0' at the > > middle of input buffer. We need handle

Re: [PATCH 2/3] tracing: make sure the parsed string always terminates with '\0'

2018-01-09 Thread Du, Changbin
On Tue, Jan 09, 2018 at 06:02:58PM -0500, Steven Rostedt wrote: > On Tue, 9 Jan 2018 17:55:47 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > The parser parse every string into parser.buffer. And some of the callers > > assume that parser.buffer contains a C string. So it

Re: [PATCH 3/3] tracing: don't set parser->cont if it has reached the end of input buffer

2018-01-09 Thread Du, Changbin
On Tue, Jan 09, 2018 at 06:12:41PM -0500, Steven Rostedt wrote: > On Tue, 9 Jan 2018 17:55:48 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > We should not set parser->cont if it has reached the end of input buffer. > > And since some callers (like ftrace_graph_write())

Re: [PATCH 3/3] tracing: don't set parser->cont if it has reached the end of input buffer

2018-01-11 Thread Du, Changbin
Hi Rostedt, On Tue, Jan 09, 2018 at 11:19:36PM -0500, Steven Rostedt wrote: > On Wed, 10 Jan 2018 11:18:23 +0800 > "Du, Changbin" wrote: > > > write(3, "abcdefg", 7) > > > > > > From my point of view, the above isn't done writing the f

Re: [PATCH v2] tracing: Allocate mask_str buffer dynamically

2017-10-31 Thread Du, Changbin
Hi Rostedt, On Tue, Oct 31, 2017 at 12:19:58PM -0400, Steven Rostedt wrote: > On Thu, 26 Oct 2017 00:20:28 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > > usually is very small. For my x86

Re: [PATCH] x86, build: Improve the isolinux searching of isoimage generation

2017-11-01 Thread Du, Changbin
Hi Ingo and Yamada, Thanks for your suggestions. I'll have a try though I am not familiar with kbuild system. On Wed, Nov 01, 2017 at 12:17:50PM +0900, Masahiro Yamada wrote: > 2017-10-31 18:39 GMT+09:00 Ingo Molnar : > > > > * changbin...@intel.com wrote: > > > >> From: Changbin Du > >> > >>

Re: [PATCH 1/4] x86, build: Fact out fdimage/isoimage generation commands to standalone script

2017-11-05 Thread Du, Changbin
On Sun, Nov 05, 2017 at 10:32:08AM +0100, Ingo Molnar wrote: > > A few spelling fixes: > > in the title: > > s/Fact out > /Factor out > > * changbin...@intel.com wrote: > > > From: Changbin Du > > > > The build message for fdimage/isoimage are pretty unstructured. The raw > > shell

Re: [PATCH 2/4] x86, build: Add new paths for isolinux.bin and ldlinux.c32

2017-11-05 Thread Du, Changbin
Hi Ingo, On Sun, Nov 05, 2017 at 10:33:53AM +0100, Ingo Molnar wrote: > > * changbin...@intel.com wrote: > > > From: Changbin Du > > > > Recently I failed to build isoimage target, because the path of isolinux.bin > > changed to /usr/xxx/ISOLINUX/isolinux.bin, as well as ldlinux.c32 which > >

Re: [PATCH] x86, build: Make genimage.sh little more quite

2017-11-08 Thread Du, Changbin
On Wed, Nov 08, 2017 at 10:01:37AM +0100, Ingo Molnar wrote: > > * changbin...@intel.com wrote: > > > From: Changbin Du > > > > This change suppresses the 'dd' output and adds '-quite' parameter > > to mkisofs tool. None of the messages matter to the user. Now: > > > > $ make isoimage > >

Re: [PATCH v3] tracing: Allocate mask_str buffer dynamically

2017-11-20 Thread Du, Changbin
Hi Steven, Have you picked up this patch or need more polish? Thanks. On Wed, Nov 01, 2017 at 11:28:08AM +0800, changbin...@intel.com wrote: > From: Changbin Du > > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > usually is very small. For my x86 distribution, the

Re: [PATCH] kvm: x86: Do not handle MMIO request in fast_page_fault

2017-09-05 Thread Du, Changbin
Sorry, messed up. This is not the correct one, will resend. thx. On Tue, Sep 05, 2017 at 05:29:41PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > If it is a MMIO request, it should be handled by slow path. This patch > actually fixed below warning when mmu debug is enabled. > >

Re: [RESEND][PATCH] kvm: x86: Do not handle MMIO request in fast_page_fault

2017-09-13 Thread Du, Changbin
On Wed, Sep 13, 2017 at 04:39:56PM +0200, Radim Krčmář wrote: > 2017-09-05 18:37+0800, changbin...@intel.com: > > From: Changbin Du > > > > If it is a MMIO request, it should be handled by slow path. This patch > > actually fixed below warning when mmu debug is enabled. > > > > WARNING: CPU: 5

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] 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: [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: [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: [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] 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: > > >

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: [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
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: [PATCH 00/17] Include linux trace docs to Sphinx TOC tree

2018-02-27 Thread Du, Changbin
Hello Steven and Corbet, Ten days past, will you accept this serias? Thank you! On Sat, Feb 17, 2018 at 01:39:33PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > Hi All, > The linux tracers are so useful that I want to make the docs better. The > kernel > now uses Sphinx to

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

2018-02-27 Thread Du, Changbin
On Tue, Feb 27, 2018 at 05:39:38PM -0500, Steven Rostedt wrote: > On Tue, 27 Feb 2018 17:35:27 +0800 > "Du, Changbin" wrote: > > > > From the tracing perspective: > > > > > > Acked-by: Steven Rostedt (VMware) > > > > > > -- Steve

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

2018-02-28 Thread Du, Changbin
On Wed, Feb 28, 2018 at 10:14:41AM +0100, Rafael J. Wysocki wrote: > On 2/28/2018 3:45 AM, Du, Changbin wrote: > > On Tue, Feb 27, 2018 at 05:39:38PM -0500, Steven Rostedt wrote: > > > On Tue, 27 Feb 2018 17:35:27 +0800 > > > "Du, Changbin" wrote: > >

Re: [PATCH v2] perf ftrace: Fix the buffer size in __write_tracing_file

2018-02-12 Thread Du, Changbin
On Sun, Feb 11, 2018 at 10:15:10PM -0800, Namhyung Kim wrote: > On Mon, Feb 12, 2018 at 12:48:15PM +0800, Du, Changbin wrote: > > Hi, > > > > On Mon, Feb 12, 2018 at 10:55:27AM +0900, Namhyung Kim wrote: > > > Hello, > > > > > > On Thu, Feb 08,

Re: [PATCH] tracing/power: Don't share template for cpu_idle and cpu_frequency

2018-02-12 Thread Du, Changbin
Thanks, I will improve this change in v2. And also update related docs. On Mon, Feb 12, 2018 at 12:04:52PM -0500, Steven Rostedt wrote: > On Sun, 11 Feb 2018 18:50:04 +0800 > "Du, Changbin" wrote: > > > Steve, How abount DEFINE_EVENT_PRINT as below? > > Ye

Re: [PATCH 3/3] tracing: don't set parser->cont if it has reached the end of input buffer

2018-01-13 Thread Du, Changbin
On Fri, Jan 12, 2018 at 10:31:08AM -0500, Steven Rostedt wrote: [...] > > Thanks, so now I unstand why below corner case. The userspace try to set the > > filter with a unrecognized symbole name (e.g "abcdefg"). > > open("/sys/kernel/debug/tracing/set_ftrace_filter", O_WRONLY|O_TRUNC) = 3 > >

Re: [PATCH 2/3] tracing: make sure the parsed string always terminates with '\0'

2018-01-15 Thread Du, Changbin
On Tue, Jan 09, 2018 at 11:10:22PM -0500, Steven Rostedt wrote: > On Wed, 10 Jan 2018 11:02:06 +0800 > "Du, Changbin" wrote: > > > On Tue, Jan 09, 2018 at 06:02:58PM -0500, Steven Rostedt wrote: > > > On Tue, 9 Jan 2018 17:55:47 +0800 > > > changbi

Re: [PATCH 2/3] Documentation: convert trace/ftrace-design.txt to rst format

2018-02-16 Thread Du, Changbin
On Fri, Feb 16, 2018 at 12:36:29PM -0500, Steven Rostedt wrote: > On Fri, 16 Feb 2018 05:49:52 -0700 > Jonathan Corbet wrote: > > > On Thu, 15 Feb 2018 22:57:05 -0500 > > Steven Rostedt wrote: > > > > > This document is out of date, and I rather have it updated before we > > > make it more

Re: [PATCH v3] perf ftrace: Append an EOL when write tracing files

2018-02-18 Thread Du, Changbin
On Mon, Feb 19, 2018 at 10:21:34AM +0900, Namhyung Kim wrote: > Hello, > > On Wed, Feb 14, 2018 at 10:44:24AM +0800, changbin...@intel.com wrote: > > From: Changbin Du > > > > Before this change, the '--graph-funcs', '--nograph-funcs' and > > '--trace-funcs' options didn't work as expected when

Re: [PATCH 05/17] trace doc: convert trace/ftrace.txt to rst format

2018-02-20 Thread Du, Changbin
Hi, On Tue, Feb 20, 2018 at 08:28:24AM +0100, Philippe Ombredanne wrote: > Changbin, Steven, > > On Sat, Feb 17, 2018 at 6:39 AM, wrote: > > From: Changbin Du > > > > This converts the plain text documentation to reStructuredText format and > > add it into Sphinx TOC tree. No essential content

A problem about 'perf sched latency'

2018-02-06 Thread Du, Changbin
Hello all, I am using perf sched tool to analyzer sched data on my machine. But it seems that 'perf sched latency' report incorrect 'Switches'. What I did is as below. First, record... $ sudo perf sched record time pi 200 > /dev/null Then check statistics. It says 'pi' only sched-in 1

Re: [PATCH] ACPI / sysfs: fix shift-overflow in GPE flooding quirk mechanism

2018-01-01 Thread Du, Changbin
Hi Wysocki and Brown, May I know wether you have checked this? Thanks! On Fri, Dec 22, 2017 at 11:11:10PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > The ACPI_MASKABLE_GPE_MAX is larger than the number of bits that u64 can > represent. This result in shift-overflow. So actually

Re: [PATCH] ACPI / sysfs: fix shift-overflow in GPE flooding quirk mechanism

2018-01-02 Thread Du, Changbin
On Tue, Jan 02, 2018 at 11:18:31AM +0100, Rafael J. Wysocki wrote: > On Tue, Jan 2, 2018 at 7:36 AM, Du, Changbin wrote: > > Hi Wysocki and Brown, > > May I know wether you have checked this? Thanks! > > There's a commit changing this queued up already, see > https://pa

Re: [PATCH v2] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-07-04 Thread Du, Changbin
On Thu, Jun 29, 2017 at 05:22:52PM +0200, Jiri Olsa wrote: > > > --- a/tools/perf/util/sort.c > > > +++ b/tools/perf/util/sort.c > > > @@ -2635,6 +2635,9 @@ static char *setup_overhead(char *keys) > > > if (sort__mode == SORT_MODE__DIFF) > > > return keys; > > > > > > + if

Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-06-01 Thread Du, Changbin
On Thu, Jun 01, 2017 at 12:21:39PM +0200, Jiri Olsa wrote: > On Thu, Jun 01, 2017 at 05:03:21PM +0800, changbin...@intel.com wrote: > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > > index 5762ae4..69eea3a 100644 > > --- a/tools/perf/util/sort.c > > +++ b/tools/perf/util/sort.c >

Re: [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given

2017-06-01 Thread Du, Changbin
On Fri, Jun 02, 2017 at 10:52:24AM +0800, Du, Changbin wrote: > On Thu, Jun 01, 2017 at 12:21:39PM +0200, Jiri Olsa wrote: > > On Thu, Jun 01, 2017 at 05:03:21PM +0800, changbin...@intel.com wrote: > > > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > >

Re: [PATCH v3] mm, thp: introduce generic transparent huge page allocation interfaces

2017-12-07 Thread Du, Changbin
Hi Andrew, On Thu, Dec 07, 2017 at 03:45:19PM -0800, Andrew Morton wrote: > On Thu, 7 Dec 2017 18:54:19 +0800 changbin...@intel.com wrote: > > > From: Changbin Du [snip] > -static inline void prep_transhuge_page(struct page *page) {} > > +#define alloc_transhuge_page_vma(gfp_mask, vma, addr)

BUG: KASAN: global-out-of-bounds in cppc_get_perf_caps+0xf3/0x3b0

2017-12-04 Thread Du, Changbin
Hi Cherian, Your patch 'ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs' introduced a out-of-bounds BUG in kernel. The code need to check cpu_pcc_subspace_idx before use it since it can be -1. Thanks. [ 15.113449] ==

Re: [RESEND PATCH v3] tracing: Allocate mask_str buffer dynamically

2017-11-29 Thread Du, Changbin
On Wed, Nov 29, 2017 at 10:12:09PM -0500, Steven Rostedt wrote: > On Wed, 29 Nov 2017 12:42:45 +0800 > changbin...@intel.com wrote: > > > From: Changbin Du > > > > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > > usually is very small. For my x86 distribution, the

Re: [PATCH v4] mm, thp: introduce generic transparent huge page allocation interfaces

2017-12-08 Thread Du, Changbin
On Fri, Dec 08, 2017 at 09:27:37AM +0100, Michal Hocko wrote: > On Fri 08-12-17 12:42:55, changbin...@intel.com wrote: > > From: Changbin Du > > > > This patch introduced 4 new interfaces to allocate a prepared transparent > > huge page. These interfaces merge distributed two-step allocation as

Re: [PATCH v2 1/4] x86, build: Factor out fdimage/isoimage generation commands to standalone script

2017-11-07 Thread Du, Changbin
On Tue, Nov 07, 2017 at 11:20:29AM +0100, Ingo Molnar wrote: > > * changbin...@intel.com wrote: > > > From: Changbin Du > > > > The build message for fdimage/isoimage are pretty unstructured. The raw > > shell command blocks are printed. We can improve them as regular build > > system

Does perf-annotate work correctly?

2017-09-12 Thread Du, Changbin
When a annotate a symbol, I find the annotated C source code doesn't match assembly code. So I cannot determine which line of C code has much overhead withou gdb's help. Here is a example result of function apic_has_interrupt_for_ppr() in kvm module. │580

Re: Does perf-annotate work correctly?

2017-09-12 Thread Du, Changbin
On Tue, Sep 12, 2017 at 11:33:50AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 12, 2017 at 06:10:35PM +0800, Du, Changbin escreveu: > > When a annotate a symbol, I find the annotated C source code doesn't match > > assembly code. > > So I cannot determine which li

Re: Does perf-annotate work correctly?

2017-09-13 Thread Du, Changbin
Here is another example which may be easy to analyse. I beleve that something wrong in parsing objdump output. The 'test %esi,%esi' is not of 'if (unlikely(error))', but 'if (!idtv_info_valid)'. perf annotate of function vmx_complete_interrupts(): vmx_complete_interrupts

<    1   2   3   4   5   >