aim7 performance regression by commit 5a50508 report from LKP

2013-01-29 Thread Yuanhan Liu
Hi, Here we, LKP(Linux Kernel Performance, a project to do performance benchmark testing for Linux kernel, and try to find and fix the performance regressions), found a 10%-20% performance regression of aim7 benchmark introduced by commit 5a50508: "mm/rmap: Convert the struct anon_vma::mutex to an

Re: aim7 performance regression by commit 5a50508 report from LKP

2013-01-29 Thread Yuanhan Liu
On Tue, Jan 29, 2013 at 09:44:00AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > [...] > > Very nice measurements and analysis, thanks! > > > As stated above, anybody can have a chance to own the lock in > > mutex once somebody release the lock.

[PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-30 Thread Yuanhan Liu
1 1 1 1 2 2 cpu 15: 0 0 ... 2 0 0 1 0 1 1 1 1 1 2 2 Where you can see that CPU is much busier with this patch. Suggested-by: Ingo Molnar Cc: David Howells Signed-off-by: Yuanha

Re: aim7 performance regression by commit 5a50508 report from LKP

2013-01-30 Thread Yuanhan Liu
On Tue, Jan 29, 2013 at 10:12:45AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > On Tue, Jan 29, 2013 at 09:44:00AM +0100, Ingo Molnar wrote: > > > > > > * Yuanhan Liu wrote: > > > > > > > [...] > > > > > &g

[PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block

2013-01-31 Thread Yuanhan Liu
put get/get_uts() into CONFIG_PROC_SYSCTL code block as they are used only when CONFIG_PROC_SYSCTL is enabled. Signed-off-by: Yuanhan Liu --- kernel/utsname_sysctl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c

[PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns

2013-01-31 Thread Yuanhan Liu
We can use user_ns, which is also assigned from task_cred_xxx(tsk, user_ns), at the beginning of copy_namespaces(). Cc: Serge Hallyn Signed-off-by: Yuanhan Liu --- kernel/nsproxy.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c

[PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns()

2013-01-31 Thread Yuanhan Liu
Fix the wrong comment about the return value of clone_uts_ns() Cc: Serge Hallyn Signed-off-by: Yuanhan Liu --- kernel/utsname.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/utsname.c b/kernel/utsname.c index 08b197e..a47fc5d 100644 --- a/kernel/utsname.c

Re: [PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-31 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 10:39:31AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > We(Linux Kernel Performance project) found a regression introduced by > > commit 5a50508, which just convert all mutex lock to rwsem write lock. > > The semantics is same, bu

Re: [PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-31 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 11:45:41AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > > > output with this patch: > > > > --- > > > > cpu 00: 0 0 ... 1 1 2 1 1 1 2 1 1 1 1 3 > > > &

Re: [PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-31 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 03:57:51AM -0800, Michel Lespinasse wrote: > On Wed, Jan 30, 2013 at 1:14 AM, Yuanhan Liu > wrote: > > We(Linux Kernel Performance project) found a regression introduced by > > commit 5a50508, which just convert all mutex lock to rwsem write lock. > &g

Re: [PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-31 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 02:12:28PM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > BTW, mind to tell a nice test case for mmap_sem? > > this one was write-hitting on mmap_sem pretty hard, last I > checked: > > http://people.redhat.com/mingo/threaded

Re: [PATCH] rwsem-spinlock: let rwsem write lock stealable

2013-01-31 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 10:18:18PM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > On Thu, Jan 31, 2013 at 02:12:28PM +0100, Ingo Molnar wrote: > > > > > > * Yuanhan Liu wrote: > > > > > > > BTW, mind to tell a nice test case fo

Re: aim7 performance regression by commit 5a50508 report from LKP

2013-02-01 Thread Yuanhan Liu
On Thu, Jan 31, 2013 at 12:22:52PM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > > or whether the lock hold times could be reduced drastically > > > > I also found one, but it doesn't sound like the one will > > reduce lock hold times

[PATCH v2] rwsem-spinlock: let rwsem write lock stealable

2013-02-01 Thread Yuanhan Liu
PU is much busier with this patch. v2: make it stealable at __down_write_trylock as well, pointed by Michel Reported-by: LKP project Suggested-by: Ingo Molnar Cc: David Howells Cc: Michel Lespinasse Signed-off-by: Yuanhan Liu --- lib/rwsem-spinloc

[PATCH 1/2] lockstat: fix a typo

2013-01-24 Thread Yuanhan Liu
It should be CONFIG_LOCK_STAT Cc: Ingo Molnar Signed-off-by: Yuanhan Liu --- Documentation/lockstat.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt index cef00d4..dd2f7b2 100644 --- a/Documentation

[PATCH 2/2] mutex: use spin_[un]lock instead of arch_spin_[un]lock

2013-01-24 Thread Yuanhan Liu
Use spin_[un]lock instead of arch_spin_[un]lock in mutex-debug.h so that we can collect the lock statistics of spin_lock_mutex from /proc/lock_stat. Cc: Ingo Molnar Signed-off-by: Yuanhan Liu --- kernel/mutex-debug.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH 2/2] mutex: use spin_[un]lock instead of arch_spin_[un]lock

2013-01-24 Thread Yuanhan Liu
On Thu, Jan 24, 2013 at 10:58:07AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > Use spin_[un]lock instead of arch_spin_[un]lock in mutex-debug.h so > > that we can collect the lock statistics of spin_lock_mutex from > > /proc/lock_stat. > > >

Re: [PATCH 2/2] mutex: use spin_[un]lock instead of arch_spin_[un]lock

2013-01-24 Thread Yuanhan Liu
On Thu, Jan 24, 2013 at 11:14:50AM +0100, Ingo Molnar wrote: > > * Yuanhan Liu wrote: > > > On Thu, Jan 24, 2013 at 10:58:07AM +0100, Ingo Molnar wrote: > > > > > > * Yuanhan Liu wrote: > > > > > > > Use spin_[un]lock instead of arch

Re: [PATCH] Fix the warning related to type check in kfifo.h

2012-10-25 Thread Yuanhan Liu
nction a bit and found it uses memcpy() to do the real _out_ things. So, why we need do check here? memcpy can handle it no matter what point type it is. And please feel free to correct me if I'm wrong. Thanks, Yuanhan Liu > This reason is the original > code use the assignment to check

[PATCH] kfifo: remove unnecessary type check

2012-10-25 Thread Yuanhan Liu
From: Yuanhan Liu Firstly, this kind of type check doesn't work. It does something similay like following: void * __dummy = NULL; __buf = __dummy; __dummy is defined as void *. Thus it will not trigger warnings as expected. Second, we don't need that kind of check.

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-25 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 07:38:31AM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 09:46 +0800 schrieb Yuanhan Liu: > > From: Yuanhan Liu > > > > Firstly, this kind of type check doesn't work. It does something similay > > like following: > >

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 03:17:57PM +0800, Yuanhan Liu wrote: > On Fri, Oct 26, 2012 at 08:51:06AM +0200, Stefani Seibold wrote: > > Am Freitag, den 26.10.2012, 14:11 +0800 schrieb Yuanhan Liu: > > > On Fri, Oct 26, 2012 at 07:38:31AM +0200, Stefani Seibold wrote: > > > &

[PATCH 1/2] kfifo: round up the fifo size power of 2

2012-10-26 Thread Yuanhan Liu
educe memory? Thanks, Yuanhan Liu - Cc: Stefani Seibold Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- kernel/kfifo.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 59dcf5b..0f78378 100644 --- a/kernel/kfifo.c +++ b/k

[PATCH 2/2] kfifo: handle the case that alloc size is equal to 0

2012-10-26 Thread Yuanhan Liu
"not really happened yet" issue. Cc: Stefani Seibold Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- kernel/kfifo.c | 22 ++ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 0f78378..e3a63c6 100644 --- a/kern

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 08:51:06AM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 14:11 +0800 schrieb Yuanhan Liu: > > On Fri, Oct 26, 2012 at 07:38:31AM +0200, Stefani Seibold wrote: > > > Am Freitag, den 26.10.2012, 09:46 +0800 schrieb Yuanhan Liu: > &g

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 05:52:44PM +0800, Richard Yang wrote: > On Fri, Oct 26, 2012 at 02:11:45PM +0800, Yuanhan Liu wrote: > >On Fri, Oct 26, 2012 at 07:38:31AM +0200, Stefani Seibold wrote: > >> Am Freitag, den 26.10.2012, 09:46 +0800 schrieb Yuanhan Liu: > &

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 11:30:27AM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 15:56 +0800 schrieb Yuanhan Liu: > > Say, if we want to allocate a filo with size of 6 bytes, it would be safer > > to allocate 8 bytes instead of 4 bytes. > > >

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 11:26:31AM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 15:17 +0800 schrieb Yuanhan Liu: > > On Fri, Oct 26, 2012 at 08:51:06AM +0200, Stefani Seibold wrote: > > > Am Freitag, den 26.10.2012, 14:11 +0800 schrieb Yuanhan Liu: > > > &

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-10-26 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 03:39:46PM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 20:33 +0800 schrieb Yuanhan Liu: > > On Fri, Oct 26, 2012 at 11:30:27AM +0200, Stefani Seibold wrote: > > > Am Freitag, den 26.10.2012, 15:56 +0800 schrieb Yuanhan Liu: > >

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-27 Thread Yuanhan Liu
On Fri, Oct 26, 2012 at 03:42:44PM +0200, Stefani Seibold wrote: > Am Freitag, den 26.10.2012, 21:04 +0800 schrieb Yuanhan Liu: > > On Fri, Oct 26, 2012 at 11:26:31AM +0200, Stefani Seibold wrote: > > > Am Freitag, den 26.10.2012, 15:17 +0800 schrieb Yuanhan Liu: > > > &

[PATCH v2] kfifo: remove unnecessary type check

2012-10-27 Thread Yuanhan Liu
ttps://lkml.org/lkml/2012/10/25/584 Cc: Andrew Morton Cc: Wei Yang Cc: Stefani Seibold Cc: Fengguang Wu Cc: Stephen Rothwell Signed-off-by: Yuanhan Liu --- include/linux/kfifo.h | 46 -- 1 files changed, 12 insertions(+), 34 deletions(-) diff

Re: [PATCH] kfifo: remove unnecessary type check

2012-10-27 Thread Yuanhan Liu
On Sat, Oct 27, 2012 at 09:55:58AM +0800, Richard Yang wrote: > On Fri, Oct 26, 2012 at 08:31:38PM +0800, Yuanhan Liu wrote: > >On Fri, Oct 26, 2012 at 05:52:44PM +0800, Richard Yang wrote: > >> On Fri, Oct 26, 2012 at 02:11:45PM +0800, Yuanhan Liu wrote: > >> >On F

[PATCH] staging: dgrp: fix potential NULL defereference issue

2012-10-28 Thread Yuanhan Liu
Fix a coccinelle warning catched by Fengguang's 0-DAY system: + drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced. Put the "done:" label a bit down would solve this issue. Cc: Fengguang Wu Cc: Julia Lawall Cc: Greg Kroah-Hartman Signed-off-

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-10-30 Thread Yuanhan Liu
On Mon, Oct 29, 2012 at 01:59:35PM -0700, Andrew Morton wrote: > On Fri, 26 Oct 2012 15:56:57 +0800 > Yuanhan Liu wrote: > > > Say, if we want to allocate a filo with size of 6 bytes, it would be safer > > to allocate 8 bytes instead of 4 bytes. > > > > ... >

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-10-30 Thread Yuanhan Liu
On Wed, Oct 31, 2012 at 07:30:33AM +0100, Stefani Seibold wrote: > Am Mittwoch, den 31.10.2012, 13:59 +0800 schrieb Yuanhan Liu: > > On Mon, Oct 29, 2012 at 01:59:35PM -0700, Andrew Morton wrote: > > > On Fri, 26 Oct 2012 15:56:57 +0800 > > > Yuanhan Liu wrote: > &

[PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB

2012-10-31 Thread Yuanhan Liu
aration of function '__gpio_get_value' include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep': nclude/asm-generic/gpio.h:226:2: error: implicit declaration of function '__gpio_set_value' Cc: Grant Likely Cc: Linus Walleij Cc: Fengguang Wu Signed-off-by: Yuan

[PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section

2012-10-31 Thread Yuanhan Liu
s without putting something like: #ifdef CONFIG_GPIOLIB So, move those functions into proper section at include/asm-generic/gpio.h would resolve 2 above issues. Cc: Grant Likely Cc: Linus Walleij Cc: Fengguang Wu Signed-off-by: Yuanhan Liu --- include/asm-generic/gpio.h | 39 ++

Re: [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section

2012-10-31 Thread Yuanhan Liu
On Wed, Oct 31, 2012 at 03:12:36PM +0800, Fengguang Wu wrote: > On Wed, Oct 31, 2012 at 03:00:54PM +0800, Yuanhan Liu wrote: > > There are 2 issues with current code: > > > > 1. redefinition of 'gpio_cansleep': > > include/linux/gpio.h:60:19: error: redefiniti

Re: [tip:sched/core] sched/balancing: Fix cfs_rq-> task_h_load calculation

2013-09-29 Thread Yuanhan Liu
On Fri, Sep 20, 2013 at 06:46:59AM -0700, tip-bot for Vladimir Davydov wrote: > Commit-ID: 7e3115ef5149fc502e3a2e80719dba54a8e7409d > Gitweb: http://git.kernel.org/tip/7e3115ef5149fc502e3a2e80719dba54a8e7409d > Author: Vladimir Davydov > AuthorDate: Sat, 14 Sep 2013 19:39:46 +0400 > Commi

[PATCH] ptp_pch: release chip->mem_base and chip->regs on error

2012-10-18 Thread Yuanhan Liu
Fix smatch warnings catched by Fengguang's 0-DAY system: + drivers/ptp/ptp_pch.c:641 pch_probe() warn: 'chip->mem_base' was not released on error + drivers/ptp/ptp_pch.c:641 pch_probe() warn: 'chip->regs' was not released on error Cc: Richard Cochran Cc: David S.

[PATCH] NVMe: check the return of nvme_alloc_iod

2012-10-18 Thread Yuanhan Liu
It maybe failed due to out of memory. Cc: Matthew Wilcox Cc: Keith Busch Signed-off-by: Yuanhan Liu --- drivers/block/nvme.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 931769e..eb58978 100644 --- a/drivers

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-11-15 Thread Yuanhan Liu
On Wed, Nov 14, 2012 at 08:03:49AM +0100, Stefani Seibold wrote: > Am Freitag, den 09.11.2012, 10:32 +0800 schrieb Yuanhan Liu: > > On Thu, Nov 08, 2012 at 01:37:15PM +0100, Stefani Seibold wrote: > > > Am Donnerstag, den 08.11.2012, 20:24 +0800 schrieb Yuanhan Liu: > >

Re: [PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB

2012-11-05 Thread Yuanhan Liu
On Sun, Nov 04, 2012 at 06:47:12PM +0100, Linus Walleij wrote: > On Wed, Oct 31, 2012 at 8:00 AM, Yuanhan Liu > wrote: > > > Those functions are availabe only when CONFIG_GPIOLIB is set. So, we > > should not call them under !CONFIG_GPIOLIB block. > > > > This

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-11-08 Thread Yuanhan Liu
On Tue, Oct 30, 2012 at 11:52:10PM -0700, Andrew Morton wrote: > On Wed, 31 Oct 2012 07:30:33 +0100 Stefani Seibold > wrote: > > > > Yes, and I guess the same to give them a 64-element one. > > > > > > > > > > > If there's absolutely no prospect that the kfifo code will ever support > > > > 10

Re: [PATCH 1/2] kfifo: round up the fifo size power of 2

2012-11-08 Thread Yuanhan Liu
On Thu, Nov 08, 2012 at 01:37:15PM +0100, Stefani Seibold wrote: > Am Donnerstag, den 08.11.2012, 20:24 +0800 schrieb Yuanhan Liu: > > On Tue, Oct 30, 2012 at 11:52:10PM -0700, Andrew Morton wrote: > > > On Wed, 31 Oct 2012 07:30:33 +0100 Stefani Seibold > > > wrote:

[PATCH] staging:iio:adis16260: select IIO_ADIS_LIB to fix build error

2012-12-30 Thread Yuanhan Liu
] undefined! ERROR: "adis_single_conversion" [drivers/staging/iio/gyro/adis16260.ko] undefined! Selecting IIO_ADIS_LIB at Kconfig file fixes this issue. Reported-by: Fengguang Wu Cc: Lars-Peter Clausen Cc: Jonathan Cameron Cc: Greg Kroah-Hartman Signed-off-by: Yuanhan Liu --- driver

Re: [PATCH] staging:iio:adis16260: select IIO_ADIS_LIB to fix build error

2012-12-30 Thread Yuanhan Liu
On Mon, Dec 31, 2012 at 08:16:10AM +0100, Lars-Peter Clausen wrote: > On 12/31/2012 06:36 AM, Yuanhan Liu wrote: > > Commit 9d5e9fdf turned the code to use adis library, so it depends on > > adis lib. But it forgot to select it at Kconfig file. Thus if adis is > > not ena

[PATCH 2/2] [SCSI] libiscsi: replace kfifo_init with kfifo_alloc

2012-11-19 Thread Yuanhan Liu
scsi list Cc: Stefani Seibold Signed-off-by: Yuanhan Liu --- drivers/scsi/libiscsi.c | 59 --- include/scsi/libiscsi.h |4 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 82c

[PATCH 1/2] [SCSI] libsrp: replace kfifo_init with kfifo_alloc

2012-11-19 Thread Yuanhan Liu
;' shows that this is one user of kfifo_init(2 in total). Replace it with kfifo_alloc, as I propose to remove kfifo_init API later. Cc: James E.J. Bottomley Cc: Stefani Seibold Signed-off-by: Yuanhan Liu --- drivers/scsi/libsrp.c | 22 ++ include/scsi/libsrp.h |

[PATCH] x86, mm: fix boot hang regression

2013-05-24 Thread Yuanhan Liu
to following will make this issue gone: if(address >= end && !spliting) { ... } Reported-by: LKP CC: For 3.9+ Cc: H. Peter Anvin Cc: Yinghai Lu Bisected-by: "Xie, ChanglongX" Signed-off-by: Yuanhan Liu --- I reported this panic regression

Re: [PATCH] x86, mm: fix boot hang regression

2013-05-25 Thread Yuanhan Liu
On Sat, May 25, 2013 at 12:31:43AM -0700, Yinghai Lu wrote: > On Fri, May 24, 2013 at 9:30 PM, Yuanhan Liu > wrote: > > Commit 8d57470d introduced a kernel panic while setting mem=2G at > > boot time, and commit c9b3234a6 turns the the kernel panic to hang. > > > >

[PATCH] timer: do not define __mod_timer as inline function

2012-08-06 Thread Yuanhan Liu
ar Signed-off-by: Yuanhan Liu --- kernel/timer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/timer.c b/kernel/timer.c index a61c093..0be4216 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -736,7 +736,7 @@ static struct tvec_base *lock_timer_base(struct

Re: ext4 write performance regression in 3.6-rc1 on RAID0/5

2012-08-21 Thread Yuanhan Liu
On Wed, Aug 22, 2012 at 04:00:25PM +1000, NeilBrown wrote: > On Wed, 22 Aug 2012 11:57:02 +0800 Yuanhan Liu > wrote: > > > > > -#define NR_STRIPES 256 > > +#define NR_STRIPES 1024 > > Changing one magic number into another magic number might he

Re: [RFC PATCH 1/2] block: embed bdevname in struct block_device

2012-08-22 Thread Yuanhan Liu
On Mon, Aug 13, 2012 at 06:33:59PM +0800, Yuanhan Liu wrote: > Embed block device name in struct block_device, thus we can replace > the following code: > char b[BDEVNAME_SIZE]; > printk(KERN_XXX "...%s..\n", bdevname(bdev, b); > > with a much simpler

[PATCH] tracing: skip printing "OK" if failed to disable event

2012-08-27 Thread Yuanhan Liu
No acutal case found. But logically, we should skip "OK" in case any error met. Signed-off-by: Yuanhan Liu --- kernel/trace/trace_events.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 29111d

[RFC PATCH 2/2] vfs: replace bdevname(bdev, b) with bdev->bd_name

2012-08-13 Thread Yuanhan Liu
akes the code a little cleaner and a bit smaller stack usage. If this change is OK to you, I will file more patches to apply this change to all other codes. Cc: Alexander Viro Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- fs/buffer.c | 27 --- fs

[RFC PATCH 1/2] block: embed bdevname in struct block_device

2012-08-13 Thread Yuanhan Liu
d_name); This is a RFC version, which I just included one sample with this change appiled. If this patch makes sense to you, I will file more patches to apply this change. Cc: Alexander Viro Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- fs/block_dev.c |2 ++ include/l

[PATCH] x86/mm: stop allocating pmd page if failed

2012-07-24 Thread Yuanhan Liu
The old code would call __get_free_page() even though previous allocation fail met. This is not needed. Signed-off-by: Yuanhan Liu Cc: Jeremy Fitzhardinge Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/mm/pgtable.c | 18 +- 1 files

[PATCH] block: remove dead func declaration

2012-07-10 Thread Yuanhan Liu
__generic_unplug_device() function is removed with commit 7eaceaccab5f40bbfda044629a6298616aeaed50, which forgot to remove the declaration at meantime. Here remove it. Signed-off-by: Yuanhan Liu --- block/blk.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/blk.h

Re: [PATCH v2] rwsem-spinlock: let rwsem write lock stealable

2013-02-16 Thread Yuanhan Liu
Hi Ingo, Ping... On Fri, Feb 01, 2013 at 06:59:16PM +0800, Yuanhan Liu wrote: > We(Linux Kernel Performance project) found a regression introduced by > commit 5a50508, which just convert all mutex lock to rwsem write lock. > The semantics is same, but the results is quite huge in s

[PATCH] ACPI: fix the wrong #ifdef for acpi_no_s4_hw_signature

2012-10-15 Thread Yuanhan Liu
acpi_no_s4_hw_signature is defined in #ifdef CONFIG_HIBERNATION block, but the current code put the declare in #ifdef CONFIG_PM_SLEEP block. Signed-off-by: Yuanhan Liu --- include/linux/acpi.h |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/acpi.h b

Re: [PATCH] ACPI: fix the wrong #ifdef for acpi_no_s4_hw_signature

2012-10-15 Thread Yuanhan Liu
On Tue, Oct 16, 2012 at 12:27:13PM +0800, Fengguang Wu wrote: > The title could be made more descriptive: > > ACPI: move acpi_no_s4_hw_signature() declaration into #ifdef > CONFIG_HIBERNATION Yes, much better. > > On Tue, Oct 16, 2012 at 12:05:03PM +0800,

[PATCH v2] ACPI: move acpi_no_s4_hw_signature() declaration into #ifdef CONFIG_HIBERNATION

2012-10-15 Thread Yuanhan Liu
‘acpi_no_s4_hw_signature’ [-Werror=implicit-function-declaration] v2: take better title and add build error message suggested by Fengguang Signed-off-by: Yuanhan Liu Reviewed-by: Fengguang Wu --- include/linux/acpi.h |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a

Re: [PATCH v2] ACPI: move acpi_no_s4_hw_signature() declaration into #ifdef CONFIG_HIBERNATION

2012-10-16 Thread Yuanhan Liu
On Tue, Oct 16, 2012 at 02:24:53PM +0800, Fengguang Wu wrote: > On Tue, Oct 16, 2012 at 01:24:12PM +0800, Yuanhan Liu wrote: > > acpi_no_s4_hw_signature is defined in #ifdef CONFIG_HIBERNATION block, > > but the current code put the declaration in #ifdef CONFIG_PM_SLEEP block. >

[PATCH 5/5] crypto: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-10-16 Thread Yuanhan Liu
...@vger.kernel.org Signed-off-by: Yuanhan Liu Signed-off-by: Fengguang Wu --- drivers/crypto/ux500/cryp/cryp_core.c |2 ++ drivers/crypto/ux500/hash/hash_core.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypt

[PATCH 2/5] bcma: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-10-16 Thread Yuanhan Liu
fn) Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM). Cc: John W. Linville Cc: "Rafał Miłecki" Cc: linux-wirel...@vger.kernel.org Signed-off-by: Yuanhan Liu Signed-off-by: Fengguang Wu --- drivers/bcma/host_pci.c |6 +++--- 1 files changed, 3 insertions(+)

[PATCH 1/5] ata: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-10-16 Thread Yuanhan Liu
fn) Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM). Cc: Jeff Garzik Cc: Viresh Kumar Cc: linux-...@vger.kernel.org Signed-off-by: Yuanhan Liu Signed-off-by: Fengguang Wu --- drivers/ata/ahci_platform.c |2 +- drivers/ata/pata_arasan_cf.c |2 +- drivers/ata/sat

[PATCH 4/5] sonypi: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-10-16 Thread Yuanhan Liu
fn) Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM). Cc: Mattia Dongili Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: platform-driver-...@vger.kernel.org Signed-off-by: Yuanhan Liu Signed-off-by: Fengguang Wu --- drivers/char/sonypi.c |2 +- 1 files changed, 1 insert

[PATCH 3/5] mg_disk: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-10-16 Thread Yuanhan Liu
This will fix warnings like following when CONFIG_PM_SLEEP is not set: warning: 'xxx_suspend' defined but not used [-Wunused-function] warning: 'xxx_resume' defined but not used [-Wunused-function] Cc: "Rafael J. Wysocki" Cc: Jens Axboe Signed-off-

[PATCH 0/5] kfifo cleanup and log based kfifo API

2013-01-08 Thread Yuanhan Liu
kfifo API Thanks! --yliu Cc: Stefani Seibold Cc: Andrew Morton Cc: James E.J. Bottomley Cc: iscsi list Cc: Mike Christie --- Yuanhan Liu (5): kfifo: remove unnecessary type check libsrp: replace kfifo_init with kfifo_alloc libiscsi: replace kfifo_init with kfifo_alloc kfifo: r

[PATCH 4/5] kfifo: remove kfifo_init

2013-01-08 Thread Yuanhan Liu
kfifo_init is buggy, we should never use that. Instead, we should use kfifo_alloc. Cc: Stefani Seibold Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- include/linux/kfifo.h | 27 ++- kernel/kfifo.c| 23 --- 2 files changed, 2 insertions

[PATCH 5/5] kfifo: log based kfifo API

2013-01-08 Thread Yuanhan Liu
ernel.org Cc: linux-...@vger.kernel.org Cc: linux...@kvack.org Cc: d...@vger.kernel.org Cc: linux-s...@vger.kernel.org Signed-off-by: Yuanhan Liu --- arch/arm/plat-omap/Kconfig |2 +- arch/arm/plat-omap/mailbox.c|6 +++- arch/powerpc/sysdev/fsl_rmu.c |

[PATCH 2/5] libsrp: replace kfifo_init with kfifo_alloc

2013-01-08 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu --- drivers/scsi/libsrp.c | 22 ++ include/scsi/libsrp.h |1 - 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index 0707ecd..63db792 100644 --- a/drivers/scsi/libsrp.c +++ b

[PATCH 3/5] libiscsi: replace kfifo_init with kfifo_alloc

2013-01-08 Thread Yuanhan Liu
libsrp.c: allocated items once by kcalloc. Cc: Mike Christie Cc: James E.J. Bottomley Cc: iscsi list Cc: Stefani Seibold Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- drivers/scsi/libiscsi.c | 59 --- include/scsi/libiscsi.h |4 +- 2

[PATCH 1/5] kfifo: remove unnecessary type check

2013-01-08 Thread Yuanhan Liu
ttps://lkml.org/lkml/2012/10/25/584 Cc: Stefani Seibold Cc: Andrew Morton Signed-off-by: Yuanhan Liu --- include/linux/kfifo.h | 46 -- 1 files changed, 12 insertions(+), 34 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.

Re: Antw: [PATCH 0/5] kfifo cleanup and log based kfifo API

2013-01-08 Thread Yuanhan Liu
On Tue, Jan 08, 2013 at 04:03:17PM +0100, Ulrich Windl wrote: > >>> Yuanhan Liu schrieb am 08.01.2013 um 15:57 > >>> in > Nachricht <1357657073-27352-1-git-send-email-yuanhan@linux.intel.com>: > > [...] > > My proposal is to replace kfifo_init w

Re: [PATCH 1/5] kfifo: remove unnecessary type check

2013-01-08 Thread Yuanhan Liu
On Tue, Jan 08, 2013 at 10:51:04PM +0100, Stefani Seibold wrote: > Am Dienstag, den 08.01.2013, 22:57 +0800 schrieb Yuanhan Liu: > > Firstly, this kind of type check doesn't work. It does something similar > > as following: > > void * __dummy = NULL; > > _

Re: [PATCH 5/5] kfifo: log based kfifo API

2013-01-08 Thread Yuanhan Liu
On Tue, Jan 08, 2013 at 10:16:46AM -0800, Dmitry Torokhov wrote: > Hi Yuanhan, > > On Tue, Jan 08, 2013 at 10:57:53PM +0800, Yuanhan Liu wrote: > > The current kfifo API take the kfifo size as input, while it rounds > > _down_ the size to power of 2 at __kfifo_allo

Re: [PATCH 1/5] kfifo: remove unnecessary type check

2013-01-09 Thread Yuanhan Liu
On Wed, Jan 09, 2013 at 04:29:39PM +0100, Stefani Seibold wrote: > Am Mittwoch, den 09.01.2013, 10:35 +0800 schrieb Yuanhan Liu: > > On Tue, Jan 08, 2013 at 10:51:04PM +0100, Stefani Seibold wrote: > > > Am Dienstag, den 08.01.2013, 22:57 +0800 schrieb Yuanhan Liu: > > &

performance changes on c9dc4c65: 9.8% fsmark.files_per_sec

2015-04-22 Thread Yuanhan Liu
FYI, we found performance increasement, which is expected as commit patch says, on `fsmark.files_per_sec' by c9dc4c6578502c2085705347375b82089aad18d0: > commit c9dc4c6578502c2085705347375b82089aad18d0 > Author: Chris Mason > AuthorDate: Sat Apr 4 17:14:42 2015 -0700 > Commit:

[PATCH 2/2] md/raid5: exclusive wait_for_stripe

2015-04-24 Thread Yuanhan Liu
raid on those ramdisk As you can see, though there are no much performance gain for hard disk workload, the system time is dropped heavily, up to 97%. And as expected, the performance increased a lot, up to 260%, for fast device(ram disk). Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c

[PATCH 1/2] md/raid5: split wait_for_stripe and introduce wait_for_quiesce

2015-04-24 Thread Yuanhan Liu
it wait_for_stripe, and here I introduce wait_for_quiesce for the second usage. The name may not well taken, or even taken wrongly. Feel free to correct me then. This is also a prepare patch for next patch: make wait_for_stripe exclusive. Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 13 ++

Re: [PATCH 1/2] md/raid5: split wait_for_stripe and introduce wait_for_quiesce

2015-04-26 Thread Yuanhan Liu
On Mon, Apr 27, 2015 at 10:10:24AM +1000, NeilBrown wrote: > On Fri, 24 Apr 2015 21:39:03 +0800 Yuanhan Liu > wrote: > > > If I read code correctly, current wait_for_stripe actually has 2 usage: > > > > - wait for there is enough free stripe cache, triggered when >

Re: [PATCH 2/2] md/raid5: exclusive wait_for_stripe

2015-04-26 Thread Yuanhan Liu
On Mon, Apr 27, 2015 at 10:24:05AM +1000, NeilBrown wrote: > On Fri, 24 Apr 2015 21:39:04 +0800 Yuanhan Liu > wrote: > > > I noticed heavy spin lock contention at get_active_stripe() with fsmark > > multiple thread write workloads. > > > > Here is how this h

[PATCH 2/3 v2] md/raid5: split wait_for_stripe and introduce wait_for_quiescent

2015-04-26 Thread Yuanhan Liu
(active_stripes == 0) Commit log refactor suggestion from Neil. Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 15 +-- drivers/md/raid5.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 77dfd72..64d5bea 100644

[PATCH 1/3] wait: introduce wait_event_cmd_exclusive

2015-04-26 Thread Yuanhan Liu
That ends up introducing heavy lock contentions, and hurts performance badly. Here introduce wait_event_cmd_exclusive to relieve the lock contention naturally by letting wake_up() just wake up one process. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Yuanhan Liu --- include/linux/w

[PATCH 3/3 v2] md/raid5: per hash value and exclusive wait_for_stripe

2015-04-26 Thread Yuanhan Liu
o 97%. And as expected, the performance increased a lot, up to 260%, for fast device(ram disk). v2: use bits instead of array to note down wait queue need to wake up. Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 27 +++ drivers/md/raid5.h | 2 +- 2 files changed

Re: [PATCH 1/3] wait: introduce wait_event_cmd_exclusive

2015-04-28 Thread Yuanhan Liu
On Tue, Apr 28, 2015 at 04:13:15PM +0200, Peter Zijlstra wrote: > On Mon, Apr 27, 2015 at 12:51:01PM +0800, Yuanhan Liu wrote: > > It's just a variant of wait_event_cmd, with exclusive flag being set. > > > > For cases like RAID5, which puts many processes to sleep u

[PATCH 3/3] md/raid5: per hash value and exclusive wait_for_stripe

2015-04-28 Thread Yuanhan Liu
o 97%. And as expected, the performance increased a lot, up to 260%, for fast device(ram disk). v2: use bits instead of array to note down wait queue need to wake up. Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 27 +++ drivers/md/raid5.h | 2 +- 2 files changed

[PATCH 1/3 v2] wait: introduce wait_event_exclusive_cmd

2015-04-28 Thread Yuanhan Liu
e the same arguments - peterz Signed-off-by: Yuanhan Liu --- include/linux/wait.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/wait.h b/include/linux/wait.h index 2db8334..db78c72 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -358,6 +35

[PATCH 2/3] md/raid5: split wait_for_stripe and introduce wait_for_quiescent

2015-04-28 Thread Yuanhan Liu
(active_stripes == 0) Commit log refactor suggestion from Neil. Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 15 +-- drivers/md/raid5.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 77dfd72..64d5bea 100644

[LKP] [block] 5a19fe29ba7: +5.4% boot-slabinfo.num_objs

2015-04-29 Thread Yuanhan Liu
FYI, we noticed the below changes on git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block-generic-req commit 5a19fe29ba7d052c0d8fa8a2bf461abc1e4d89bb ("block: make generic_make_request handle arbitrarily sized bios") testbox/testcase/testparams: vm-kbuild-1G/boot/1 v4.1-r

Re: [LKP] [RAID5] 878ee679279: -1.8% vmstat.io.bo, +40.5% perf-stat.LLC-load-misses

2015-04-29 Thread Yuanhan Liu
On Fri, Apr 24, 2015 at 12:15:59PM +1000, NeilBrown wrote: > On Thu, 23 Apr 2015 14:55:59 +0800 Huang Ying wrote: > > > FYI, we noticed the below changes on > > > > git://neil.brown.name/md for-next > > commit 878ee6792799e2f88bdcac329845efadb205252f ("RAID5: batch adjacent > > full stripe writ

[PATCH 1/2] md/raid5: fix typo

2015-04-30 Thread Yuanhan Liu
bion -> bios Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 697d77a..2651bda 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2919,7 +291

[PATCH 2/2] md/raid5: trivial coding style fix

2015-04-30 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu --- drivers/md/raid5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2651bda..bae3e2c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5789,8 +5789,7 @@ static void raid5d(struct

Re: [PATCH 2/2] md/raid5: trivial coding style fix

2015-04-30 Thread Yuanhan Liu
On Thu, Apr 30, 2015 at 05:16:50PM +1000, NeilBrown wrote: > On Thu, 30 Apr 2015 15:01:17 +0800 Yuanhan Liu > wrote: > > > Signed-off-by: Yuanhan Liu > > --- > > drivers/md/raid5.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > >

Re: [PATCH 1/2] md/raid5: fix typo

2015-04-30 Thread Yuanhan Liu
On Thu, Apr 30, 2015 at 05:14:26PM +1000, NeilBrown wrote: > On Thu, 30 Apr 2015 15:01:16 +0800 Yuanhan Liu > wrote: > > > bion -> bios > > > > Signed-off-by: Yuanhan Liu > > --- > > drivers/md/raid5.c | 2 +- > > 1 file changed, 1 insertion(+)

[LKP] [genirq] d5b2eacdbc2: BUG: unable to handle kernel NULL pointer dereference at (null)

2015-04-30 Thread Yuanhan Liu
FYI, we noticed the below changes on https://github.com/jiangliu/linux.git test/irq_common_data_v2 commit d5b2eacdbc280da7c6dfbe0f52bb293ef227d349 ("genirq: Introduce struct irq_common_data to host shared irq data") +-++---

performance changes on 78373b73: -46.6% fsmark.files_per_sec, and few more

2015-04-20 Thread Yuanhan Liu
FYI, we found changes on `fsmark.files_per_sec' by 78373b7319abdf15050af5b1632c4c8b8b398f33: > commit 78373b7319abdf15050af5b1632c4c8b8b398f33 > Author: Jaegeuk Kim > AuthorDate: Fri Mar 13 21:44:36 2015 -0700 > Commit: Jaegeuk Kim > CommitDate: Fri Apr 10 15:08:45 2

Re: [PATCH 4/4] mm/rmap.c: move anon_vma initialization code into anon_vma_ctor

2013-11-03 Thread Yuanhan Liu
On Fri, Nov 01, 2013 at 11:04:40AM -0700, Linus Torvalds wrote: > On Fri, Nov 1, 2013 at 12:54 AM, Yuanhan Liu > wrote: > > @@ -67,19 +67,7 @@ static struct kmem_cache *anon_vma_chain_cachep; > > > > static inline struct anon_vma *anon_vma_alloc(void) > > { > &g

  1   2   >