All of lore.kernel.org
 help / color / mirror / Atom feed
* [V2] android: binder: use VM_ALLOC to get vm area
@ 2016-11-15  9:55 Ganesh Mahendran
  2016-11-15 10:18 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ganesh Mahendran @ 2016-11-15  9:55 UTC (permalink / raw)
  To: linux-kernel, devel; +Cc: gregkh, arve, riandrews, Ganesh Mahendran

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.

Also VM_IOREMAP has alignment requiement which may not needed in
binder.
    __get_vm_area_node()
    {
    ...
        if (flags & VM_IOREMAP)
            align = 1ul << clamp_t(int, fls_long(size),
               PAGE_SHIFT, IOREMAP_MAX_ORDER);
    ...
    }

This patch use VM_ALLOC to get vm area.

Below is the throughput test result:

  # ./binderThroughputTest -w 100
  I run this command 10 times:
                               before    after
  average iterations per sec:  11199.9   11886.9

No performance regression found throgh binder test.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
---
 drivers/android/binder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 3c71b98..b5908ec 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2901,7 +2901,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
 		goto err_already_mapped;
 	}
 
-	area = get_vm_area(vma->vm_end - vma->vm_start, VM_IOREMAP);
+	area = get_vm_area(vma->vm_end - vma->vm_start, VM_ALLOC);
 	if (area == NULL) {
 		ret = -ENOMEM;
 		failure_string = "get_vm_area";
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2016-11-15  9:55 [V2] android: binder: use VM_ALLOC to get vm area Ganesh Mahendran
@ 2016-11-15 10:18 ` Greg KH
  2016-11-15 13:18   ` Ganesh Mahendran
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2016-11-15 10:18 UTC (permalink / raw)
  To: Ganesh Mahendran; +Cc: linux-kernel, devel, arve, riandrews

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.
> 
> Also VM_IOREMAP has alignment requiement which may not needed in
> binder.
>     __get_vm_area_node()
>     {
>     ...
>         if (flags & VM_IOREMAP)
>             align = 1ul << clamp_t(int, fls_long(size),
>                PAGE_SHIFT, IOREMAP_MAX_ORDER);
>     ...
>     }
> 
> This patch use VM_ALLOC to get vm area.
> 
> Below is the throughput test result:
> 
>   # ./binderThroughputTest -w 100
>   I run this command 10 times:
>                                before    after
>   average iterations per sec:  11199.9   11886.9
> 
> No performance regression found throgh binder test.
> 
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
> ---
>  drivers/android/binder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

What changed from v1?

Always list that below the --- line.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2016-11-15 10:18 ` Greg KH
@ 2016-11-15 13:18   ` Ganesh Mahendran
  2017-02-09  9:54     ` Ganesh Mahendran
  0 siblings, 1 reply; 7+ messages in thread
From: Ganesh Mahendran @ 2016-11-15 13:18 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel, Arve Hjønnevåg, Riley Andrews

Hi, Greg

2016-11-15 18:18 GMT+08:00 Greg KH <gregkh@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 will
>> not access I/O memory.
>>
>> Also VM_IOREMAP has alignment requiement which may not needed in
>> binder.
>>     __get_vm_area_node()
>>     {
>>     ...
>>         if (flags & VM_IOREMAP)
>>             align = 1ul << clamp_t(int, fls_long(size),
>>                PAGE_SHIFT, IOREMAP_MAX_ORDER);
>>     ...
>>     }
>>
>> This patch use VM_ALLOC to get vm area.
>>
>> Below is the throughput test result:
>>
>>   # ./binderThroughputTest -w 100
>>   I run this command 10 times:
>>                                before    after
>>   average iterations per sec:  11199.9   11886.9
>>
>> No performance regression found throgh binder test.
>>
>> Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
>> ---
>>  drivers/android/binder.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> What changed from v1?

Sorry for missing the change information.

In V2, I run the binder test. And there is no side effect with this
patch.

>
> Always list that below the --- line.

Thanks for reminder.

>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2016-11-15 13:18   ` Ganesh Mahendran
@ 2017-02-09  9:54     ` Ganesh Mahendran
  2017-02-09 10:17       ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ganesh Mahendran @ 2017-02-09  9:54 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel, Arve Hjønnevåg, Riley Andrews

A gentle ping.

Thanks.

2016-11-15 21:18 GMT+08:00 Ganesh Mahendran <opensource.ganesh@gmail.com>:
> Hi, Greg
>
> 2016-11-15 18:18 GMT+08:00 Greg KH <gregkh@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 will
>>> not access I/O memory.
>>>
>>> Also VM_IOREMAP has alignment requiement which may not needed in
>>> binder.
>>>     __get_vm_area_node()
>>>     {
>>>     ...
>>>         if (flags & VM_IOREMAP)
>>>             align = 1ul << clamp_t(int, fls_long(size),
>>>                PAGE_SHIFT, IOREMAP_MAX_ORDER);
>>>     ...
>>>     }
>>>
>>> This patch use VM_ALLOC to get vm area.
>>>
>>> Below is the throughput test result:
>>>
>>>   # ./binderThroughputTest -w 100
>>>   I run this command 10 times:
>>>                                before    after
>>>   average iterations per sec:  11199.9   11886.9
>>>
>>> No performance regression found throgh binder test.
>>>
>>> Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
>>> ---
>>>  drivers/android/binder.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> What changed from v1?
>
> Sorry for missing the change information.
>
> In V2, I run the binder test. And there is no side effect with this
> patch.
>
>>
>> Always list that below the --- line.
>
> Thanks for reminder.
>
>>
>> thanks,
>>
>> greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2017-02-09  9:54     ` Ganesh Mahendran
@ 2017-02-09 10:17       ` Greg KH
  2017-02-09 10:30         ` Ganesh Mahendran
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2017-02-09 10:17 UTC (permalink / raw)
  To: Ganesh Mahendran
  Cc: linux-kernel, devel, Arve Hjønnevåg, Riley Andrews

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?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2017-02-09 10:17       ` Greg KH
@ 2017-02-09 10:30         ` Ganesh Mahendran
  2017-02-09 10:55           ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ganesh Mahendran @ 2017-02-09 10:30 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, devel, Arve Hjønnevåg, Riley Andrews

Hi, Greg:

2017-02-09 18:17 GMT+08:00 Greg KH <gregkh@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 sent a patch before:
https://patchwork.kernel.org/patch/9429257/

Please help to review.

Thanks.

>
> confused,
>
> greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [V2] android: binder: use VM_ALLOC to get vm area
  2017-02-09 10:30         ` Ganesh Mahendran
@ 2017-02-09 10:55           ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-02-09 10:55 UTC (permalink / raw)
  To: Ganesh Mahendran
  Cc: linux-kernel, devel, Arve Hjønnevåg, Riley Andrews

On Thu, Feb 09, 2017 at 06:30:02PM +0800, Ganesh Mahendran wrote:
> Hi, Greg:
> 
> 2017-02-09 18:17 GMT+08:00 Greg KH <gregkh@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 sent a patch before:
> https://patchwork.kernel.org/patch/9429257/

I don't use patchwork, please respond to the patch you are referring to,
or resend it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-09 11:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15  9:55 [V2] android: binder: use VM_ALLOC to get vm area Ganesh Mahendran
2016-11-15 10:18 ` Greg KH
2016-11-15 13:18   ` Ganesh Mahendran
2017-02-09  9:54     ` Ganesh Mahendran
2017-02-09 10:17       ` Greg KH
2017-02-09 10:30         ` Ganesh Mahendran
2017-02-09 10:55           ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.