[PATCH v3] media: siano: Fix coherent memory allocation failure on arm64

2018-03-03 Thread tomoki . sekiyama
From: Tomoki Sekiyama <tomoki.sekiy...@gmail.com> On some architectures such as arm64, siano chip based TV-tuner USB devices are not recognized correctly due to coherent memory allocation failure with the following error: [ 663.556135] usbcore: deregistering interface driver

[PATCH v3] media: siano: Fix coherent memory allocation failure on arm64

2018-03-03 Thread tomoki . sekiyama
From: Tomoki Sekiyama On some architectures such as arm64, siano chip based TV-tuner USB devices are not recognized correctly due to coherent memory allocation failure with the following error: [ 663.556135] usbcore: deregistering interface driver smsusb [ 683.624809] smsusb:smsusb_probe

[PATCH v2] media: siano: Fix coherent memory allocation failure on arm64

2018-03-03 Thread tomoki . sekiyama
From: Tomoki Sekiyama <tomoki.sekiy...@gmail.com> On some architectures such as arm64, siano chip based TV-tuner USB devices are not recognized correctly due to coherent memory allocation failure with the following error: [ 663.556135] usbcore: deregistering interface driver

[PATCH v2] media: siano: Fix coherent memory allocation failure on arm64

2018-03-03 Thread tomoki . sekiyama
From: Tomoki Sekiyama On some architectures such as arm64, siano chip based TV-tuner USB devices are not recognized correctly due to coherent memory allocation failure with the following error: [ 663.556135] usbcore: deregistering interface driver smsusb [ 683.624809] smsusb:smsusb_probe

[PATCH] media: siano: Fix coherent memory allocation failure on some arch

2018-01-04 Thread Tomoki Sekiyama
for DMA memory allocation for USB devices in such architectures. Signed-off-by: Tomoki Sekiyama <tomoki.sekiy...@gmail.com> --- drivers/media/common/siano/smscoreapi.c | 34 +++-- drivers/media/common/siano/smscoreapi.h | 2 ++ drivers/media/usb/siano/smsusb.c

[PATCH] media: siano: Fix coherent memory allocation failure on some arch

2018-01-04 Thread Tomoki Sekiyama
for DMA memory allocation for USB devices in such architectures. Signed-off-by: Tomoki Sekiyama --- drivers/media/common/siano/smscoreapi.c | 34 +++-- drivers/media/common/siano/smscoreapi.h | 2 ++ drivers/media/usb/siano/smsusb.c| 1 + 3 files changed, 27

[PATCH 1/2 v5] perf sched: fix wrong conversion of task state

2016-08-01 Thread Tomoki Sekiyama
Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com>

[PATCH 2/2 v5] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-01 Thread Tomoki Sekiyama
uce TASK_NOLOAD and TASK_IDLE"): Introduces new state 'N' - commit 7dc603c9028e ("sched/fair: Fix PELT integrity for new tasks"): Introduces new state 'n' Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: David Ahern &

[PATCH 1/2 v5] perf sched: fix wrong conversion of task state

2016-08-01 Thread Tomoki Sekiyama
Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama Fixes: cdce9d738b91e ("perf sched: Add

[PATCH 2/2 v5] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-01 Thread Tomoki Sekiyama
uce TASK_NOLOAD and TASK_IDLE"): Introduces new state 'N' - commit 7dc603c9028e ("sched/fair: Fix PELT integrity for new tasks"): Introduces new state 'n' Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu

[PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-07-31 Thread Tomoki Sekiyama
Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com>

[PATCH 2/2 v4] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-07-31 Thread Tomoki Sekiyama
Update TASK_STATE_TO_CHAR_STR macro to one from sched.h in the latest kernel, where 'N' and 'n' are introduced, 'X' and 'Z' are swapped. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Fixes: cdce9d738b91e ("perf sched: Add sched latency profiling") Cc: Jiri Olsa &

[PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-07-31 Thread Tomoki Sekiyama
Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama Fixes: cdce9d738b91e ("perf sched: Add

[PATCH 2/2 v4] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-07-31 Thread Tomoki Sekiyama
Update TASK_STATE_TO_CHAR_STR macro to one from sched.h in the latest kernel, where 'N' and 'n' are introduced, 'X' and 'Z' are swapped. Signed-off-by: Tomoki Sekiyama Fixes: cdce9d738b91e ("perf sched: Add sched latency profiling") Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim

RE: [PATCH v2] perf sched: fix wrong conversion of task state

2016-07-28 Thread Tomoki Sekiyama
+return bit < sizeof(str) - 1 ? str[bit] : '?'; > > You'd better use ARRAY_SIZE(str) instead of sizeof() for array here. OK, will change this to use ARRAY_SIZE on the next update. Thanks, Tomoki Sekiyama

RE: [PATCH v2] perf sched: fix wrong conversion of task state

2016-07-28 Thread Tomoki Sekiyama
+return bit < sizeof(str) - 1 ? str[bit] : '?'; > > You'd better use ARRAY_SIZE(str) instead of sizeof() for array here. OK, will change this to use ARRAY_SIZE on the next update. Thanks, Tomoki Sekiyama

[PATCH v3] perf sched: fix wrong conversion of task state

2016-07-28 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause invalid memory access. TASK_STATE_TO_CHAR_STR should also be fixed to adapt current kernel's sched.h. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Olsa <jo...@kerne

[PATCH v3] perf sched: fix wrong conversion of task state

2016-07-28 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause invalid memory access. TASK_STATE_TO_CHAR_STR should also be fixed to adapt current kernel's sched.h. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter

RE: [PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
14187 |499.705 ms | 39 | avg: 12.838 ms | yes:14188 |500.350 ms | 40 | avg: 12.506 ms | gnome-terminal-:12722 | 0.285 ms |3 | avg:0.025 ms | ... Thanks, Tomoki Sekiyama

RE: [PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
14187 |499.705 ms | 39 | avg: 12.838 ms | yes:14188 |500.350 ms | 40 | avg: 12.506 ms | gnome-terminal-:12722 | 0.285 ms |3 | avg:0.025 ms | ... Thanks, Tomoki Sekiyama

[PATCH v2] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Also, preempted tasks must be considered that they are in the THREAD_WAIT_CPU state. Signed-off-by: Tomoki Sekiyama

[PATCH v2] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Also, preempted tasks must be considered that they are in the THREAD_WAIT_CPU state. Signed-off-by: Tomoki Sekiyama Cc: Jiri

[PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: David

[PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu

[PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: David

[PATCH] perf sched: fix wrong conversion of task state

2016-07-27 Thread Tomoki Sekiyama
sched_out_state() converts the prev_state u64 bitmask to a char in a wrong way, which may cause wrong results of 'perf sched latency'. This patch fixes the conversion. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu

[PATCH] drivers/tty/hvc: don't free hvc_console_setup after init

2014-05-02 Thread Tomoki Sekiyama
'__init' to boot the guest successfully with 'console=hvc0'. Signed-off-by: Tomoki Sekiyama --- drivers/tty/hvc/hvc_console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 94f9e3a..0ff7fda 100644

[PATCH] drivers/tty/hvc: don't free hvc_console_setup after init

2014-05-02 Thread Tomoki Sekiyama
'__init' to boot the guest successfully with 'console=hvc0'. Signed-off-by: Tomoki Sekiyama --- drivers/tty/hvc/hvc_console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 94f9e3a..0ff7fda 100644

[PATCH] drivers/tty/hvc: don't free hvc_console_setup after init

2014-05-02 Thread Tomoki Sekiyama
'__init' to boot the guest successfully with 'console=hvc0'. Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- drivers/tty/hvc/hvc_console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 94f9e3a

[PATCH] drivers/tty/hvc: don't free hvc_console_setup after init

2014-05-02 Thread Tomoki Sekiyama
'__init' to boot the guest successfully with 'console=hvc0'. Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- drivers/tty/hvc/hvc_console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 94f9e3a

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-10-09 Thread Tomoki Sekiyama
Hi all, Is this patchset going to be merged into 3.12? Thanks, -- Tomoki On 9/23/13 16:14 , "Tejun Heo" wrote: >Hello, > >On Mon, Sep 23, 2013 at 08:11:55PM +0000, Tomoki Sekiyama wrote: >> >Hmm... why aren't we just changing elevator_init() to grab sy

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-10-09 Thread Tomoki Sekiyama
Hi all, Is this patchset going to be merged into 3.12? Thanks, -- Tomoki On 9/23/13 16:14 , Tejun Heo t...@kernel.org wrote: Hello, On Mon, Sep 23, 2013 at 08:11:55PM +, Tomoki Sekiyama wrote: Hmm... why aren't we just changing elevator_init() to grab sysfs_lock where necessary

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-09-23 Thread Tomoki Sekiyama
Hi Tejun, Thank you for the review. On 9/22/13 13:04 , "Tejun Heo" wrote: >On Fri, Aug 30, 2013 at 06:47:07PM -0400, Tomoki Sekiyama wrote: >> @@ -739,9 +739,17 @@ blk_init_allocated_queue(struct request_queue *q, >>request_fn_proc *rfn, >> >&g

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-09-23 Thread Tomoki Sekiyama
Hi Tejun, Thank you for the review. On 9/22/13 13:04 , Tejun Heo t...@kernel.org wrote: On Fri, Aug 30, 2013 at 06:47:07PM -0400, Tomoki Sekiyama wrote: @@ -739,9 +739,17 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, q-sg_reserved_size = INT_MAX

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-09-06 Thread Tomoki Sekiyama
Ping: any comments for this series? On 8/30/13 18:47 , "Tomoki Sekiyama" wrote: >The soft lockup below happens at the boot time of the system using dm >multipath and the udev rules to switch scheduler. > >[ 356.127001] BUG: soft lockup - CPU#3 stuck for 22s! [sh:483] >

Re: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-09-06 Thread Tomoki Sekiyama
Ping: any comments for this series? On 8/30/13 18:47 , Tomoki Sekiyama tomoki.sekiy...@hds.com wrote: The soft lockup below happens at the boot time of the system using dm multipath and the udev rules to switch scheduler. [ 356.127001] BUG: soft lockup - CPU#3 stuck for 22s! [sh:483

[PATCH v2 2/2] elevator: acquire q->sysfs_lock in elevator_change()

2013-08-30 Thread Tomoki Sekiyama
e lock is already taken by elv_iosched_store(). Signed-off-by: Tomoki Sekiyama --- block/elevator.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/block/elevator.c b/block/elevator.c index 02d4390..6d765f7 100644 --- a/block/elevator.c +++ b/block/elevator.c @@

[PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-08-30 Thread Tomoki Sekiyama
tion of q->sysfs_lock around elevator_init() into blk_init_allocated_queue(), to provide mutual exclusion between initialization of the q->scheduler and switching of the scheduler. This should fix this bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=902012 Signed-off-by: Tomoki Sekiyama --- bloc

[PATCH v2 1/2] elevator: Fix a race in elevator switching and md device initialization

2013-08-30 Thread Tomoki Sekiyama
-scheduler and switching of the scheduler. This should fix this bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=902012 Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- block/blk-core.c | 10 +- block/elevator.c |6 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff

[PATCH v2 2/2] elevator: acquire q-sysfs_lock in elevator_change()

2013-08-30 Thread Tomoki Sekiyama
taken by elv_iosched_store(). Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- block/elevator.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/block/elevator.c b/block/elevator.c index 02d4390..6d765f7 100644 --- a/block/elevator.c +++ b/block

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
On 8/29/13 16:29 , "Vivek Goyal" wrote: >On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: >> The soft lockup below happes at the boot time of the system using dm >> multipath and automated elevator switching udev rules. >> >> [ 356.127001] B

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
On 8/29/13 14:43 , "Vivek Goyal" wrote: >On Thu, Aug 29, 2013 at 02:33:10PM -0400, Vivek Goyal wrote: >> On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: >> > The soft lockup below happes at the boot time of the system using dm >> > multipath

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
Hi vivek, Thanks for your comments. On 8/29/13 14:33 , "Vivek Goyal" wrote: >On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: >> The soft lockup below happes at the boot time of the system using dm >> multipath and automated elevator switching udev ru

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
Hi vivek, Thanks for your comments. On 8/29/13 14:33 , Vivek Goyal vgo...@redhat.com wrote: On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: The soft lockup below happes at the boot time of the system using dm multipath and automated elevator switching udev rules

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
On 8/29/13 14:43 , Vivek Goyal vgo...@redhat.com wrote: On Thu, Aug 29, 2013 at 02:33:10PM -0400, Vivek Goyal wrote: On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: The soft lockup below happes at the boot time of the system using dm multipath and automated elevator switching

Re: [PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-29 Thread Tomoki Sekiyama
On 8/29/13 16:29 , Vivek Goyal vgo...@redhat.com wrote: On Mon, Aug 26, 2013 at 09:45:15AM -0400, Tomoki Sekiyama wrote: The soft lockup below happes at the boot time of the system using dm multipath and automated elevator switching udev rules. [ 356.127001] BUG: soft lockup - CPU#3 stuck

[PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-26 Thread Tomoki Sekiyama
This patch adds acquisition of q->sysfs_lock in blk_init_allocated_queue(). This also adds the lock into elevator_change() to ensure locking from the other path, as it is exposed function (and queue_attr_store will uses __elevator_change() now, the non-locking version of elevator_change()). Signed-off-b

[PATCH] elevator: Fix a race in elevator switching and md device initialization

2013-08-26 Thread Tomoki Sekiyama
the other path, as it is exposed function (and queue_attr_store will uses __elevator_change() now, the non-locking version of elevator_change()). Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- block/blk-core.c |6 +- block/elevator.c | 16 ++-- 2 files changed

Re: [RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-08-05 Thread Tomoki Sekiyama
On 8/1/13 17:04 , "Jens Axboe" wrote: >On 08/01/2013 02:28 PM, Tomoki Sekiyama wrote: >> On 7/30/13 10:09 PM, Shaohua Li wrote: >>> On Tue, Jul 30, 2013 at 03:30:33PM -0400, Tomoki Sekiyama wrote: >>>> Hi, >>>> >>>> When some a

Re: [RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-08-05 Thread Tomoki Sekiyama
On 8/1/13 17:04 , Jens Axboe ax...@kernel.dk wrote: On 08/01/2013 02:28 PM, Tomoki Sekiyama wrote: On 7/30/13 10:09 PM, Shaohua Li wrote: On Tue, Jul 30, 2013 at 03:30:33PM -0400, Tomoki Sekiyama wrote: Hi, When some application launches several hundreds of processes that issue only a few

Re: [RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-08-01 Thread Tomoki Sekiyama
On 7/30/13 10:09 PM, Shaohua Li wrote: > On Tue, Jul 30, 2013 at 03:30:33PM -0400, Tomoki Sekiyama wrote: >> Hi, >> >> When some application launches several hundreds of processes that issue >> only a few small sync I/O requests, CFQ may cause heavy latencies >&g

Re: [RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-08-01 Thread Tomoki Sekiyama
On 7/30/13 10:09 PM, Shaohua Li wrote: On Tue, Jul 30, 2013 at 03:30:33PM -0400, Tomoki Sekiyama wrote: Hi, When some application launches several hundreds of processes that issue only a few small sync I/O requests, CFQ may cause heavy latencies (10+ seconds at the worst case), although

[RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-07-30 Thread Tomoki Sekiyama
, avg=110236.79, stdev=303351.72 Average latency is reduced by 80%, and max is also reduced by 56%. Any comments are appreciated. Signed-off-by: Tomoki Sekiyama --- block/cfq-iosched.c | 36 +++- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/block

[RFC PATCH] cfq-iosched: limit slice_idle when many busy queues are in idle window

2013-07-30 Thread Tomoki Sekiyama
, avg=110236.79, stdev=303351.72 Average latency is reduced by 80%, and max is also reduced by 56%. Any comments are appreciated. Signed-off-by: Tomoki Sekiyama tomoki.sekiy...@hds.com --- block/cfq-iosched.c | 36 +++- 1 file changed, 31 insertions(+), 5 deletions

Re: Re: [RFC v2 PATCH 04/21] x86: Avoid RCU warnings on slave CPUs

2012-09-28 Thread Tomoki Sekiyama
Hi Paul, Thank you for your comments, and sorry for my late reply. On 2012/09/21 2:34, Paul E. McKenney wrote: > On Thu, Sep 06, 2012 at 08:27:40PM +0900, Tomoki Sekiyama wrote: >> Initialize rcu related variables to avoid warnings about RCU usage while >> slave CPUs is ru

[tip:x86/mm] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-28 Thread tip-bot for Tomoki Sekiyama
Commit-ID: fd0f5869724ff6195c6e7f12f8287c66a132e0ba Gitweb: http://git.kernel.org/tip/fd0f5869724ff6195c6e7f12f8287c66a132e0ba Author: Tomoki Sekiyama AuthorDate: Wed, 26 Sep 2012 11:11:28 +0900 Committer: H. Peter Anvin CommitDate: Thu, 27 Sep 2012 22:52:34 -0700 x86: Distinguish TLB

[tip:x86/mm] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-28 Thread tip-bot for Tomoki Sekiyama
Commit-ID: fd0f5869724ff6195c6e7f12f8287c66a132e0ba Gitweb: http://git.kernel.org/tip/fd0f5869724ff6195c6e7f12f8287c66a132e0ba Author: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com AuthorDate: Wed, 26 Sep 2012 11:11:28 +0900 Committer: H. Peter Anvin h...@linux.intel.com CommitDate: Thu

Re: Re: [RFC v2 PATCH 04/21] x86: Avoid RCU warnings on slave CPUs

2012-09-28 Thread Tomoki Sekiyama
Hi Paul, Thank you for your comments, and sorry for my late reply. On 2012/09/21 2:34, Paul E. McKenney wrote: On Thu, Sep 06, 2012 at 08:27:40PM +0900, Tomoki Sekiyama wrote: Initialize rcu related variables to avoid warnings about RCU usage while slave CPUs is running specified functions

Re: [PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-25 Thread Tomoki Sekiyama
Hi Alex, On 2012/09/25 11:57, Alex Shi wrote: > On 09/24/2012 09:37 AM, Alex Shi wrote: > >> On 09/20/2012 04:50 PM, Tomoki Sekiyama wrote: >> >>> unsigned int irq_resched_count; >>> unsigned int irq_call_count; >>> + /* irq_tlb_count is

Re: [PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-25 Thread Tomoki Sekiyama
Hi Alex, On 2012/09/25 11:57, Alex Shi wrote: On 09/24/2012 09:37 AM, Alex Shi wrote: On 09/20/2012 04:50 PM, Tomoki Sekiyama wrote: unsigned int irq_resched_count; unsigned int irq_call_count; + /* irq_tlb_count is double-counted in irq_call_count, so it must

Re: [PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-20 Thread Tomoki Sekiyama
ION_VECTOR"). This patch reverts TLB shootdowns entry in /proc/interrupts to count TLB shootdowns separately from the other function call interrupts. Signed-off-by: Tomoki Sekiyama Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alex Shi --- arch/x86/inclu

Re: [PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-20 Thread Tomoki Sekiyama
separately from the other function call interrupts. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Alex Shi alex@intel.com --- arch/x86/include/asm/hardirq.h |2

[PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-19 Thread Tomoki Sekiyama
This patch reverts TLB shootdowns entry in /proc/interrupts to count TLB shootdowns separately from the other function call interrupts. Signed-off-by: Tomoki Sekiyama Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Alex Shi --- arch/x86/include/asm/hardirq.h |2 +- a

[PATCH] x86: Distinguish TLB shootdown interrupts from other functions call interrupts

2012-09-19 Thread Tomoki Sekiyama
TLB shootdowns entry in /proc/interrupts to count TLB shootdowns separately from the other function call interrupts. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Alex Shi

Re: [RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-10 Thread Tomoki Sekiyama
Hi Jan, On 2012/09/07 17:26, Jan Kiszka wrote: > On 2012-09-06 13:27, Tomoki Sekiyama wrote: >> This RFC patch series provides facility to dedicate CPUs to KVM guests >> and enable the guests to handle interrupts from passed-through PCI devices >> directly (without VM exit

Re: [RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-10 Thread Tomoki Sekiyama
Hi Jan, On 2012/09/07 17:26, Jan Kiszka wrote: On 2012-09-06 13:27, Tomoki Sekiyama wrote: This RFC patch series provides facility to dedicate CPUs to KVM guests and enable the guests to handle interrupts from passed-through PCI devices directly (without VM exit and relay by the host

[RFC v2 PATCH 05/21] KVM: Enable/Disable virtualization on slave CPUs are activated/dying

2012-09-06 Thread Tomoki Sekiyama
Enable virtualization when slave CPUs are activated, and disable when the CPUs are dying using slave CPU notifier call chain. In x86, TSC kHz must also be initialized by tsc_khz_changed when the new slave CPUs are activated. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc

[RFC v2 PATCH 07/21] KVM: handle page faults of slave guests on online CPUs

2012-09-06 Thread Tomoki Sekiyama
for the guest is resumed on an online CPU. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_host.h | 15 +++ arch/x86/kvm/mmu.c | 13 + arch/x

[RFC v2 PATCH 06/21] KVM: Add facility to run guests on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
ion, kvm_arch_vcpu_put_migrate is used to avoid using IPI to clear loaded vmcs from the old CPU. Instead, this immediately clears vmcs. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_

[RFC v2 PATCH 03/21] x86: Support hrtimer on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
are called with CPU_SLAVE_UP when a slave CPU becomes active. When the slave CPU is stopped, callbacks are called with CPU_SLAVE_DYING on slave CPUs, and with CPU_SLAVE_DEAD on online CPUs. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc

[RFC v2 PATCH 02/21] x86: Add a facility to use offlined CPUs as slave CPUs

2012-09-06 Thread Tomoki Sekiyama
to manage whether CPU is slave. In addition, `cpu_online_or_slave_mask' is also provided for convenence of APIC handling, etc. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/Kconfig

[RFC v2 PATCH 01/21] x86: Split memory hotplug function from cpu_up() as cpu_memory_up()

2012-09-06 Thread Tomoki Sekiyama
Split memory hotplug function from cpu_up() as cpu_memory_up(), which will be used for assigning memory area to off-lined cpus at following patch in this series. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter

[RFC v2 PATCH 10/21] KVM: proxy slab operations for slave CPUs on online CPUs

2012-09-06 Thread Tomoki Sekiyama
-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_host.h |5 arch/x86/kvm/mmu.c | 52 --- arch/x86/kvm/mmu.h |4

[RFC v2 PATCH 18/21] KVM: route assigned devices' MSI/MSI-X directly to guests on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
this, if the guest issues EOI when there are no in-service interrupts in the virtual APIC, physical EOI is issued. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_host.h | 19 + ar

[RFC v2 PATCH 21/21] x86: request TLB flush to slave CPU using NMI

2012-09-06 Thread Tomoki Sekiyama
. Then, NMI handler will check the requests and handles the requests. This implementation has an issue in scalability, and is just for PoC. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/i

[RFC v2 PATCH 19/21] KVM: Enable direct EOI for directly routed interrupts to guests

2012-09-06 Thread Tomoki Sekiyama
after every virtual IRQ is handled. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/kvm/vmx.c | 69 ++-- 1 files changed, 67 insertions(+), 2

[RFC v2 PATCH 16/21] KVM: vmx: Add definitions PIN_BASED_PREEMPTION_TIMER

2012-09-06 Thread Tomoki Sekiyama
for EXIT_REASON_PREEMPTION_TIMER, which just goes back to VM execution soon. These are currently intended only to be used with avoid entering the guest on a slave CPU when vmx_prevent_run(vcpu, 1) is called. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H.

[RFC v2 PATCH 04/21] x86: Avoid RCU warnings on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
Initialize rcu related variables to avoid warnings about RCU usage while slave CPUs is running specified functions. Also notify RCU subsystem before the slave CPU is entered into idle state. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar

[RFC v2 PATCH 11/21] KVM: no exiting from guest when slave CPU halted

2012-09-06 Thread Tomoki Sekiyama
Avoid exiting from a guest on slave CPU even if HLT instruction is executed. Since the slave CPU is dedicated to a vCPU, exit on HLT is not required, and avoiding VM exit will improve the guest's performance. This is a partial revert of 10166744b80a ("KVM: VMX: remove yield_on_hlt") Cc:

[RFC v2 PATCH 12/21] x86/apic: Enable external interrupt routing to slave CPUs

2012-09-06 Thread Tomoki Sekiyama
to be routed either online CPUs or slave CPUs. In this patch, if online CPUs are contained in specified affinity settings, the affinity settings will be only applied to online CPUs. If every specified CPU is slave, IRQ will be routed to slave CPUs. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc

[RFC v2 PATCH 14/21] KVM: Directly handle interrupts by guests without VM EXIT on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
on slave CPUs. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/lapic.c|5 + arch/x86/kvm/vmx.c | 19 ++

[RFC v2 PATCH 20/21] KVM: Pass-through local APIC timer of on slave CPUs to guest VM

2012-09-06 Thread Tomoki Sekiyama
, and guest must use the same vector as host. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/apic.h |4 +++ arch/x86/include/asm/kvm_host.h |1 + arch/x86/kernel/apic/apic.c

[RFC v2 PATCH 17/21] KVM: add kvm_arch_vcpu_prevent_run to prevent VM ENTER when NMI is received

2012-09-06 Thread Tomoki Sekiyama
. This patch adds kvm_arch_vcpu_prevent_run(), which causes VM exit right after VM enter. The NMI handler uses this to ensure the execution of the guest is cancelled after NMI. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter

[RFC v2 PATCH 13/21] x86/apic: IRQ vector remapping on slave for slave CPUs

2012-09-06 Thread Tomoki Sekiyama
CPU with IRQ remapper of IOMMU. This is intended to be used to routing interrupts directly to KVM guest which is running on slave CPUs which do not cause VM EXIT by external interrupts. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: &q

[RFC v2 PATCH 15/21] KVM: add tracepoint on enabling/disabling direct interrupt delivery

2012-09-06 Thread Tomoki Sekiyama
Add trace event "kvm_set_direct_interrupt" to trace enabling/disabling direct interrupt delivery on slave CPUs. At the event, the guest rip and whether the feature is enabled or not is logged. Signed-off-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner

[RFC v2 PATCH 09/21] KVM: Go back to online CPU on VM exit by external interrupt

2012-09-06 Thread Tomoki Sekiyama
If the slave CPU receives an interrupt in running a guest, current implementation must once go back to onilne CPUs to handle the interupt. This behavior will be replaced by later patch, which introduces direct interrupt handling mechanism by the guest. Signed-off-by: Tomoki Sekiyama Cc: Avi

[RFC v2 PATCH 08/21] KVM: Add KVM_GET_SLAVE_CPU and KVM_SET_SLAVE_CPU to vCPU ioctl

2012-09-06 Thread Tomoki Sekiyama
-by: Tomoki Sekiyama Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/include/asm/kvm_host.h |2 + arch/x86/kvm/vmx.c |7 + arch/x86/kvm/x86.c | 58 ++

[RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-06 Thread Tomoki Sekiyama
cpu/cpu3/online - Launch qemu-kvm with -no-kvm-pit option. The offlined CPU is booted as a slave CPU and guest is runs on that CPU. * To-do - Enable slave CPUs to handle access fault - Support AMD SVM - Support non-Linux guests --- Tomoki Sekiyama (21): x86: request TLB flush to sl

[RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-06 Thread Tomoki Sekiyama
/cpu3/online - Launch qemu-kvm with -no-kvm-pit option. The offlined CPU is booted as a slave CPU and guest is runs on that CPU. * To-do - Enable slave CPUs to handle access fault - Support AMD SVM - Support non-Linux guests --- Tomoki Sekiyama (21): x86: request TLB flush to slave

[RFC v2 PATCH 08/21] KVM: Add KVM_GET_SLAVE_CPU and KVM_SET_SLAVE_CPU to vCPU ioctl

2012-09-06 Thread Tomoki Sekiyama
-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com --- arch/x86/include/asm/kvm_host.h |2 + arch/x86/kvm/vmx.c

[RFC v2 PATCH 09/21] KVM: Go back to online CPU on VM exit by external interrupt

2012-09-06 Thread Tomoki Sekiyama
If the slave CPU receives an interrupt in running a guest, current implementation must once go back to onilne CPUs to handle the interupt. This behavior will be replaced by later patch, which introduces direct interrupt handling mechanism by the guest. Signed-off-by: Tomoki Sekiyama

[RFC v2 PATCH 15/21] KVM: add tracepoint on enabling/disabling direct interrupt delivery

2012-09-06 Thread Tomoki Sekiyama
Add trace event kvm_set_direct_interrupt to trace enabling/disabling direct interrupt delivery on slave CPUs. At the event, the guest rip and whether the feature is enabled or not is logged. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo

[RFC v2 PATCH 13/21] x86/apic: IRQ vector remapping on slave for slave CPUs

2012-09-06 Thread Tomoki Sekiyama
CPU with IRQ remapper of IOMMU. This is intended to be used to routing interrupts directly to KVM guest which is running on slave CPUs which do not cause VM EXIT by external interrupts. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti

[RFC v2 PATCH 17/21] KVM: add kvm_arch_vcpu_prevent_run to prevent VM ENTER when NMI is received

2012-09-06 Thread Tomoki Sekiyama
. This patch adds kvm_arch_vcpu_prevent_run(), which causes VM exit right after VM enter. The NMI handler uses this to ensure the execution of the guest is cancelled after NMI. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa

[RFC v2 PATCH 20/21] KVM: Pass-through local APIC timer of on slave CPUs to guest VM

2012-09-06 Thread Tomoki Sekiyama
, and guest must use the same vector as host. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com --- arch/x86

[RFC v2 PATCH 14/21] KVM: Directly handle interrupts by guests without VM EXIT on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
on slave CPUs. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com --- arch/x86/include/asm/kvm_host.h |1

[RFC v2 PATCH 12/21] x86/apic: Enable external interrupt routing to slave CPUs

2012-09-06 Thread Tomoki Sekiyama
to be routed either online CPUs or slave CPUs. In this patch, if online CPUs are contained in specified affinity settings, the affinity settings will be only applied to online CPUs. If every specified CPU is slave, IRQ will be routed to slave CPUs. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama

[RFC v2 PATCH 11/21] KVM: no exiting from guest when slave CPU halted

2012-09-06 Thread Tomoki Sekiyama
Avoid exiting from a guest on slave CPU even if HLT instruction is executed. Since the slave CPU is dedicated to a vCPU, exit on HLT is not required, and avoiding VM exit will improve the guest's performance. This is a partial revert of 10166744b80a (KVM: VMX: remove yield_on_hlt) Cc:

[RFC v2 PATCH 04/21] x86: Avoid RCU warnings on slave CPUs

2012-09-06 Thread Tomoki Sekiyama
Initialize rcu related variables to avoid warnings about RCU usage while slave CPUs is running specified functions. Also notify RCU subsystem before the slave CPU is entered into idle state. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo

[RFC v2 PATCH 16/21] KVM: vmx: Add definitions PIN_BASED_PREEMPTION_TIMER

2012-09-06 Thread Tomoki Sekiyama
for EXIT_REASON_PREEMPTION_TIMER, which just goes back to VM execution soon. These are currently intended only to be used with avoid entering the guest on a slave CPU when vmx_prevent_run(vcpu, 1) is called. Signed-off-by: Tomoki Sekiyama tomoki.sekiyama...@hitachi.com Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa

  1   2   >