Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ION BoF
Laura Abbott
Sumit Semwal
ENGINEERS
AND DEVICES
WORKING
TOGETHER
Agenda
● ION in 2017: Laura Abbott
● Open Discussion
ION in 2017
Laura Abbott
LPC notes: https://etherpad.openstack.org/p/LPC2017_Android_Mobile
XDC 2017 video: https://www.youtube.com/watch?v=g5T5wSC...
A short Ion history
● Memory allocation framework originally written by Rebecca Schultz Zavin at
Google for Android
● Desi...
Do we still need Ion
● Yes, but in a different way
● Simple wrapper for dma_buf allocations to userspace (kernel?)
● Usefu...
What happened this last year?
● Ripped out a bunch of code and simplified things
● New allocation interface and ABI
○ Just...
Why is Ion still in staging - A B I
Split /dev/ion
● Lots of interest in going from /dev/ion -> /dev/ion/heap1, /dev/ion/heap2
● Patches to review for this
● ...
The allocation ABI
struct ion_allocation_data {
__u64 len;
__u32 heap_id_mask;
__u32 flags; ←Some people are running out o...
Query ioctl
struct ion_heap_query {
__u32 cnt; /* Total number of heaps to be copied */
__u32 reserved0; /* align to 64bit...
Questions
● Flags field has 16 bits reserved for vendor usage
● Already running out of space(!)
○ Expand? Tell people to b...
New heaps, Old heaps
● Addition of new heaps must have at least one open source user
● Delete old heaps for people to brin...
Debug accounting
● Memory leaks are painful, how to find out which process is at fault?
○ Someone forgot to close an fd, n...
Testing
● kselftest integration
● Allocation/free easy to test
● In kernel mapping APIs harder to test
● This is roughly a...
libion
● Currently exists as an AOSP git repo
● Similar to what libdrm provides, wrappers around ioctls
● Okay to just lea...
Destaging?
● Happening soon but not too soon
● Live under drivers/dma-buf?
Open Discussion
ENGINEERS
AND DEVICES
WORKING
TOGETHER
Open Discussion
● Secure Heaps - dma-buf or ION?
● Hypervisor support?
● Any other ...
Thank You
#SFO17
BUD17 keynotes and videos on: connect.linaro.org
For further information: www.linaro.org
Upcoming SlideShare
Loading in …5
×

BoF: ION - SFO17-412

187 views

Published on

Session ID: SFO17-412
Session Name: BoF: ION - SFO17-412
Speaker: Laura Abbott - Sumit Semwal
Track: LMG


★ Session Summary ★
ION has undergone a lot of change upstream in its bid to be de-staged. We’d give a brief update on what’s changed, the proposed libion changes, and then we’d like to discuss:
- [Actionable] feedback from members about what additional features does the upstream ION need to still support
- How can we encourage them to submit changes
- Any other ideas around ION in mainline.
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/sfo17/sfo17-412/
Presentation: ?
Video: https://www.youtube.com/watch?v=jkeFoqbEMJQ
---------------------------------------------------

★ Event Details ★
Linaro Connect San Francisco 2017 (SFO17)
25-29 September 2017
Hyatt Regency San Francisco Airport

---------------------------------------------------
Keyword:
'http://www.linaro.org'
'http://connect.linaro.org'
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://twitter.com/linaroorg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961

Published in: Technology
  • Be the first to comment

  • Be the first to like this

BoF: ION - SFO17-412

  1. 1. ION BoF Laura Abbott Sumit Semwal
  2. 2. ENGINEERS AND DEVICES WORKING TOGETHER Agenda ● ION in 2017: Laura Abbott ● Open Discussion
  3. 3. ION in 2017 Laura Abbott
  4. 4. LPC notes: https://etherpad.openstack.org/p/LPC2017_Android_Mobile XDC 2017 video: https://www.youtube.com/watch?v=g5T5wSCXkH4&t=3h32m30s
  5. 5. A short Ion history ● Memory allocation framework originally written by Rebecca Schultz Zavin at Google for Android ● Designed to manage memory pools ● These days, mostly for getting buffers to gralloc, uses dma_buf
  6. 6. Do we still need Ion ● Yes, but in a different way ● Simple wrapper for dma_buf allocations to userspace (kernel?) ● Useful for gralloc and gralloc like frameworks
  7. 7. What happened this last year? ● Ripped out a bunch of code and simplified things ● New allocation interface and ABI ○ Just an ioctl for allocation and querying the heaps ● Patches are pending for update to AOSP ○ Thanks John and Sumit!
  8. 8. Why is Ion still in staging - A B I
  9. 9. Split /dev/ion ● Lots of interest in going from /dev/ion -> /dev/ion/heap1, /dev/ion/heap2 ● Patches to review for this ● Question: Discoverability?
  10. 10. The allocation ABI struct ion_allocation_data { __u64 len; __u32 heap_id_mask; __u32 flags; ←Some people are running out of space? __u32 fd; __u32 unused; ← Okay to expand into here? };
  11. 11. Query ioctl struct ion_heap_query { __u32 cnt; /* Total number of heaps to be copied */ __u32 reserved0; /* align to 64bits */ __u64 heaps; /* buffer to be populated */ __u32 reserved1; __u32 reserved2; };
  12. 12. Questions ● Flags field has 16 bits reserved for vendor usage ● Already running out of space(!) ○ Expand? Tell people to be more clever? ● Need to access internal flags for state ○ New ioctl is_flag_set, returns bool?
  13. 13. New heaps, Old heaps ● Addition of new heaps must have at least one open source user ● Delete old heaps for people to bring back later
  14. 14. Debug accounting ● Memory leaks are painful, how to find out which process is at fault? ○ Someone forgot to close an fd, not surfaceflinger ● Idea: use lsof to show open fds, give dma_bufs unique names ● Enough correlation? ● Other ideas?
  15. 15. Testing ● kselftest integration ● Allocation/free easy to test ● In kernel mapping APIs harder to test ● This is roughly a dma-buf test?
  16. 16. libion ● Currently exists as an AOSP git repo ● Similar to what libdrm provides, wrappers around ioctls ● Okay to just leave in AOSP based on discussion in LPC
  17. 17. Destaging? ● Happening soon but not too soon ● Live under drivers/dma-buf?
  18. 18. Open Discussion
  19. 19. ENGINEERS AND DEVICES WORKING TOGETHER Open Discussion ● Secure Heaps - dma-buf or ION? ● Hypervisor support? ● Any other topics
  20. 20. Thank You #SFO17 BUD17 keynotes and videos on: connect.linaro.org For further information: www.linaro.org

×