Received: by 10.223.176.46 with SMTP id f43csp1491626wra; Wed, 24 Jan 2018 18:07:22 -0800 (PST) X-Google-Smtp-Source: AH8x2261xvYSIQunRLG7D9bMRk+FDRNCGw1VA1SNZMvP6nfOlrUGYcRhxElHs/tSSeF6QyYlJZ+W X-Received: by 10.99.172.25 with SMTP id v25mr12061418pge.148.1516846042621; Wed, 24 Jan 2018 18:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516846042; cv=none; d=google.com; s=arc-20160816; b=nYdO42O0s2IYJGtg5+QdsWjzMbir9I0VOVtTvmkhZkYfYugK2YKuMAVzqHs2+NuEgQ Av1zB7sIVGxE+fQqky+5NsZu1s2OnIr8rdpzB2yAP0JPhvSxdvrNF/ANooaR4Mo9WMrZ Tnsd2I/qTrhaRfdnefnCr8wprbJhgvC9t4ZyFdLKEUEkqj7YYWywZ58WENffYGGBohnD 70lMQ7A/GV1OzHZkM54zTszt5J6WRUnEp4K9EOpIR4skAAk8y0KeCsXlH8h4q5h8KPTT NwJXPNL+lc84GqEQacCUPhECqNleCh19k99DBVLLSMXh8opbVC2h4zPfKVGaXKFqPmbE Ii4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=mM+JOCx9sP7TvUInyqG9YcvBjziB62UgeezUWhEp2DI=; b=n4O+UusZH+YhtnvWNzSjGl73s81cy5Ud4e0huJwVMJISYwjzuBvzXXEkiiS0hyIAVJ BEv8HF3iROIqtRv+74/dwTpzobb1LhcBJ5205vJTRn8TVOimrXJemuDOSN9DktuOlq0V 33H6R6AgB22Ag8xxGkIedVoP/sMINDpXvdcEaIQS6BPivhxRwcQCSvYnwc8vuNm6/GZi ybl0XvBM6C3l2hKfziIU56FhkmVAmUQLOrhm/jp1GBfGlZtlAJthWW5ivh52X+ZULrKw 5myxOBeW/qrxfROEpxmTDmZ065EnErkFpBYW9UrIZvOEkWmA+KJesNtKCO/AWglxrY1z CO6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RJdtB44B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10-v6si1136524plz.107.2018.01.24.18.07.08; Wed, 24 Jan 2018 18:07:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RJdtB44B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbeAYCGn (ORCPT + 99 others); Wed, 24 Jan 2018 21:06:43 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:46102 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752462AbeAYCGm (ORCPT ); Wed, 24 Jan 2018 21:06:42 -0500 Received: by mail-io0-f196.google.com with SMTP id f34so6974019ioi.13 for ; Wed, 24 Jan 2018 18:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mM+JOCx9sP7TvUInyqG9YcvBjziB62UgeezUWhEp2DI=; b=RJdtB44Bxcb3Th+dRde79j20pZ1fxqqye83/FShLpfNrnBPge7A75uLp1HQ7zqy4NS /qxynj7b1+HEtcGbB12SmHlbAxy17tk+f7sPUqSTWXsm/XKHwf+xRIjrLMPb0mM4h3R4 JxP6GKzSRt1Xxt7KCUw5jzJpFlpCFihdo0cfvdWfCzBbglCiTLP8VRr5pC+bq+D3sY9V s8qV+L1zVtRbenalPGAQgaxfLj+OcUh6rfX/dyVmFnzryEFmZpvEuXw70KLQivciEBQJ ArU/81qT2z1Knj9Fwx/eY6cJ+N/iTMRf2Rrq2tcRcaZc1pJz+cWC9a/YQiaGbjiFOQEH Ce2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mM+JOCx9sP7TvUInyqG9YcvBjziB62UgeezUWhEp2DI=; b=ns45GA3q+fCRJtLO13DCB7X574XGsc4BTlkvv/zEXzBejcWe0IkfLzf5zoogMqUabj uAJJ9ZzTHebXsZFNigIXHia54jqFtQNg+2TBq0uVYLJnc0OBdlD5ghPGjqPLWVnIjwWI iPF1aWzKafqlsuTHH8CjNcGvQyZhErO8wsLph2mWYQnGVXXzLJzs94aoIKkdGFjdGOHC LiyVpfacZH+I9tKMIVkVwV3tc8t2j08gRIU7UdlSSCQ8+z9XW90zBanFBQ0d00TLHQGT oU8FUeRmh3Gn1WLJAAyIcyAC79xQBroeE4MuuQ9o3GoxN/L9aJ7qzAjQxyb7Yg12AdX9 /xCg== X-Gm-Message-State: AKwxyte7xM0TIuGtzBEeL/I/Erm7v87Ens69JMiURzsSj1IeiqLqsTQC 3dU07X+ojinsUtThSEzcfdioZEYF3KuAlCD1brM= X-Received: by 10.107.40.213 with SMTP id o204mr11039549ioo.74.1516846001628; Wed, 24 Jan 2018 18:06:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.59.75 with HTTP; Wed, 24 Jan 2018 18:06:41 -0800 (PST) In-Reply-To: References: <1515552545-18311-1-git-send-email-opensource.ganesh@gmail.com> <20180122155428.GB7714@kroah.com> From: Ganesh Mahendran Date: Thu, 25 Jan 2018 10:06:41 +0800 Message-ID: Subject: Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area To: Todd Kjos Cc: Greg KH , Martijn Coenen , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 >>> ---- >>> 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? Thanks for your review. > >> >> thanks, >> >> greg k-h