User: Password:
Subscribe / Log in / New account

KS2011: Patch review

KS2011: Patch review

Posted Oct 25, 2011 8:00 UTC (Tue) by dlang (subscriber, #313)
In reply to: KS2011: Patch review by swetland
Parent article: KS2011: Patch review

not counting hardware drivers for the moment, is there a list of what interfaces would need to get added to the kernel to get Android userspace to run on it?

and then of those interfaces, which ones need to actually be something other than a stub?

for example, wakelocks could probably be a stub, but an inter-process communications would have to actually work (I seem to remember reading that Android had a kernel assisted IPC protocol)

(Log in to post comments)

KS2011: Patch review

Posted Oct 25, 2011 8:08 UTC (Tue) by swetland (guest, #63414) [Link]

I'd need to look through things, but I suspect the answer is "not many", though some of them are pretty important (at least to Android).

Some of the notable ones off the top of my head:
- wakelocks
- binder (IPC subsystem) -- /dev/binder -- self-contained, in theory one could replace it with an entirely userspace implementation, in practice probably a lot of work
- logger driver -- /dev/logs/* -- multiple ring buffers for logging state without a lot of context switch overhead -- back when running on virtually tagged ARM9s this was very useful
- ION -- /dev/ion -- a unified approach to buffer management and sharing between display, GPU, camera, codecs, etc, new in Ice Cream Sandwich

Where possible we try to use standard interfaces -- for example, the power supply framework for battery charging and status, a lot of assorted interfaces via /sys, etc.

KS2011: Patch review

Posted Oct 25, 2011 8:17 UTC (Tue) by dlang (subscriber, #313) [Link]

is the logger driver really needed for the userspace to run? could you point me to documentation on it?

as for ION, since there is no code available yet, it's hard to talk about it.

KS2011: Patch review

Posted Oct 25, 2011 8:23 UTC (Tue) by swetland (guest, #63414) [Link]

Userspace should fail over to dropping all logs on the floor. Not useful but it should work.

We're still getting back online after the downtime, so I don't have a handy URL for browseable source. Before went down the ION kernel side sources were being developed in the open in the kernel repositories at

Hopefully it'll all be sorted out in the near future alongside the ICS userspace source release.

KS2011: Patch review

Posted Oct 25, 2011 18:01 UTC (Tue) by dlang (subscriber, #313) [Link]

this is the sort of thing I was thinking about when I was saying that things just needed to run, not implement everything.

I am thinking that the interfaces needed to just make things 'run' on a kernel is much smaller than what people have been trying to get submitted. And then once this smaller set is in place, things can be worked on much more easily.

while I have your attention, did you see Neil Brown's proposal for a userspace wakelock-type daemon? how hard would it be to modify the Android userspace to work with his proposal? As I understand it, there's only one daemon that actually talks to the kernel, everything else in the Android userspace talks to that daemon.

KS2011: Patch review

Posted Oct 25, 2011 9:31 UTC (Tue) by xav (subscriber, #18536) [Link]

Interesting. How does ION relate to the DMA buffer sharing mechanism [1] currently in discussion ?


KS2011: Patch review

Posted Oct 26, 2011 15:37 UTC (Wed) by (guest, #74477) [Link]

ION provides memory allocation and buffer sharing using file descriptors. The allocations come from carveouts.

dmabuf just deals with buffer sharing.

I imagine CMA + dmabuf would displace ION.

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds