[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMP5XgfcPeW3jCCtibxO9_4p0-okva6rWK2Zw=4yD7e3un8euA@mail.gmail.com>
Date: Mon, 22 Jan 2018 10:55:17 -0800
From: Arve Hjønnevåg <arve@...roid.com>
To: Todd Kjos <tkjos@...gle.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Ganesh Mahendran <opensource.ganesh@...il.com>,
Martijn Coenen <maco@...roid.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area
On Mon, Jan 22, 2018 at 9:02 AM, Todd Kjos <tkjos@...gle.com> wrote:
> On Mon, Jan 22, 2018 at 7:54 AM, Greg KH <gregkh@...uxfoundation.org> 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. Android binder is a IPC machanism which will
>>> not access I/O memory.
>>>
>>> And 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 will save some kernel vm area, especially for 32bit os.
>>>
>>> In 32bit OS, kernel vm area is only 240MB. We may got below
>>> error when launching a app:
>>>
>>> <3>[ 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.ganesh@...il.com>
>>> ----
>>> V3: update comments
>>> V2: update comments
>>> ---
>>> drivers/android/binder_alloc.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Martijn and Todd, any objections to this patch?
>
> Looks fine to me. Arve, do you remember the rationale for using VM_IOREMAP?
>
I don't remember for sure, but I think it used alloc_vm_area at some
point, and that uses VM_IOREMAP.
--
Arve Hjønnevåg
Powered by blists - more mailing lists