Received: by 10.223.185.116 with SMTP id b49csp2574804wrg; Mon, 12 Feb 2018 11:53:48 -0800 (PST) X-Google-Smtp-Source: AH8x224K7N3nAysErwump8JuqvAXSLOSYqF4eZN6YdLGTS3QCwxQAVcFbRdoOgpFUQ+em+5WMfVo X-Received: by 2002:a17:902:b94c:: with SMTP id h12-v6mr11828513pls.45.1518465228514; Mon, 12 Feb 2018 11:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518465228; cv=none; d=google.com; s=arc-20160816; b=ty50up7fle+gn8KN4oCWaHKcQ61r2fjOuvwSZfOtfBz+qu/nYH9S9twW8fxEWCmpAX JDK2UBW1RR2da0/3yhno75pvR8GZ+qV8zyFgU6b+exafplJN6zVhMKmf7UwvyEsUCRVq zyqDDQmVPGjtrU6Ngv8gctjeXORm6TsrOz0tWHRgpZde7lDQbNWm2cHwTsNhilGWQJT7 yHimG7clpMBqw3xxmc4K8HrYbRF8JwhtmmHrh+7b0LV4XBYKdBLiXLNDmJOROPZIW8p/ tA69BxC1rZffKYjGLo3wWgmYH2o09R2hH1d8fBGVamirpJ+ZVnmJaynZqPPTTpHsp1d2 2hSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=bIrLZSnzrOVGMimSu9M5L214En+H0tGA7KxlU+hjaPk=; b=ltrNZxs+C2gzUdnUNJHOtv0+GVYuECB2z0669aNZ4gSlsd6NX2ltQZUHl+ZlMW97Ag 64ICB9K74ZgzqNlqpYftqiAuOwlomC6jD0tmVQSK/iuOkxVhzL6Gp95uShTuG/ykhd9l YL85b+xBV3YlirWDDvtw33YOKY2bd35rr3jBMQKEN158I9tzX2laqT1/wdz5ocLdwheB kIc0AODDd3hU49Q4FNwaleGw9HzZcREMKAyIWEZOl39XKpDcxtTGILNPS0PpD7lqvRXk FJ9g7NgFPTeBfTeo5B1GMuY22J6VSJp+Qppj1zK4flrUWyqL2QNWbqP3jJTt+RwQRjPc ABRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si2562553pgc.708.2018.02.12.11.53.33; Mon, 12 Feb 2018 11:53:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbeBLTwO (ORCPT + 99 others); Mon, 12 Feb 2018 14:52:14 -0500 Received: from mail-ot0-f177.google.com ([74.125.82.177]:41209 "EHLO mail-ot0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754052AbeBLTwL (ORCPT ); Mon, 12 Feb 2018 14:52:11 -0500 Received: by mail-ot0-f177.google.com with SMTP id r23so15087905ote.8 for ; Mon, 12 Feb 2018 11:52:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bIrLZSnzrOVGMimSu9M5L214En+H0tGA7KxlU+hjaPk=; b=nVN2aN7dBj24stsB0FljTxEco5Y+D0XxqKkC158CkvmWzUITC4oPVKiSHDH1imATtW gEG8MmXmt/JLJsJgbqRixgUK6wrxpYVo+gZUCNpXzxviOCkzaEmE6nL2+Y4DPhDNYheI q9Iv11S9+uYRAwf0aNiXpDgTvVoxEVyRqpzhYdKldYPiqulOfov+wwmA3bWGLyewHxQi ufkz7TcI1f1F1J75o5DDg8IejTDlxaGmWdAbT4zPPmFPyoE3BChpG/wON2tLWF0tSdg5 FeD8AKd0S79T99Ur0nwABzGo1Tf/1eJ5ig2nl0FildWWQfNkiGzNcbqTisWKPkvRKHAy l/Ag== X-Gm-Message-State: APf1xPD2SElRJx+wYoQf6NBnmRIBiqLCfLreCb7YgiwHZyqSp/MeIHEp e+YhD5gyYsiUObZEpw2QQb4mfDPkqiA= X-Received: by 10.157.14.12 with SMTP id c12mr10371106otc.43.1518465130371; Mon, 12 Feb 2018 11:52:10 -0800 (PST) Received: from ?IPv6:2601:602:9802:a8dc::f21a? ([2601:602:9802:a8dc::f21a]) by smtp.gmail.com with ESMTPSA id 51sm438794oti.26.2018.02.12.11.52.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 11:52:09 -0800 (PST) Subject: Re: [PATCH] staging: android: ion: Add requested allocation alignment To: Alexey Skidanov , sumit.semwal@linaro.org, gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org, Liam Mark References: <1518257863-6903-1-git-send-email-alexey.skidanov@intel.com> <8284b2ba-a532-23fd-4c52-7ac556d63918@intel.com> From: Laura Abbott Message-ID: Date: Mon, 12 Feb 2018 11:52:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <8284b2ba-a532-23fd-4c52-7ac556d63918@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/2018 11:11 AM, Alexey Skidanov wrote: > > On 02/12/2018 08:42 PM, Laura Abbott wrote: >> On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >>> Current ion defined allocation ioctl doesn't allow to specify the >>> requested >>> allocation alignment. CMA heap allocates buffers aligned on buffer size >>> page order. >>> >>> Sometimes, the alignment requirement is less restrictive. In such cases, >>> providing specific alignment may reduce the external memory fragmentation >>> and in some cases it may avoid the allocation request failure. >>> >> I really do not want to bring this back as part of the regular >> ABI. > Yes, I know it was removed in 4.12. > Having an alignment parameter that gets used for exactly >> one heap only leads to confusion (which is why it was removed >> from the ABI in the first place). > You are correct regarding the CMA heap. But, probably it may be used by > custom heap as well. I can think of a lot of instances where it could be used but ultimately there needs to be an actual in kernel user who wants it. >> The alignment came from the behavior of the DMA APIs. Do you >> actually need to specify any alignment from userspace or do >> you only need page size? > Yes. If CMA gives it for free, I would suggest to let the ion user to decide I'm really not convinced changing the ABI yet again just to let the user decide is actually worth it. If we can manage it, I'd much rather see a proposal that doesn't change the ABI. >> Thanks, >> Laura >> > Thanks, > Alexey >