From: Laura Abbott <labbott@redhat.com>
To: John Stultz <john.stultz@linaro.org>,
Brian Starkey <Brian.Starkey@arm.com>
Cc: "Andrew F. Davis" <afd@ti.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Christoph Hellwig" <hch@infradead.org>,
"Liam Mark" <lmark@codeaurora.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
lkml <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>, nd <nd@arm.com>
Subject: Re: [PATCH v2] staging: android: ion: Allocate from heap ID directly without mask
Date: Tue, 19 Feb 2019 12:43:47 -0800 [thread overview]
Message-ID: <17a3ed06-a46f-75c6-323c-3f486788a3b3@redhat.com> (raw)
In-Reply-To: <CALAqxLU=L3Y7KJEo9c-Nu1rS3EquofGf1UGWBWqAO+Qke72Ekw@mail.gmail.com>
On 2/15/19 11:01 AM, John Stultz wrote:
> On Fri, Feb 15, 2019 at 2:51 AM Brian Starkey <Brian.Starkey@arm.com> wrote:
>>
>> Hi John,
>>
>> On Thu, Feb 14, 2019 at 09:38:29AM -0800, John Stultz wrote:
>>>
>> [snip]
>>
>>> Some thoughts, as this ABI break has the potential to be pretty painful.
>>>
>>> 1) Unfortunately, this ABI is exposed *through* libion via
>>> ion_alloc/ion_alloc_fd out to gralloc implementations. Which means it
>>> will have a wider impact to vendor userland code.
>>
>> I figured libion could fairly easily loop through all the set bits in
>> heap_mask and call the ioctl for each until it succeeds. That
>> preserves the old behaviour from the libion clients' perspective.
>
> Potentially, though that implicitly still caps the heaps to 32. So
> I'm not sure what the net benefit would be.
>
>
>>> 2) For patches that cause ABI breaks, it might be good to make it
>>> clear in the commit what the userland impact looks like in userspace,
>>> possibly with an example, so the poor folks who bisect down the change
>>> as breaking their system in a year or so have a clear example as to
>>> what they need to change in their code.
>>>
>>> 3) Also, its not clear how a given userland should distinguish between
>>> the different ABIs. We already have logic in libion to distinguish
>>> between pre-4.12 legacy and post-4.12 implementations (using implicit
>>> ion_free() behavior). I don't see any such check we can make with this
>>> code. Adding another ABI version may require we provide an actual
>>> interface version ioctl.
>>>
>>
>> A slightly fragile/ugly approach might be to attempt a small
>> allocation with a heap_mask of 0xffffffff. On an "old" implementation,
>> you'd expect that to succeed, whereas it would/could be made to fail
>> in the "new" one.
>
> Yea I think having a proper ION_IOC_VERSION is going to be necessary.
>
> I'm hoping to send out an ugly first stab at the kernel side for
> switching to per-heap devices (with a config for keeping /dev/ion for
> legacy compat), which I hope will address the core issue this patch
> does (moving away from heap masks to specifically requested heaps).
>
> thanks
> -john
>
Arnd/Greg said no to this last time I tried back in 2016
https://lore.kernel.org/lkml/1472769644-11039-4-git-send-email-labbott@redhat.com/T/#u
prev parent reply other threads:[~2019-02-19 20:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 21:44 Andrew F. Davis
2019-02-14 17:38 ` John Stultz
2019-02-15 10:50 ` Brian Starkey
2019-02-15 19:01 ` John Stultz
2019-02-15 19:22 ` Andrew F. Davis
2019-02-15 19:58 ` John Stultz
2019-02-15 20:50 ` Andrew F. Davis
2019-02-15 21:15 ` John Stultz
2019-02-18 11:26 ` Brian Starkey
2019-02-19 20:43 ` Laura Abbott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17a3ed06-a46f-75c6-323c-3f486788a3b3@redhat.com \
--to=labbott@redhat.com \
--cc=Brian.Starkey@arm.com \
--cc=afd@ti.com \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lmark@codeaurora.org \
--cc=nd@arm.com \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®