See, NOW it makes sense...
See, NOW it makes sense...
Posted Feb 3, 2010 21:14 UTC (Wed) by dberlin (subscriber, #24694)In reply to: See, NOW it makes sense... by mjg59
Parent article: Greg Kroah-Hartman: Android and the Linux kernel community
Great, sounds like you are volunteering to actually remove them and show
that this is the case, right?
Posted Feb 3, 2010 21:21 UTC (Wed)
by mjg59 (subscriber, #23239)
[Link] (12 responses)
Posted Feb 4, 2010 7:31 UTC (Thu)
by cdibona (guest, #13739)
[Link] (11 responses)
Posted Feb 4, 2010 11:36 UTC (Thu)
by kragil (guest, #34373)
[Link] (1 responses)
How about giving contributors not employed by Google or Open Handset members
It is easy to do (just grep some SCM output, or just put "providing proof"
Kernel hackers would certainly be ledgeable and if they bother to apply for
Disclaimer: I certainly wouldn't qualify.
Posted Feb 4, 2010 14:12 UTC (Thu)
by gregkh (subscriber, #8)
[Link]
Posted Feb 4, 2010 14:16 UTC (Thu)
by mjg59 (subscriber, #23239)
[Link] (7 responses)
Posted Feb 5, 2010 19:38 UTC (Fri)
by jejb (subscriber, #6654)
[Link]
If google wishes to offer fair terms for this type of challenge, count me in. I've already done quite a bit of android hacking with the G1 Qualcomm gave me. It looks to me like the move off wakelocks (and possibly binders) can be contained to some small glue changes in bionic and some of the java classes.
I'd suggest reasonable terms be that if we get this working acceptably (meaning comparable battery life to the existing 2.6.29 implementation), Google would commit to moving to the upstream kernel we produce and integrating the necessary changes (whether ours or rewritten ones) into the android user code.
Posted Feb 7, 2010 9:11 UTC (Sun)
by swetland (guest, #63414)
[Link] (5 responses)
One thing we are working on doing is getting the external open tree to the point where it's trivial for somebody to check it out and do a full from-source build for Nexus One (which is completely unlockable and reflashable, as shipped from the factory). This then gives everyone some common ground to test patches against, and perhaps measure power consumption of various builds across the normal range of testcases.
At the moment the remaining issues are some build system cleanup, and sorting out redistribution of the handful of userspace proprietary binary modules (roughly 10 libraries/binaries -- fewer, if I'm reading the wiki right, than in a N900).
I can't promise you that we'd absolutely take a change -- it'd have to be verified to actually be better (or at least no worse), across the board, on power management, and that there were no regressions in stability or correctness of any driver. We spent quite a lot of time measuring power usage both in lab and field trial environments -- changes that fundamentally alter how this works get a lot of scrutiny.
Posted Feb 7, 2010 19:07 UTC (Sun)
by mjg59 (subscriber, #23239)
[Link] (2 responses)
The early suspend infrastructure is more interesting. I think it's fair to say that it's a somewhat hacky solution to the problem (take msm_fb - early_suspend and earlier_suspend?), but the problem it's solving is certainly legitimate. Rafael's been working on a mechanism for providing a power management dependency tree that's orthogonal to the device tree. I'd hope that this would provide the necessary functionality that we could do without early suspend, but it'd be great to talk about that.
Wakelocks are obviously the most controversial aspect of this. I think the main problem is that there's never been a terribly convincing answer as to why wakelocks are the appropriate solution to the problem. The upstream omap tree's approach has been to implement core suspend as a cpuidle state with appropriate latency restrictions. That fits in nicely with how other architectures manage this kind of functionality, so I think the onus is really on Google to explain why wakelocks provide more functionality than something that makes use of existing kernel code.
I appreciate that the "Please throw all of this out and rewrite it from scratch" attitude is a problem, and I'd entirely understand if Google don't feel that the work required to rework all of this in a way that upstream approves of would be justifiable. On the other hand, Android's absence from various forums (the collaboration summit, LPC, Linuxcon, the power management mini-summits and so on) makes it much harder for us to appreciate why this difference of opinion exists. It's true that the initial response to wakelocks was pretty universally negative without a lot of effort being spent on figuring out alternative solutions that would be mutually acceptable, and I'm certainly sorry that it happened that way - but at this point I suspect that we've been largely talking past each other for the best part of a year, and it would be good to spend some time figuring out why we have this fundamental disagreement before having another round of acrimonious debate culminating in another pile of code that goes nowhere.
Posted Feb 8, 2010 5:56 UTC (Mon)
by swetland (guest, #63414)
[Link] (1 responses)
I thought we had actually explained a number of situations where wakelocks provide value beyond existing solutions -- I'll have to dig through the linux-pm threads and try to extract some stuff from there. One thing we're looking to do is put together a clean writeup of the "why" behind all this as a basis for discussion.
I don't see how retention from idle (which we do as well) fully solves the problem -- since you can easily have situations, in an environment where you can't control every process/thread (300+ threads in a typical android system at boot -- yeah, kinda crazy, but it is what it is). Going to suspend means we don't need to worry about non-optimal software with polling/periodic behaviors causing the CPU to wake up more often than ideal. Also, you still have situations in which you *can't* go to full retention in idle because of a driver being busy (which is what idlelocks -- just another class of wakelock) are about.
I think it would be extremely valuable to get some folks together somewhere and try to hash some of this out. In general we are not opposed to slightly different ways of doing things as long as we accomplish what we need to accomplish power-wise. I mean, Arve's already respun the wakelock API (now suspend_blocker, no?) several times in response to various feedback.
I'd love to engage in a forum where the goal is to solve common problems rather than assign blame -- Greg's blogpost implying that he's giving a CELF keynote about how we suck does not create much enthusiasm on our side for attending, for example.
We know that some people would have been happier if we worked out a design for all of this before 1.0 shipped, but that didn't happen, and arguing about how practical it would have been or not doesn't really gain anybody anything. Figuring out how to collaborate on things so that future issues get sorted out earlier and more smoothly seems entirely worthwhile though.
So when/where is the next time/place that we could meet up with the other interest parties on the linux-pm front and talk about these things?
Posted Feb 8, 2010 6:34 UTC (Mon)
by mjg59 (subscriber, #23239)
[Link]
The drivers side of thing is more interesting, and I think that's something that could potentially
The next linux pm summit is planned for Boston in August, which is kind of far away. There's the
Posted Feb 7, 2010 23:54 UTC (Sun)
by kragil (guest, #34373)
[Link] (1 responses)
Chris? Fix that :)
Our editor is really cheap for big corps that have revenues like MS has
Posted Feb 8, 2010 5:59 UTC (Mon)
by cdibona (guest, #13739)
[Link]
Posted Feb 5, 2010 19:43 UTC (Fri)
by jejb (subscriber, #6654)
[Link]
http://lwn.net/Articles/373173/
Are our terms acceptable, or would you like to add other conditions?
Posted Feb 3, 2010 21:23 UTC (Wed)
by dlang (guest, #313)
[Link] (16 responses)
Posted Feb 3, 2010 21:46 UTC (Wed)
by jebba (guest, #4439)
[Link] (1 responses)
Posted Feb 3, 2010 21:48 UTC (Wed)
by mjg59 (subscriber, #23239)
[Link]
Posted Feb 3, 2010 21:49 UTC (Wed)
by dcbw (guest, #50562)
[Link] (13 responses)
But they both have to solve the same problems (power management) and the fact that Nokia seems to get good battery life out of their devices appears at first glance to be a counterpoint to the necessity of wakelocks.
Posted Feb 3, 2010 21:55 UTC (Wed)
by dlang (guest, #313)
[Link] (12 responses)
is there anything that would prevent android from being run on the nokia phones, or the nokia software from running on android phones (other than the fact that some drivers are only in the android fork and the android fork does not include all the drivers in the main kernel)?
Posted Feb 3, 2010 22:04 UTC (Wed)
by dcbw (guest, #50562)
[Link] (11 responses)
As a company building phones, would you rather just use the same hardware Google build Android for, or would you rather invest a ton of time into porting Android to another SoC and write completely new SDIO, radio, power-management, etc drivers while your competitors come out with 3 new phones?
It makes a ton of sense that (AFAIK) nobody has come out with a non-Qualcomm Android phone, since to do so would require a significant investment. If you use Qualcomm MSM7K or MSM8K (snapdragon) platforms, then Google has already made that investment for you, for the most part.
Posted Feb 3, 2010 22:10 UTC (Wed)
by mjg59 (subscriber, #23239)
[Link] (3 responses)
Posted Feb 3, 2010 22:38 UTC (Wed)
by dcbw (guest, #50562)
[Link] (1 responses)
Posted Feb 4, 2010 11:24 UTC (Thu)
by broonie (subscriber, #7078)
[Link]
Posted Feb 4, 2010 11:35 UTC (Thu)
by SimonKagstrom (guest, #49801)
[Link]
Posted Feb 3, 2010 22:13 UTC (Wed)
by dlang (guest, #313)
[Link] (1 responses)
this also says that the next generation of qualcom chipsets may need a different OS as android is not working to be multi-platform.
Posted Feb 3, 2010 22:49 UTC (Wed)
by dcbw (guest, #50562)
[Link]
What I *did* say was that if you move away from the Qualcomm-based platform, you are going to be investing a *lot* more into the driver and architecture bring-up. But that could very well be a way of differentiating yourself in the market. It's a cost/benefit analysis and it appears that ebook reader makers have decided that over the long run they will make more money than it cost to port Android to a new architecture.
But the fact that almost all the phones running Android are doing so on Qualcomm 7k or 8k chipsets shows that most *phone* companies appear to be maximizing their investment by leveraging the work that Google has already done. Phone product cycles are also a lot faster than ebook reader product cycles, and phones have a lot more hardware in them (which requires more/different drivers) than ebook readers.
And just because Qualcomm comes out with a new platform doesn't mean your investment is worthless. Often new iterations of a chipset will contain only tweaks of the older hardware; they rarely rearchitect the entire system because that simply trashes all the money you've invested in the software so far. Which isn't smart.
For example, Android on the MSM8k can use mostly the same radio drivers (qmi), shared memory drivers (smd), network device (rmnet), etc that the MSM7k used. The GPU probably required a significantly modified driver, but at least you didn't have to rewrite *all* the drivers just to move from MSM7K -> MSM8K.
Posted Feb 3, 2010 23:08 UTC (Wed)
by cdibona (guest, #13739)
[Link] (3 responses)
Posted Feb 3, 2010 23:59 UTC (Wed)
by dcbw (guest, #50562)
[Link] (1 responses)
Posted Feb 4, 2010 7:33 UTC (Thu)
by cdibona (guest, #13739)
[Link]
Posted Feb 4, 2010 0:32 UTC (Thu)
by mjg59 (subscriber, #23239)
[Link]
Posted Feb 4, 2010 19:51 UTC (Thu)
by rahvin (guest, #16953)
[Link]
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
a free Google phone once they have a certain number of patches in the
Android stack.
burden on the applicants) and the number of patches needed can be set so
that certain budget limits are not exceeded.
a phone they might actually contribute patches.
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
> that it wouldn't just be rejected out of hand. I'm reasonably sure that
> this can be implemented without any changes to applications being
> required, but it may need some (fairly minor) alterations to the
> underlying Android stack.
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
but we could take a different view of things - at the most aggressive level, you could keep a
userspace wakelock implementation and use the uswsusp interface to fire off the process
freezer when all of them are released. All we'd need then would be a mechanism to provide a
list of PIDs that you don't want frozen.
be implemented using Rafael's runtime suspend work. As long as the dependencies are
expressed (and I admit that doing so is problematic right now), a busy driver can do a
pm_runtime_get() and then a pm_runtime_put() when it's idle again. Letting that information flow
up the tree could then allow the platform code to inhibit entry to the deeper states. TI seem to
do this in a more hacky way by simply using the systemwide busmastering flag, which cpuidle will
then use to limit idle to wfi-type states. It's not elegant, but it works.
collab summit in SF in April which isn't generally a highly technical conference but is co-hosted
with CELF this year. I suspect we could probably sort something out for that, if there's interest,
and it's the kind of thing that the Linux Foundation would probably love to make happen.
See, NOW it makes sense...
subscribers? Do it like Canonical et al.
profits.
See, NOW it makes sense...
budget. Been like that for a number of years.
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
believe).
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
See, NOW it makes sense...
As a company building phones, would you rather just use the same hardware Google build Android for, or would you rather invest a ton of time into porting Android to another SoC and write completely new SDIO, radio, power-management, etc drivers while your competitors come out with 3 new phones?
I would rather see you upstream all your changes (including userspace), then TI or other phone makers can upstream and GPL all their changes (including userspace tools) and in the long run Android runs on anything that the Kernel runs on. There is a reason it's called a community. Rather that build everything yourself why not get upstream so that all the work others are doing can be used. That way if some new SOC maker comes to Google and says "we want you to use our chip" you simply tell them to get "X" into the Kernel and then you aren't dependent on one supplier/IP platform. I think you guys have fully missed the point of FOSS.