Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941533AbcKOJ4L (ORCPT ); Tue, 15 Nov 2016 04:56:11 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36592 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935704AbcKOJzz (ORCPT ); Tue, 15 Nov 2016 04:55:55 -0500 From: Ganesh Mahendran To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Cc: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, Ganesh Mahendran Subject: [V2] android: binder: use VM_ALLOC to get vm area Date: Tue, 15 Nov 2016 17:55:39 +0800 Message-Id: <1479203739-3806-1-git-send-email-opensource.ganesh@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 46 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 --- 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