Received: by 10.223.176.46 with SMTP id f43csp3142797wra; Mon, 22 Jan 2018 09:03:50 -0800 (PST) X-Google-Smtp-Source: AH8x2272dwxv1d5p0TNi4uN9TzK0R+nP3NihOwYVrFeAfYq1kzq7RNAScmPKOP8YpBsnXnIt7Saa X-Received: by 10.36.185.22 with SMTP id w22mr8784334ite.58.1516640630121; Mon, 22 Jan 2018 09:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516640630; cv=none; d=google.com; s=arc-20160816; b=ZjJMenm2e2SJCgsjJs2CeQr6y4Cukef1xibbvzEmJHc8BlKVfpiqPcWKzRlRHmfOx/ io3Tr/gPo/sWDSHIW4fkUEWZ+6Dyyqgad6Ce++UTvGTZkFpl8+tI3VH0zCFsxPqAxBAG +o7kCMt9ZXOCZCU1O4eubrkXkTHHtb87rX4l504FTPoz1mf1DzYqErjLqy5hcOFgMa4u QfTV3CVuvDKroymuwFh80IcJg1aZkouaJAm1q08lZ25kH46W0/OjfS9C8R0RCNz835Hl 2v7uECzRkKc9kOaGGA8dUkixfMKMJ1cmvoPh6EWgo7YQKa/nER2TrgbrKBE76FCPESgh 1/pw== 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=uQMRp3Xx1YldLUGV6nh1yjsYwtPuf6j0+0+9uCBxUmo=; b=V66KGfrwp8QEx5xy9FP1fulCeU4t36ICmATS5ZCHKCqhIQmYzY/HWCRB5Bn4MNT2+Y sS3jg3z0UaoSbpcVkwyGRJ1//YGiEdCh+yrAF1vIrfLm9MqQ2TzAwVDiARoRMa8AeNT1 r2BomFJikVDc5q22s5QSmwGqqr0/VdL5BZ63R1Vku7iIWeheZOAobpE3+q7WXBfjdrHN G9xfMtpfrNWn+5ehTQrh8uPCEkl2mPJGI9Mkrsy8xTdCjinkIw/kKwdHfiECchjnPmLP a7YN1FsZVEzDmNdq09sD+TPjMhmDbZaN7xFv8UV2b7leCQM2UTtQvNjxvtrol/QhZPq5 cnmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ns7zjpgp; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t73si13246383ioi.54.2018.01.22.09.03.36; Mon, 22 Jan 2018 09:03:50 -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=@google.com header.s=20161025 header.b=ns7zjpgp; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbeAVRDB (ORCPT + 99 others); Mon, 22 Jan 2018 12:03:01 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:35863 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbeAVRDA (ORCPT ); Mon, 22 Jan 2018 12:03:00 -0500 Received: by mail-io0-f196.google.com with SMTP id l17so10142703ioc.3 for ; Mon, 22 Jan 2018 09:02:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uQMRp3Xx1YldLUGV6nh1yjsYwtPuf6j0+0+9uCBxUmo=; b=ns7zjpgpTmhHtozb9vkjpYbBgF1id2kvyNDNp7uvR7BSfsQnfDzIu85YEsyb+TdUcR EshyvJtyfaJShAXaSzASeUNmsZ7t8PCtCNha7+9vh5Jbx/dAcGa8KTGLWSvBACUsLKAe Bv4XL3yaF+psF9V9itrTIe0AGb8fV4nXeZn39AAxz4NIBt1i17ugnLX5vo+XrJRJyu+5 fv7qCC10HJaJqMWEGWZL3MOO+TWipoPDV1D+JJ6iF7A3s7u64/iWrZFEasjWKg1yPCuk uzHCZ7YSSGEOQA0dFGbvw6vykM1UjwqOUglaQpWe9hOr4SjQTBZQhi3iOU3UlWpiLRYz ZR0w== 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=uQMRp3Xx1YldLUGV6nh1yjsYwtPuf6j0+0+9uCBxUmo=; b=aBAGkJj2diBjWrOFZ3VbHTqvAkV72B8Fc3RG4Wbsx06b/keg5TlEKHgvVP0X2NWvgf BuovNPdBNw1f+2y6ZhCa4rwOntmzlKkYuK2dkFBBUULv2l/5kWGQPx4vTdFeChjwmkJE ap02UYaKHJrEECxq8mviM8uh8MQfD5oCM278NRjWogHkg3cBgjcCk3ecqqVFD+YrXmXK dc1R5ZLr1tjnk2QykvQHEraPsovaRd6oa8mVnJlZq1j6ntVRzrBsKSF0k0t7d+x2wNKQ WAl6lCFLsY54ZcaIq58h34BHK7oXZgaozDqWJCsxajFInm5PhpHED0vkzZnjF3tOOuT3 +jOg== X-Gm-Message-State: AKwxytcWHX0JFxB3CvaD6kcpQZyhsf9qt/6PjjKWFv21dzfUmuMPSyu8 ueYeFiPhOgf3hW4kQOhGfr3ENI40TgLYpt6dl2bdkw== X-Received: by 10.107.174.223 with SMTP id n92mr9040089ioo.305.1516640579057; Mon, 22 Jan 2018 09:02:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.162.196 with HTTP; Mon, 22 Jan 2018 09:02:57 -0800 (PST) In-Reply-To: <20180122155428.GB7714@kroah.com> References: <1515552545-18311-1-git-send-email-opensource.ganesh@gmail.com> <20180122155428.GB7714@kroah.com> From: Todd Kjos Date: Mon, 22 Jan 2018 09:02:57 -0800 Message-ID: Subject: Re: [PATCH v3] android: binder: use VM_ALLOC to get vm area To: Greg KH Cc: Ganesh Mahendran , 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 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, > > greg k-h