Re: [PATCH v10 23/25] mm: add speculative page fault vmstats

2018-05-15 Thread Ganesh Mahendran
2018-04-17 22:33 GMT+08:00 Laurent Dufour : > Add speculative_pgfault vmstat counter to count successful speculative page > fault handling. > > Also fixing a minor typo in include/linux/vm_event_item.h. > > Signed-off-by: Laurent Dufour >

Re: [PATCH v10 23/25] mm: add speculative page fault vmstats

2018-05-15 Thread Ganesh Mahendran
2018-04-17 22:33 GMT+08:00 Laurent Dufour : > Add speculative_pgfault vmstat counter to count successful speculative page > fault handling. > > Also fixing a minor typo in include/linux/vm_event_item.h. > > Signed-off-by: Laurent Dufour > --- > include/linux/vm_event_item.h | 3 +++ >

[PATCH v2 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-04 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- v2: remove "if SMP" --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kcon

[PATCH v2 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-04 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran --- v2: remove "if SMP" --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index eb2cf4

[PATCH v2 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- v2: move find_vma() to do_page_fault() remove IS_ENABLED() remove fault != VM_FAULT_SIGSEGV check initilize vma = NULL --- arch/arm64/mm/fault.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff

[PATCH v2 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
-by: Ganesh Mahendran --- v2: move find_vma() to do_page_fault() remove IS_ENABLED() remove fault != VM_FAULT_SIGSEGV check initilize vma = NULL --- arch/arm64/mm/fault.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch

Re: [PATCH 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
2018-05-02 22:46 GMT+08:00 Punit Agrawal <punit.agra...@arm.com>: > Hi Ganesh, > > I was looking at evaluating speculative page fault handling on arm64 and > noticed your patch. > > Some comments below - Thanks for your review. > > Ganesh Mahendran <op

Re: [PATCH 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
2018-05-02 22:46 GMT+08:00 Punit Agrawal : > Hi Ganesh, > > I was looking at evaluating speculative page fault handling on arm64 and > noticed your patch. > > Some comments below - Thanks for your review. > > Ganesh Mahendran writes: > >> This patch e

Re: [PATCH 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
2018-05-02 17:07 GMT+08:00 Laurent Dufour <lduf...@linux.vnet.ibm.com>: > On 02/05/2018 09:54, Ganesh Mahendran wrote: >> This patch enables the speculative page fault on the arm64 >> architecture. >> >> I completed spf porting in 4.9. From the test result,

Re: [PATCH 2/2] arm64/mm: add speculative page fault

2018-05-04 Thread Ganesh Mahendran
2018-05-02 17:07 GMT+08:00 Laurent Dufour : > On 02/05/2018 09:54, Ganesh Mahendran wrote: >> This patch enables the speculative page fault on the arm64 >> architecture. >> >> I completed spf porting in 4.9. From the test result, >> we can see app launching time

Re: [PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-04 Thread Ganesh Mahendran
2018-05-02 20:23 GMT+08:00 Will Deacon <will.dea...@arm.com>: > On Wed, May 02, 2018 at 03:53:21PM +0800, Ganesh Mahendran wrote: >> Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This >> enables Speculative Page Fault handler. > > Are there are tests for thi

Re: [PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-04 Thread Ganesh Mahendran
2018-05-02 20:23 GMT+08:00 Will Deacon : > On Wed, May 02, 2018 at 03:53:21PM +0800, Ganesh Mahendran wrote: >> Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This >> enables Speculative Page Fault handler. > > Are there are tests for this? I'm really nervous about enabli

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-05-02 Thread Ganesh Mahendran
2018-03-29 15:50 GMT+08:00 Laurent Dufour <lduf...@linux.vnet.ibm.com>: > On 29/03/2018 05:06, Ganesh Mahendran wrote: >> 2018-03-29 10:26 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: >>> Hi, Laurent >>> >>> 2018-02-16 23:25 GMT+

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-05-02 Thread Ganesh Mahendran
2018-03-29 15:50 GMT+08:00 Laurent Dufour : > On 29/03/2018 05:06, Ganesh Mahendran wrote: >> 2018-03-29 10:26 GMT+08:00 Ganesh Mahendran : >>> Hi, Laurent >>> >>> 2018-02-16 23:25 GMT+08:00 Laurent Dufour : >>>> When the speculative page fault handl

[PATCH 2/2] arm64/mm: add speculative page fault

2018-05-02 Thread Ganesh Mahendran
-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- This patch is on top of Laurent's v10 spf --- arch/arm64/mm/fault.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 4165485..e7992a3

[PATCH 2/2] arm64/mm: add speculative page fault

2018-05-02 Thread Ganesh Mahendran
-by: Ganesh Mahendran --- This patch is on top of Laurent's v10 spf --- arch/arm64/mm/fault.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 4165485..e7992a3 100644 --- a/arch/arm64/mm/fault.c

[PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-02 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- This patch is on top of Laurent's v10 spf --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-02 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran --- This patch is on top of Laurent's v10 spf --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index

[PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-02 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- This patch is on top of Laurent's v10 spf --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH 1/2] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2018-05-02 Thread Ganesh Mahendran
Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for arm64. This enables Speculative Page Fault handler. Signed-off-by: Ganesh Mahendran --- This patch is on top of Laurent's v10 spf --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index

Re: [PATCH v3] PM / wakeup: use seq_open() to show wakeup stats

2018-05-01 Thread Ganesh Mahendran
Hi, Pavel Thanks for your review. 2018-04-29 22:30 GMT+08:00 Pavel Machek <pa...@ucw.cz>: > On Wed 2018-04-25 18:59:31, Ganesh Mahendran wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout

Re: [PATCH v3] PM / wakeup: use seq_open() to show wakeup stats

2018-05-01 Thread Ganesh Mahendran
Hi, Pavel Thanks for your review. 2018-04-29 22:30 GMT+08:00 Pavel Machek : > On Wed 2018-04-25 18:59:31, Ganesh Mahendran wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout when >> system memory is no

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-25 Thread Ganesh Mahendran
2018-04-02 14:46 GMT+08:00 Geert Uytterhoeven <ge...@linux-m68k.org>: > Hi Ganesh, > > On Mon, Apr 2, 2018 at 3:33 AM, Ganesh Mahendran > <opensource.gan...@gmail.com> wrote: >> 2018-03-30 19:00 GMT+08:00 Geert Uytterhoeven <ge...@linux-m68k.org>: >>&g

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-25 Thread Ganesh Mahendran
2018-04-02 14:46 GMT+08:00 Geert Uytterhoeven : > Hi Ganesh, > > On Mon, Apr 2, 2018 at 3:33 AM, Ganesh Mahendran > wrote: >> 2018-03-30 19:00 GMT+08:00 Geert Uytterhoeven : >>> On Fri, Mar 30, 2018 at 12:25 PM, Rafael J. Wysocki >>> wrote: >>>>

[PATCH v3] PM / wakeup: use seq_open() to show wakeup stats

2018-04-25 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

[PATCH v3] PM / wakeup: use seq_open() to show wakeup stats

2018-04-25 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-10 Thread Ganesh Mahendran
2018-04-02 18:32 GMT+08:00 Minchan Kim <minc...@kernel.org>: > Hi Ganesh, > > On Mon, Apr 02, 2018 at 06:01:59PM +0800, Ganesh Mahendran wrote: >> 2018-04-02 15:11 GMT+08:00 Minchan Kim <minc...@kernel.org>: >> > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-10 Thread Ganesh Mahendran
2018-04-02 18:32 GMT+08:00 Minchan Kim : > Hi Ganesh, > > On Mon, Apr 02, 2018 at 06:01:59PM +0800, Ganesh Mahendran wrote: >> 2018-04-02 15:11 GMT+08:00 Minchan Kim : >> > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh Mahendran wrote: >> >> 20

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-09 Thread Ganesh Mahendran
kernel.org> wrote: >> Hi Ganesh, >> >> On Mon, Apr 02, 2018 at 06:01:59PM +0800, Ganesh Mahendran wrote: >>> 2018-04-02 15:11 GMT+08:00 Minchan Kim <minc...@kernel.org>: >>> > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh Mahendran wrote: >>>

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-09 Thread Ganesh Mahendran
gt; On Mon, Apr 02, 2018 at 06:01:59PM +0800, Ganesh Mahendran wrote: >>> 2018-04-02 15:11 GMT+08:00 Minchan Kim : >>> > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh Mahendran wrote: >>> >> 2018-04-02 14:34 GMT+08:00 Minchan Kim : >>> >> > On

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-02 Thread Ganesh Mahendran
2018-04-02 15:11 GMT+08:00 Minchan Kim <minc...@kernel.org>: > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh Mahendran wrote: >> 2018-04-02 14:34 GMT+08:00 Minchan Kim <minc...@kernel.org>: >> > On Fri, Mar 30, 2018 at 12:04:07PM +0200, Greg Kroah-Hartman wrote: &g

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-02 Thread Ganesh Mahendran
2018-04-02 15:11 GMT+08:00 Minchan Kim : > On Mon, Apr 02, 2018 at 02:46:14PM +0800, Ganesh Mahendran wrote: >> 2018-04-02 14:34 GMT+08:00 Minchan Kim : >> > On Fri, Mar 30, 2018 at 12:04:07PM +0200, Greg Kroah-Hartman wrote: >> >> On Fri, Mar 30, 2018 at 10:29

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-02 Thread Ganesh Mahendran
2018-04-02 14:34 GMT+08:00 Minchan Kim <minc...@kernel.org>: > On Fri, Mar 30, 2018 at 12:04:07PM +0200, Greg Kroah-Hartman wrote: >> On Fri, Mar 30, 2018 at 10:29:21AM +0900, Minchan Kim wrote: >> > Hi Ganesh, >> > >> > On Fri, Mar 30, 2018 at 09:21:55AM

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-04-02 Thread Ganesh Mahendran
2018-04-02 14:34 GMT+08:00 Minchan Kim : > On Fri, Mar 30, 2018 at 12:04:07PM +0200, Greg Kroah-Hartman wrote: >> On Fri, Mar 30, 2018 at 10:29:21AM +0900, Minchan Kim wrote: >> > Hi Ganesh, >> > >> > On Fri, Mar 30, 2018 at 09:21:55AM +0800, Ganesh Mahendran w

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-01 Thread Ganesh Mahendran
2018-03-30 19:00 GMT+08:00 Geert Uytterhoeven <ge...@linux-m68k.org>: > On Fri, Mar 30, 2018 at 12:25 PM, Rafael J. Wysocki <r...@rjwysocki.net> > wrote: >> On Monday, March 5, 2018 9:47:46 AM CEST Ganesh Mahendran wrote: >>> single_open() interface requires t

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-01 Thread Ganesh Mahendran
2018-03-30 19:00 GMT+08:00 Geert Uytterhoeven : > On Fri, Mar 30, 2018 at 12:25 PM, Rafael J. Wysocki > wrote: >> On Monday, March 5, 2018 9:47:46 AM CEST Ganesh Mahendran wrote: >>> single_open() interface requires that the whole output must >>> fit into a

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-01 Thread Ganesh Mahendran
2018-03-30 18:25 GMT+08:00 Rafael J. Wysocki <r...@rjwysocki.net>: > On Monday, March 5, 2018 9:47:46 AM CEST Ganesh Mahendran wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout when >> sys

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-04-01 Thread Ganesh Mahendran
2018-03-30 18:25 GMT+08:00 Rafael J. Wysocki : > On Monday, March 5, 2018 9:47:46 AM CEST Ganesh Mahendran wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout when >> system memory is not in a good situat

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-03-29 Thread Ganesh Mahendran
2018-03-30 9:29 GMT+08:00 Minchan Kim <minc...@kernel.org>: > Hi Ganesh, > > On Fri, Mar 30, 2018 at 09:21:55AM +0800, Ganesh Mahendran wrote: >> 2018-03-29 14:54 GMT+08:00 Minchan Kim <minc...@kernel.org>: >> > binder_update_page_range needs down_write of mmap_

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-03-29 Thread Ganesh Mahendran
2018-03-30 9:29 GMT+08:00 Minchan Kim : > Hi Ganesh, > > On Fri, Mar 30, 2018 at 09:21:55AM +0800, Ganesh Mahendran wrote: >> 2018-03-29 14:54 GMT+08:00 Minchan Kim : >> > binder_update_page_range needs down_write of mmap_sem because >> > vm_insert_page need to ch

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-03-29 Thread Ganesh Mahendran
2018-03-29 14:54 GMT+08:00 Minchan Kim : > binder_update_page_range needs down_write of mmap_sem because > vm_insert_page need to change vma->vm_flags to VM_MIXEDMAP unless > it is set. However, when I profile binder working, it seems > every binder buffers should be mapped in

Re: [PATCH v5] ANDROID: binder: change down_write to down_read

2018-03-29 Thread Ganesh Mahendran
2018-03-29 14:54 GMT+08:00 Minchan Kim : > binder_update_page_range needs down_write of mmap_sem because > vm_insert_page need to change vma->vm_flags to VM_MIXEDMAP unless > it is set. However, when I profile binder working, it seems > every binder buffers should be mapped in advance by

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-29 Thread Ganesh Mahendran
ping. 2018-03-05 16:47 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: > single_open() interface requires that the whole output must > fit into a single buffer. This will lead to timeout when > system memory is not in a good situation. > > This patch use seq_open()

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-29 Thread Ganesh Mahendran
ping. 2018-03-05 16:47 GMT+08:00 Ganesh Mahendran : > single_open() interface requires that the whole output must > fit into a single buffer. This will lead to timeout when > system memory is not in a good situation. > > This patch use seq_open() to show wakeup stats. This method

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-28 Thread Ganesh Mahendran
2018-03-29 10:26 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: > Hi, Laurent > > 2018-02-16 23:25 GMT+08:00 Laurent Dufour <lduf...@linux.vnet.ibm.com>: >> When the speculative page fault handler is returning VM_RETRY, there is a >> chance that VMA fetc

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-28 Thread Ganesh Mahendran
2018-03-29 10:26 GMT+08:00 Ganesh Mahendran : > Hi, Laurent > > 2018-02-16 23:25 GMT+08:00 Laurent Dufour : >> When the speculative page fault handler is returning VM_RETRY, there is a >> chance that VMA fetched without grabbing the mmap_sem can be reused by the >>

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-28 Thread Ganesh Mahendran
Hi, Laurent 2018-02-16 23:25 GMT+08:00 Laurent Dufour : > When the speculative page fault handler is returning VM_RETRY, there is a > chance that VMA fetched without grabbing the mmap_sem can be reused by the > legacy page fault handler. By reusing it, we avoid

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-28 Thread Ganesh Mahendran
Hi, Laurent 2018-02-16 23:25 GMT+08:00 Laurent Dufour : > When the speculative page fault handler is returning VM_RETRY, there is a > chance that VMA fetched without grabbing the mmap_sem can be reused by the > legacy page fault handler. By reusing it, we avoid calling find_vma() > again. To

Re: [PATCH v9 00/24] Speculative page faults

2018-03-21 Thread Ganesh Mahendran
Hi, Laurent 2018-03-14 1:59 GMT+08:00 Laurent Dufour : > This is a port on kernel 4.16 of the work done by Peter Zijlstra to > handle page fault without holding the mm semaphore [1]. > > The idea is to try to handle user space page faults without holding the >

Re: [PATCH v9 00/24] Speculative page faults

2018-03-21 Thread Ganesh Mahendran
Hi, Laurent 2018-03-14 1:59 GMT+08:00 Laurent Dufour : > This is a port on kernel 4.16 of the work done by Peter Zijlstra to > handle page fault without holding the mm semaphore [1]. > > The idea is to try to handle user space page faults without holding the > mmap_sem. This should allow better

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-13 Thread Ganesh Mahendran
Hi, Andy 2018-03-14 0:39 GMT+08:00 Andy Shevchenko <andy.shevche...@gmail.com>: > On Mon, Mar 5, 2018 at 10:47 AM, Ganesh Mahendran > <opensource.gan...@gmail.com> wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer.

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-13 Thread Ganesh Mahendran
Hi, Andy 2018-03-14 0:39 GMT+08:00 Andy Shevchenko : > On Mon, Mar 5, 2018 at 10:47 AM, Ganesh Mahendran > wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout when >> system memory is

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-11 Thread Ganesh Mahendran
Hello, Rafael: 2018-03-05 16:47 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: > single_open() interface requires that the whole output must > fit into a single buffer. This will lead to timeout when > system memory is not in a good situation. > > This patch u

Re: [PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-11 Thread Ganesh Mahendran
Hello, Rafael: 2018-03-05 16:47 GMT+08:00 Ganesh Mahendran : > single_open() interface requires that the whole output must > fit into a single buffer. This will lead to timeout when > system memory is not in a good situation. > > This patch use seq_open() to show wakeup stats. Thi

[PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-05 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

[PATCH v2] PM / wakeup: use seq_open() to show wakeup stats

2018-03-05 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

Re: [PATCH] PM / wakeup: use seq_open() to show wakeup stats

2018-03-02 Thread Ganesh Mahendran
Hi, Rafael: 2018-03-02 16:58 GMT+08:00 Rafael J. Wysocki <raf...@kernel.org>: > On Fri, Mar 2, 2018 at 6:01 AM, Ganesh Mahendran > <opensource.gan...@gmail.com> wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer.

Re: [PATCH] PM / wakeup: use seq_open() to show wakeup stats

2018-03-02 Thread Ganesh Mahendran
Hi, Rafael: 2018-03-02 16:58 GMT+08:00 Rafael J. Wysocki : > On Fri, Mar 2, 2018 at 6:01 AM, Ganesh Mahendran > wrote: >> single_open() interface requires that the whole output must >> fit into a single buffer. This will lead to timeout when >> system memory is not in a

[PATCH] PM / wakeup: use seq_open() to show wakeup stats

2018-03-01 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

[PATCH] PM / wakeup: use seq_open() to show wakeup stats

2018-03-01 Thread Ganesh Mahendran
single_open() interface requires that the whole output must fit into a single buffer. This will lead to timeout when system memory is not in a good situation. This patch use seq_open() to show wakeup stats. This method need only one page, so timeout will not be observed. Signed-off-by: Ganesh

Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2018-03-01 Thread Ganesh Mahendran
Hi, Bart: 2018-03-02 7:11 GMT+08:00 Bart Van Assche <bart.vanass...@wdc.com>: > On Mon, 2017-06-05 at 17:37 +0800, Ganesh Mahendran wrote: >> In android system, when there are lots of threads running. Thread A >> holding *host_busy* count is easily to be preempted, and i

Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2018-03-01 Thread Ganesh Mahendran
Hi, Bart: 2018-03-02 7:11 GMT+08:00 Bart Van Assche : > On Mon, 2017-06-05 at 17:37 +0800, Ganesh Mahendran wrote: >> In android system, when there are lots of threads running. Thread A >> holding *host_busy* count is easily to be preempted, and if at the >> same time, threa

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-24 Thread Ganesh Mahendran
Hi, Martijn 2018-01-24 22:33 GMT+08:00 Martijn Coenen : > On Mon, Jan 22, 2018 at 4:54 PM, Greg KH wrote: >> Martijn and Todd, any objections to this patch? > > Looks good to me. Thanks for your review. Should I cherry-pick this change to aosp

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-24 Thread Ganesh Mahendran
Hi, Martijn 2018-01-24 22:33 GMT+08:00 Martijn Coenen : > On Mon, Jan 22, 2018 at 4:54 PM, Greg KH wrote: >> Martijn and Todd, any objections to this patch? > > Looks good to me. Thanks for your review. Should I cherry-pick this change to aosp kernel 3.10/3.18/4.4/4.9 now? Thanks. > >> >>

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-24 Thread Ganesh Mahendran
Hi, Todd: 2018-01-23 1:02 GMT+08:00 Todd Kjos <tk...@google.com>: > On Mon, Jan 22, 2018 at 7:54 AM, Greg KH <gre...@linuxfoundation.org> wrote: >> On Wed, Jan 10, 2018 at 10:49:05AM +0800, Ganesh Mahendran wrote: >>> VM_IOREMAP is used to access hardware through a m

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-24 Thread Ganesh Mahendran
Hi, Todd: 2018-01-23 1:02 GMT+08:00 Todd Kjos : > On Mon, Jan 22, 2018 at 7:54 AM, Greg KH wrote: >> On Wed, Jan 10, 2018 at 10:49:05AM +0800, Ganesh Mahendran wrote: >>> VM_IOREMAP is used to access hardware through a mechanism called >>> I/O mapped memory. Androi

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-23 Thread Ganesh Mahendran
Hi, Arve: 2018-01-23 2:55 GMT+08:00 Arve Hjønnevåg <a...@android.com>: > On Mon, Jan 22, 2018 at 9:02 AM, Todd Kjos <tk...@google.com> wrote: >> On Mon, Jan 22, 2018 at 7:54 AM, Greg KH <gre...@linuxfoundation.org> wrote: >>> On Wed, Jan 10, 2018 at 10:4

Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-23 Thread Ganesh Mahendran
Hi, Arve: 2018-01-23 2:55 GMT+08:00 Arve Hjønnevåg : > On Mon, Jan 22, 2018 at 9:02 AM, Todd Kjos wrote: >> On Mon, Jan 22, 2018 at 7:54 AM, Greg KH wrote: >>> On Wed, Jan 10, 2018 at 10:49:05AM +0800, Ganesh Mahendran wrote: >>>> VM_IOREMAP is used to access hardw

[PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-09 Thread Ganesh Mahendran
gt;[ 4482.440053] binder_alloc: binder_alloc_mmap_handler: 15728 8ce67000-8cf65000 get_vm_area failed -12 <3>[ 4483.218817] binder_alloc: binder_alloc_mmap_handler: 15745 8ce67000-8cf65000 get_vm_area failed -12 Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> V3: update

[PATCH v3] android: binder: use VM_ALLOC to get vm area

2018-01-09 Thread Ganesh Mahendran
gt;[ 4482.440053] binder_alloc: binder_alloc_mmap_handler: 15728 8ce67000-8cf65000 get_vm_area failed -12 <3>[ 4483.218817] binder_alloc: binder_alloc_mmap_handler: 15745 8ce67000-8cf65000 get_vm_area failed -12 Signed-off-by: Ganesh Mahendran V3: update comments V2: update comment

[PATCH] use macro SHIFT instead of hard code 32

2017-07-06 Thread Ganesh Mahendran
32 is already defined as macro SHIFT, so it's better to use macro SHIFT Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- Documentation/scheduler/sched-pelt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/scheduler/sched-pel

[PATCH] use macro SHIFT instead of hard code 32

2017-07-06 Thread Ganesh Mahendran
32 is already defined as macro SHIFT, so it's better to use macro SHIFT Signed-off-by: Ganesh Mahendran --- Documentation/scheduler/sched-pelt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/scheduler/sched-pelt.c b/Documentation/scheduler/sched-pelt.c

Re: [PATCH] sched/fair: fix contribution calculation

2017-07-05 Thread Ganesh Mahendran
Hello, Peter: 2017-07-05 19:59 GMT+08:00 Peter Zijlstra <pet...@infradead.org>: > On Wed, Jul 05, 2017 at 04:46:30PM +0800, Ganesh Mahendran wrote: >> Function __compute_runnable_contrib() is to calculate: >>\Sum 1024*y^n {for (1..n_period)} >> But LOAD_AVG_MAX

Re: [PATCH] sched/fair: fix contribution calculation

2017-07-05 Thread Ganesh Mahendran
Hello, Peter: 2017-07-05 19:59 GMT+08:00 Peter Zijlstra : > On Wed, Jul 05, 2017 at 04:46:30PM +0800, Ganesh Mahendran wrote: >> Function __compute_runnable_contrib() is to calculate: >>\Sum 1024*y^n {for (1..n_period)} >> But LOAD_AVG_MAX returns sum of 1024*y^n (0..n_p

[PATCH] sched/fair: fix contribution calculation

2017-07-05 Thread Ganesh Mahendran
Function __compute_runnable_contrib() is to calculate: \Sum 1024*y^n {for (1..n_period)} But LOAD_AVG_MAX returns sum of 1024*y^n (0..n_period). So we need to subtract 1024*y^0. Cc: sta...@vger.kernel.org Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- kernel/sched/

[PATCH] sched/fair: fix contribution calculation

2017-07-05 Thread Ganesh Mahendran
Function __compute_runnable_contrib() is to calculate: \Sum 1024*y^n {for (1..n_period)} But LOAD_AVG_MAX returns sum of 1024*y^n (0..n_period). So we need to subtract 1024*y^0. Cc: sta...@vger.kernel.org Signed-off-by: Ganesh Mahendran --- kernel/sched/fair.c | 2 +- 1 file changed, 1

Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2017-06-07 Thread Ganesh Mahendran
Ping~ Willing to hear some feed back :-) Thanks 2017-06-05 17:37 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: > In android system, when there are lots of threads running. Thread A > holding *host_busy* count is easily to be preempted, and if at the > same tim

Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2017-06-07 Thread Ganesh Mahendran
Ping~ Willing to hear some feed back :-) Thanks 2017-06-05 17:37 GMT+08:00 Ganesh Mahendran : > In android system, when there are lots of threads running. Thread A > holding *host_busy* count is easily to be preempted, and if at the > same time, thread B set *host_blocked*, then

[PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2017-06-05 Thread Ganesh Mahendran
ses {host|target|device}_busy count after dispatch cmd. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- drivers/scsi/scsi_lib.c | 66 - 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/scsi/scsi_lib.c

[PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2017-06-05 Thread Ganesh Mahendran
ses {host|target|device}_busy count after dispatch cmd. Signed-off-by: Ganesh Mahendran --- drivers/scsi/scsi_lib.c | 66 - 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c inde

Re: [PATCH] Revert "arm64: Increase the max granular size"

2017-04-06 Thread Ganesh Mahendran
2017-04-06 23:58 GMT+08:00 Catalin Marinas : > On Thu, Apr 06, 2017 at 12:52:13PM +0530, Imran Khan wrote: >> On 4/5/2017 10:13 AM, Imran Khan wrote: >> >> We may have to revisit this logic and consider L1_CACHE_BYTES the >> >> _minimum_ of cache line sizes in arm64

Re: [PATCH] Revert "arm64: Increase the max granular size"

2017-04-06 Thread Ganesh Mahendran
2017-04-06 23:58 GMT+08:00 Catalin Marinas : > On Thu, Apr 06, 2017 at 12:52:13PM +0530, Imran Khan wrote: >> On 4/5/2017 10:13 AM, Imran Khan wrote: >> >> We may have to revisit this logic and consider L1_CACHE_BYTES the >> >> _minimum_ of cache line sizes in arm64 systems supported by the

Re: [V2] android: binder: use VM_ALLOC to get vm area

2017-02-09 Thread Ganesh Mahendran
Hi, Greg: 2017-02-09 18:17 GMT+08:00 Greg KH <gre...@linuxfoundation.org>: > On Thu, Feb 09, 2017 at 05:54:03PM +0800, Ganesh Mahendran wrote: >> A gentle ping. > > I don't see a patch here that can be accepted, what are you asking for > a response from? I se

Re: [V2] android: binder: use VM_ALLOC to get vm area

2017-02-09 Thread Ganesh Mahendran
Hi, Greg: 2017-02-09 18:17 GMT+08:00 Greg KH : > On Thu, Feb 09, 2017 at 05:54:03PM +0800, Ganesh Mahendran wrote: >> A gentle ping. > > I don't see a patch here that can be accepted, what are you asking for > a response from? I sent a patch before: https://patchwork.kernel

Re: [V2] android: binder: use VM_ALLOC to get vm area

2017-02-09 Thread Ganesh Mahendran
A gentle ping. Thanks. 2016-11-15 21:18 GMT+08:00 Ganesh Mahendran <opensource.gan...@gmail.com>: > Hi, Greg > > 2016-11-15 18:18 GMT+08:00 Greg KH <gre...@linuxfoundation.org>: >> On Tue, Nov 15, 2016 at 05:55:39PM +0800, Ganesh Mahendran wrote: >>> VM_IOREMA

Re: [V2] android: binder: use VM_ALLOC to get vm area

2017-02-09 Thread Ganesh Mahendran
A gentle ping. Thanks. 2016-11-15 21:18 GMT+08:00 Ganesh Mahendran : > Hi, Greg > > 2016-11-15 18:18 GMT+08:00 Greg KH : >> On Tue, Nov 15, 2016 at 05:55:39PM +0800, Ganesh Mahendran wrote: >>> VM_IOREMAP is used to access hardware through a mechanism called >>>

Re: [PATCH] binder: replace kzalloc with kmem_cache

2016-12-13 Thread Ganesh Mahendran
Hi, Greg: Sorry for the late response. On Tue, Nov 22, 2016 at 02:53:02PM +0100, Greg KH wrote: > On Tue, Nov 22, 2016 at 07:17:30PM +0800, Ganesh Mahendran wrote: > > This patch use kmem_cache to allocate/free binder objects. > > Why do this? I am not very familiar with kmem

Re: [PATCH] binder: replace kzalloc with kmem_cache

2016-12-13 Thread Ganesh Mahendran
Hi, Greg: Sorry for the late response. On Tue, Nov 22, 2016 at 02:53:02PM +0100, Greg KH wrote: > On Tue, Nov 22, 2016 at 07:17:30PM +0800, Ganesh Mahendran wrote: > > This patch use kmem_cache to allocate/free binder objects. > > Why do this? I am not very familiar with kmem

[PATCH] binder: replace kzalloc with kmem_cache

2016-11-22 Thread Ganesh Mahendran
This patch use kmem_cache to allocate/free binder objects. It will have better memory efficiency. And we can also get object usage details in /sys/kernel/slab/* for futher analysis. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- drivers/android/binder.c

[PATCH] binder: replace kzalloc with kmem_cache

2016-11-22 Thread Ganesh Mahendran
This patch use kmem_cache to allocate/free binder objects. It will have better memory efficiency. And we can also get object usage details in /sys/kernel/slab/* for futher analysis. Signed-off-by: Ganesh Mahendran --- drivers/android/binder.c | 127

Re: [V2] android: binder: use VM_ALLOC to get vm area

2016-11-15 Thread Ganesh Mahendran
Hi, Greg 2016-11-15 18:18 GMT+08:00 Greg KH <gre...@linuxfoundation.org>: > On Tue, Nov 15, 2016 at 05:55:39PM +0800, Ganesh Mahendran wrote: >> VM_IOREMAP is used to access hardware through a mechanism called >> I/O mapped memory. Android binder is a IPC machanism which w

Re: [V2] android: binder: use VM_ALLOC to get vm area

2016-11-15 Thread Ganesh Mahendran
Hi, Greg 2016-11-15 18:18 GMT+08:00 Greg KH : > On Tue, Nov 15, 2016 at 05:55:39PM +0800, Ganesh Mahendran wrote: >> VM_IOREMAP is used to access hardware through a mechanism called >> I/O mapped memory. Android binder is a IPC machanism which will >> not access I/O memory.

[V2] android: binder: use VM_ALLOC to get vm area

2016-11-15 Thread Ganesh Mahendran
beforeafter average iterations per sec: 11199.9 11886.9 No performance regression found throgh binder test. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/an

[V2] android: binder: use VM_ALLOC to get vm area

2016-11-15 Thread Ganesh Mahendran
beforeafter average iterations per sec: 11199.9 11886.9 No performance regression found throgh binder test. Signed-off-by: Ganesh Mahendran --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/bind

Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
2016-09-02 3:59 GMT+08:00 Arve Hjønnevåg <a...@android.com>: > On Thu, Sep 1, 2016 at 12:02 PM, Greg KH <gre...@linuxfoundation.org> wrote: >> On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote: >>> VM_IOREMAP is used to access hardware through a m

Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
2016-09-02 3:59 GMT+08:00 Arve Hjønnevåg : > On Thu, Sep 1, 2016 at 12:02 PM, Greg KH wrote: >> On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote: >>> VM_IOREMAP is used to access hardware through a mechanism called >>> I/O mapped memory. Android bind

Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
Hi, Greg: 2016-09-02 3:02 GMT+08:00 Greg KH <gre...@linuxfoundation.org>: > On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote: >> VM_IOREMAP is used to access hardware through a mechanism called >> I/O mapped memory. Android binder is a IPC machanism which w

Re: [PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-05 Thread Ganesh Mahendran
Hi, Greg: 2016-09-02 3:02 GMT+08:00 Greg KH : > On Thu, Sep 01, 2016 at 02:41:04PM +0800, Ganesh Mahendran wrote: >> VM_IOREMAP is used to access hardware through a mechanism called >> I/O mapped memory. Android binder is a IPC machanism which will >> not access I/O memory.

[PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-01 Thread Ganesh Mahendran
EMAP) align = 1ul << clamp_t(int, fls_long(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); ... } This patch use VM_ALLOC to get vm area. Signed-off-by: Ganesh Mahendran <opensource.gan...@gmail.com> --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] android: binder: use VM_ALLOC to get vm area.

2016-09-01 Thread Ganesh Mahendran
EMAP) align = 1ul << clamp_t(int, fls_long(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); ... } This patch use VM_ALLOC to get vm area. Signed-off-by: Ganesh Mahendran --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/

  1   2   3   4   >