Skip to contentSkip to conversation

Attempted summary of suspend-blockers LKML thread

RFC PATCH New Paul E. McKenney 32 participants 817 messages Jul 31, 2010 – Sep 17, 2010 Page 6 of 6

Subsystems (4)
lore
Share & tools
lore
#740 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 5 lines · Paul E. McKenney
Quoted 2 lines · Felipe Contreras

So far, nobody has refuted these:
 1) opportunistic suspend needs a good behaved user-space to work properly

As does dynamic power management.

Thus remains unrefuted.

Quoted 5 lines
Quoted 2 lines

 2) if suspend blockers are enabled in a system, *all* user-space must implement them to work correctly

Really?  From what I can see, only PM-driving applications need to use suspend blockers.

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

Quoted 4 lines
Quoted 1 line

 3) implementing suspend blockers in user-space is not a straight-forward task

Fortunately, experience thus far has shown that only a small fraction of applications need to use suspend blockers.

Wrong. We don't have any experience on that at all on typical linux ecosystems (remember that Android's user-space is very special).

Quoted 8 lines
Quoted 5 lines

So, as the length of this thread has shown, the benefits of opportunistic suspend are *dubious* at best, and more likely not worth the changes needed in user-space which eventually will get pretty close to what suspend blockers can achieve even in ideal circumstances by just doing dynamic PM.

The length of this thread (and the ones preceding it) is mostly due to people talking past each other.

Perhaps half of the thread, or even one quarter of the thread can be attributed to that, but still the rest I think it's because people keep pushing in, and people keep pushing out.

Quoted 10 lines

For example, the Android folks seem to
believe that it is important that relatively unskilled people be able to write simple apps, and that the system nevertheless be able to run these apps in a relatively energy efficient manner.  Your proposals do not address this issue.  This might be because you are not aware of this desire, because you are not aware of the computing history that argues in favor of this requirement, or because you simply don't like this requirement.  Whatever the reason, until you face this requirement head on, either addressing it or proving that it need not be addressed, you will continue to be talking past the Android folks.

This "requirement" is specific to Android's user-space, isn't it?

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#741 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 5 lines · Paul E. McKenney
Quoted 2 lines · Felipe Contreras

So far, nobody has refuted these:
 1) opportunistic suspend needs a good behaved user-space to work properly

As does dynamic power management.

Thus remains unrefuted.

Quoted 5 lines
Quoted 2 lines

 2) if suspend blockers are enabled in a system, *all* user-space must implement them to work correctly

Really?  From what I can see, only PM-driving applications need to use suspend blockers.

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

Quoted 4 lines
Quoted 1 line

 3) implementing suspend blockers in user-space is not a straight-forward task

Fortunately, experience thus far has shown that only a small fraction of applications need to use suspend blockers.

Wrong. We don't have any experience on that at all on typical linux ecosystems (remember that Android's user-space is very special).

Quoted 8 lines
Quoted 5 lines

So, as the length of this thread has shown, the benefits of opportunistic suspend are *dubious* at best, and more likely not worth the changes needed in user-space which eventually will get pretty close to what suspend blockers can achieve even in ideal circumstances by just doing dynamic PM.

The length of this thread (and the ones preceding it) is mostly due to people talking past each other.

Perhaps half of the thread, or even one quarter of the thread can be attributed to that, but still the rest I think it's because people keep pushing in, and people keep pushing out.

Quoted 10 lines

For example, the Android folks seem to
believe that it is important that relatively unskilled people be able to write simple apps, and that the system nevertheless be able to run these apps in a relatively energy efficient manner.  Your proposals do not address this issue.  This might be because you are not aware of this desire, because you are not aware of the computing history that argues in favor of this requirement, or because you simply don't like this requirement.  Whatever the reason, until you face this requirement head on, either addressing it or proving that it need not be addressed, you will continue to be talking past the Android folks.

This "requirement" is specific to Android's user-space, isn't it?

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Signature · 1 line
Felipe Contreras
#742 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

I'm curious, when does Android count as a user of the kernel? I gather that volume of sales or users doesn't count. Do we have to include some percentage of "desktop" Linux?

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

I guess I don't understand,

Brian

#743 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

I'm curious, when does Android count as a user of the kernel? I gather that volume of sales or users doesn't count. Do we have to include some percentage of "desktop" Linux?

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

I guess I don't understand,

Brian

#744 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 8 lines

I'm curious, when does Android count as a user of the kernel? I gather that volume of sales or users doesn't count. Do we have to include some percentage of "desktop" Linux?

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

I guess I don't understand,

I guess I don't, either -- there are some parts of the kernel used by only a handful of users... and here we speak about million users...

Best,
Dominik

#745 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 8 lines

I'm curious, when does Android count as a user of the kernel? I gather that volume of sales or users doesn't count. Do we have to include some percentage of "desktop" Linux?

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

I guess I don't understand,

I guess I don't, either -- there are some parts of the kernel used by only a handful of users... and here we speak about million users...

Best,
Dominik

#746 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

Quoted 2 lines

I guess I don't, either -- there are some parts of the kernel used by only a handful of users... and here we speak about million users...

Because in general the bits for a small user base don't leak out into other bits of the kernel. It's a much higher barrier if you want to affect other people's code because it is asking everyone else to help maintain stuff they don't need.

That's not to say sometimes its not the right choice, but I still find it remarkable that nobody else but Android seems to want it,. Alan

#747 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Dominik Brodowski
Quoted 5 lines · Dominik Brodowski
Quoted 1 line · Brian Swetland

I guess I don't understand,

I guess I don't, either -- there are some parts of the kernel used by only a handful of users... and here we speak about million users...

A driver that sits in a corner and doesn't show in the 'menuconfig' of most people and is used by small fraction of user-space applications (perhaps even 0) is just fine. But we are talking of something centric, that can be enabled on all systems, and that affects all user-space.

Signature · 1 line
Felipe Contreras
#748 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Dominik Brodowski
Quoted 5 lines · Dominik Brodowski
Quoted 1 line · Brian Swetland

I guess I don't understand,

I guess I don't, either -- there are some parts of the kernel used by only a handful of users... and here we speak about million users...

A driver that sits in a corner and doesn't show in the 'menuconfig' of most people and is used by small fraction of user-space applications (perhaps even 0) is just fine. But we are talking of something centric, that can be enabled on all systems, and that affects all user-space.

Signature · 1 line
Felipe Contreras
#749 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 1 line

Why do people care that "android is forking the kernel"?

A lot of us don't. That's what the GPL is about. It's a big pain if you start splitting it off into two entire things long term - because your maintenance grows harder exponentially but parallel forks are common
- SuSE and RHEL Enterprise type editions are forks for example.

As far as I can tell it all comes from one or two people with a big PR presence and almost no code in the kernel saying silly things years ago which the IT press see as a good way to create a 'we need a column, bash someone' story.

"What the junk press think" is a common but broken way to run national policy in some countries, and its just as broken for the kernel.

Alan

#750 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 3 lines

I'm curious, when does Android count as a user of the kernel?  I gather that volume of sales or users doesn't count.  Do we have to include some percentage of "desktop" Linux?

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

Quoted 2 lines

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

Nobody has expressed anything remotely like that (that you are a second-class citizen). Why makes you think so? Lots of people get patches denied. Like Nokia's u_char driver, which is *way* less controversial than this one.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#751 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 3 lines

I'm curious, when does Android count as a user of the kernel?  I gather that volume of sales or users doesn't count.  Do we have to include some percentage of "desktop" Linux?

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

Quoted 2 lines

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

Nobody has expressed anything remotely like that (that you are a second-class citizen). Why makes you think so? Lots of people get patches denied. Like Nokia's u_char driver, which is *way* less controversial than this one.

Signature · 1 line
Felipe Contreras
#752 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 21 lines · Felipe Contreras
Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 3 lines

I'm curious, when does Android count as a user of the kernel?  I gather that volume of sales or users doesn't count.  Do we have to include some percentage of "desktop" Linux?

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

Quoted 4 lines

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Do any other distributions or devices with unusual user-space layouts qualify?

Thanx, Paul

Quoted 10 lines
Quoted 2 lines

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

Nobody has expressed anything remotely like that (that you are a second-class citizen). Why makes you think so? Lots of people get patches denied. Like Nokia's u_char driver, which is *way* less controversial than this one.

Signature · 1 line
Felipe Contreras
#753 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 21 lines · Felipe Contreras
Quoted 11 lines · Brian Swetland
Quoted 8 lines · Felipe Contreras

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

Quoted 3 lines

I'm curious, when does Android count as a user of the kernel?  I gather that volume of sales or users doesn't count.  Do we have to include some percentage of "desktop" Linux?

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

Quoted 4 lines

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Do any other distributions or devices with unusual user-space layouts qualify?

Thanx, Paul

Quoted 10 lines
Quoted 2 lines

If we're an undesirable second-class citizen, why do people care that "android is forking the kernel"?

Nobody has expressed anything remotely like that (that you are a second-class citizen). Why makes you think so? Lots of people get patches denied. Like Nokia's u_char driver, which is *way* less controversial than this one.

Signature · 1 line
Felipe Contreras
#754 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Hi!

Quoted 10 lines
Quoted 9 lines

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

Quoted 7 lines

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Do any other distributions or devices with unusual user-space layouts qualify?

QTembedded distros are somehow similar to android (one big binary).

Then there's minor stuff, like webOS and Motorola A1200...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#755 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney

Hi!

Quoted 10 lines
Quoted 9 lines

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

Quoted 7 lines

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Do any other distributions or devices with unusual user-space layouts qualify?

QTembedded distros are somehow similar to android (one big binary).

Then there's minor stuff, like webOS and Motorola A1200...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#756 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 17 lines · Pavel Machek

Hi!

Quoted 15 lines
Quoted 9 lines

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Quoted 6 lines
Quoted 2 lines

Do any other distributions or devices with unusual user-space layouts qualify?

QTembedded distros are somehow similar to android (one big binary).

Then there's minor stuff, like webOS and Motorola A1200...

It does sounds like there is some variety, then. Thank you for the info!

Thanx, Paul

#757 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Pavel Machek
Quoted 17 lines · Pavel Machek

Hi!

Quoted 15 lines
Quoted 9 lines

You are *one* user of the kernel. Let's suppose Android wasn't using suspend-blockers, and there was another equally successful linux mobile platform, Foobingo, and they were using them, and they were the only ones interested on implementing them.

What does that change? Nothing. They still need to convince the community that what they are proposing to be merged is actually useful, and somebody will use it. If not, they can just keep the patch for themselves until they do. I don't see the big deal.

So the current users of the Linux kernel are the following?

o GNU/Linux
o Android

Quoted 6 lines
Quoted 2 lines

Do any other distributions or devices with unusual user-space layouts qualify?

QTembedded distros are somehow similar to android (one big binary).

Then there's minor stuff, like webOS and Motorola A1200...

It does sounds like there is some variety, then. Thank you for the info!

Thanx, Paul

#758 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 9 lines · Felipe Contreras
Quoted 5 lines · Paul E. McKenney
Quoted 2 lines · Felipe Contreras

So far, nobody has refuted these:
 1) opportunistic suspend needs a good behaved user-space to work properly

As does dynamic power management.

Thus remains unrefuted.

Glad we agree that both dynamic power management and opportunistic power management need applications to be written carefully. Of course, dynamic power management requires all of the code in those applications to be carefully written, while experience indicates that opportunistic suspend requires only a small fraction to be carefully written.

Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

 2) if suspend blockers are enabled in a system, *all* user-space must implement them to work correctly

Really?  From what I can see, only PM-driving applications need to use suspend blockers.

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

A PM-driving application is one that exerts control over the system's power state. In the case of Android, a PM-driving application is one that is permitted to acquire suspend blockers.

Quoted 2 lines

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

That is an excellent example, as it applies equally to dynamic power management. By how much are you allowed to delay the wakeup?

Quoted 2 lines

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

That is speculation on your part.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

 3) implementing suspend blockers in user-space is not a straight-forward task

Fortunately, experience thus far has shown that only a small fraction of applications need to use suspend blockers.

Wrong. We don't have any experience on that at all on typical linux ecosystems (remember that Android's user-space is very special).

Android's experience might not apply exactly to typical Linux ecosystems, but we really can learn quite a bit from it -- at least if we can bring ourselves to do so.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

So, as the length of this thread has shown, the benefits of opportunistic suspend are *dubious* at best, and more likely not worth the changes needed in user-space which eventually will get pretty close to what suspend blockers can achieve even in ideal circumstances by just doing dynamic PM.

Quoted 6 lines
Quoted 2 lines

The length of this thread (and the ones preceding it) is mostly due to people talking past each other.

Perhaps half of the thread, or even one quarter of the thread can be attributed to that, but still the rest I think it's because people keep pushing in, and people keep pushing out.

Fair enough. I wasn't differentiating between people mistakenly talking past each other and intentionally talking past each other, but if you want to differentiate, feel free to do so.

Quoted 11 lines
Quoted 10 lines

For example, the Android folks seem to
believe that it is important that relatively unskilled people be able to write simple apps, and that the system nevertheless be able to run these apps in a relatively energy efficient manner.  Your proposals do not address this issue.  This might be because you are not aware of this desire, because you are not aware of the computing history that argues in favor of this requirement, or because you simply don't like this requirement.  Whatever the reason, until you face this requirement head on, either addressing it or proving that it need not be addressed, you will continue to be talking past the Android folks.

Quoted 1 line

This "requirement" is specific to Android's user-space, isn't it?

That is your speculation.

Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers. ;-)

Thanx, Paul

#759 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 9 lines · Felipe Contreras
Quoted 5 lines · Paul E. McKenney
Quoted 2 lines · Felipe Contreras

So far, nobody has refuted these:
 1) opportunistic suspend needs a good behaved user-space to work properly

As does dynamic power management.

Thus remains unrefuted.

Glad we agree that both dynamic power management and opportunistic power management need applications to be written carefully. Of course, dynamic power management requires all of the code in those applications to be carefully written, while experience indicates that opportunistic suspend requires only a small fraction to be carefully written.

Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

 2) if suspend blockers are enabled in a system, *all* user-space must implement them to work correctly

Really?  From what I can see, only PM-driving applications need to use suspend blockers.

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

A PM-driving application is one that exerts control over the system's power state. In the case of Android, a PM-driving application is one that is permitted to acquire suspend blockers.

Quoted 2 lines

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

That is an excellent example, as it applies equally to dynamic power management. By how much are you allowed to delay the wakeup?

Quoted 2 lines

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

That is speculation on your part.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

 3) implementing suspend blockers in user-space is not a straight-forward task

Fortunately, experience thus far has shown that only a small fraction of applications need to use suspend blockers.

Wrong. We don't have any experience on that at all on typical linux ecosystems (remember that Android's user-space is very special).

Android's experience might not apply exactly to typical Linux ecosystems, but we really can learn quite a bit from it -- at least if we can bring ourselves to do so.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

So, as the length of this thread has shown, the benefits of opportunistic suspend are *dubious* at best, and more likely not worth the changes needed in user-space which eventually will get pretty close to what suspend blockers can achieve even in ideal circumstances by just doing dynamic PM.

Quoted 6 lines
Quoted 2 lines

The length of this thread (and the ones preceding it) is mostly due to people talking past each other.

Perhaps half of the thread, or even one quarter of the thread can be attributed to that, but still the rest I think it's because people keep pushing in, and people keep pushing out.

Fair enough. I wasn't differentiating between people mistakenly talking past each other and intentionally talking past each other, but if you want to differentiate, feel free to do so.

Quoted 11 lines
Quoted 10 lines

For example, the Android folks seem to
believe that it is important that relatively unskilled people be able to write simple apps, and that the system nevertheless be able to run these apps in a relatively energy efficient manner.  Your proposals do not address this issue.  This might be because you are not aware of this desire, because you are not aware of the computing history that argues in favor of this requirement, or because you simply don't like this requirement.  Whatever the reason, until you face this requirement head on, either addressing it or proving that it need not be addressed, you will continue to be talking past the Android folks.

Quoted 1 line

This "requirement" is specific to Android's user-space, isn't it?

That is your speculation.

Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers. ;-)

Thanx, Paul

#760 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 9 lines · Paul E. McKenney
Quoted 4 lines · Felipe Contreras

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

A PM-driving application is one that exerts control over the system's power state.  In the case of Android, a PM-driving application is one that is permitted to acquire suspend blockers.

I already mentioned that a "PM-driving application" might not have suspend-blockers; because the user denied them, or because the developer forgot them.

Quoted 5 lines
Quoted 2 lines

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

That is an excellent example, as it applies equally to dynamic power management.  By how much are you allowed to delay the wakeup?

Huh? Certainly not days, which if Android guys are right, might be how much the task will be delayed.

Quoted 4 lines
Quoted 2 lines

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

That is speculation on your part.

Not really. Say you have 100 packages in your system, how do you know which ones would be PM-driving? Can you grep for something, or see if they open certain file? No, you have to analyze them one by one; they *all* are affected, although not all might require modifications.

But assuming I'm wrong, that's precisely the reason why a practical exercise would help.

Quoted 3 lines
Quoted 1 line

This "requirement" is specific to Android's user-space, isn't it?

That is your speculation.

Which is why we need something practical.

Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#761 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 9 lines · Paul E. McKenney
Quoted 4 lines · Felipe Contreras

"PM-driving applications" is a new invention, so how do you know if an application belongs to this category or not? Some application might be non-PM-driving most of the time, but suddenly become PM-driving. Well, you have to analyze *all* of them.

A PM-driving application is one that exerts control over the system's power state.  In the case of Android, a PM-driving application is one that is permitted to acquire suspend blockers.

I already mentioned that a "PM-driving application" might not have suspend-blockers; because the user denied them, or because the developer forgot them.

Quoted 5 lines
Quoted 2 lines

Think about this... is bash a PM driving application? No, but what if you run: 'sleep 3600 && alarm.sh'.

That is an excellent example, as it applies equally to dynamic power management.  By how much are you allowed to delay the wakeup?

Huh? Certainly not days, which if Android guys are right, might be how much the task will be delayed.

Quoted 4 lines
Quoted 2 lines

Perhaps I should rewrite that as:
2) if suspend blockers are enabled in the system; *all* user-space is affected

That is speculation on your part.

Not really. Say you have 100 packages in your system, how do you know which ones would be PM-driving? Can you grep for something, or see if they open certain file? No, you have to analyze them one by one; they *all* are affected, although not all might require modifications.

But assuming I'm wrong, that's precisely the reason why a practical exercise would help.

Quoted 3 lines
Quoted 1 line

This "requirement" is specific to Android's user-space, isn't it?

That is your speculation.

Which is why we need something practical.

Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Signature · 1 line
Felipe Contreras
#762 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 12 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

Quoted 8 lines

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Because millions of users are happy -- with Android, including suspend blockers.

Best,
Dominik

#763 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

Quoted 8 lines

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Because millions of users are happy -- with Android, including suspend blockers.

Best,
Dominik

#764 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 2 lines · Dominik Brodowski

Because millions of users are happy -- with Android, including suspend blockers.

I'd guess there are on the order of 20 users
that have built and deployed a kernel with
Android suspend blockers support.

The total deployed systems is relatively meaningless.

#765 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Dominik Brodowski
Quoted 2 lines · Dominik Brodowski

Because millions of users are happy -- with Android, including suspend blockers.

I'd guess there are on the order of 20 users
that have built and deployed a kernel with
Android suspend blockers support.

The total deployed systems is relatively meaningless.

#766 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 7 lines · Joe Perches
Quoted 2 lines · Dominik Brodowski

Because millions of users are happy -- with Android, including suspend blockers.

I'd guess there are on the order of 20 users
that have built and deployed a kernel with
Android suspend blockers support.

You mean non-Google users?

Quoted 1 line

The total deployed systems is relatively meaningless.

Well, it wasn't meaningless wrt noveau:

"I've heard all the excuses. If it isn't ready, they shouldn't ship it to millions of people. And if it's ready, they should work on merging it.

No excuses.

Linus"

So let's get the suspend blockers to Linus.

Best
Dominik

#767 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Joe Perches
Quoted 7 lines · Joe Perches
Quoted 2 lines · Dominik Brodowski

Because millions of users are happy -- with Android, including suspend blockers.

I'd guess there are on the order of 20 users
that have built and deployed a kernel with
Android suspend blockers support.

You mean non-Google users?

Quoted 1 line

The total deployed systems is relatively meaningless.

Well, it wasn't meaningless wrt noveau:

"I've heard all the excuses. If it isn't ready, they shouldn't ship it to millions of people. And if it's ready, they should work on merging it.

No excuses.

Linus"

So let's get the suspend blockers to Linus.

Best
Dominik

#768 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Dominik Brodowski
Quoted 21 lines · Dominik Brodowski
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

Quoted 8 lines

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Quoted 2 lines

Because millions of users are happy -- with Android, including suspend blockers.

I explicitly said somebody besides Android, specifically, somebody with a typical linux ecosystem. You are not addressing the argument at hand, that nobody else wants to tackle the issue this way, thus only making the discussion more difficult.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#769 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Dominik Brodowski
Quoted 21 lines · Dominik Brodowski
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers.  ;-)

Quoted 8 lines

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Quoted 2 lines

Because millions of users are happy -- with Android, including suspend blockers.

I explicitly said somebody besides Android, specifically, somebody with a typical linux ecosystem. You are not addressing the argument at hand, that nobody else wants to tackle the issue this way, thus only making the discussion more difficult.

Signature · 1 line
Felipe Contreras
#770 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 23 lines · Felipe Contreras
Quoted 21 lines · Dominik Brodowski
Quoted 20 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers. ;-)

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Quoted 7 lines
Quoted 2 lines

Because millions of users are happy -- with Android, including suspend blockers.

I explicitly said somebody besides Android, specifically, somebody with a typical linux ecosystem. You are not addressing the argument at hand, that nobody else wants to tackle the issue this way, thus only making the discussion more difficult.

Can we stop arguing about the pointless?

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

In a Data Centre controlling power, if you sent a suspend then a wake on lan, there's a window where the machine will still be down (because the wol got ignored).

There are easy fixes to all the above ... I should wait to verify suspend and resume in my laptop and I have to accept the wait time between the two. In the data centre, you just repeat your power control commands a few times with about 5s between them and so on.

The simple hacky work arounds mean that a user space invasive solution like suspend blockers is a bit of a non starter as a solution to the general case. However, it has shown that we do have a problem and furthermore it's a problem encountered by more than android.

The technical problem with suspend blockers is that they're a solution to a general problem that only works for a specific case. What we're searching for is a general solution that can also be used in the android specific case.

So far, we have three possibilities:

1. Stubs with deprecation - this has been rejected by android, so looks like a non starter.
2. update pm_qos so that the suspend blocks become qos constraints. This may or may not be coupled with a user space suspend manager, but in the latter case it's essentially full suspend blockers (with the additional opportunistic suspend kernel code) but with information systems outside of android can use.
3. Rafael's patch that makes it possible to avoid the races between wakeup and suspend. This requires a user space suspend manager

(There's a whole other load of implementation details like stats and the like, but the above is the concept view).

Unless anyone has something substantive to add to either the problem space or the solution space, the android discussion piece of this thread has degenerated to pure noise.

James

#771 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 23 lines · Felipe Contreras
Quoted 21 lines · Dominik Brodowski
Quoted 20 lines
Quoted 11 lines
Quoted 7 lines

Not Ubuntu, not Fedora, not MeeGo, not anyone with a typical user-space seems to be having this problem. I can argue to you that this problem can be solved in easier ways, but instead I will argue that perhaps we should wait for somebody besides Android to complain about it before providing a "solution". Because after all, what good is a "solution" provided by the kernel, if the user-space is not going to use it, ever.

At this point in the discussion, I am quite prepared to believe that you will avoid using suspend blockers, and that you will further do everything in your power to prevent anyone else from using suspend blockers. ;-)

I'm not tying anybody's hands.

How are people using real-time linux if it's not on mainline? Well, duuh, you apply the patches. If say Fedora was interested on it, they could apply the patches, and see for themselves. People do that all the time, with the mm tree, with Con Koliva's patches, etc. Once people are happy with the results, things get merged. Why should this be any different?

Quoted 7 lines
Quoted 2 lines

Because millions of users are happy -- with Android, including suspend blockers.

I explicitly said somebody besides Android, specifically, somebody with a typical linux ecosystem. You are not addressing the argument at hand, that nobody else wants to tackle the issue this way, thus only making the discussion more difficult.

Can we stop arguing about the pointless?

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

In a Data Centre controlling power, if you sent a suspend then a wake on lan, there's a window where the machine will still be down (because the wol got ignored).

There are easy fixes to all the above ... I should wait to verify suspend and resume in my laptop and I have to accept the wait time between the two. In the data centre, you just repeat your power control commands a few times with about 5s between them and so on.

The simple hacky work arounds mean that a user space invasive solution like suspend blockers is a bit of a non starter as a solution to the general case. However, it has shown that we do have a problem and furthermore it's a problem encountered by more than android.

The technical problem with suspend blockers is that they're a solution to a general problem that only works for a specific case. What we're searching for is a general solution that can also be used in the android specific case.

So far, we have three possibilities:

1. Stubs with deprecation - this has been rejected by android, so looks like a non starter.
2. update pm_qos so that the suspend blocks become qos constraints. This may or may not be coupled with a user space suspend manager, but in the latter case it's essentially full suspend blockers (with the additional opportunistic suspend kernel code) but with information systems outside of android can use.
3. Rafael's patch that makes it possible to avoid the races between wakeup and suspend. This requires a user space suspend manager

(There's a whole other load of implementation details like stats and the like, but the above is the concept view).

Unless anyone has something substantive to add to either the problem space or the solution space, the android discussion piece of this thread has degenerated to pure noise.

James

#772 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

- Ted

#773 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to James Bottomley
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

- Ted

#774 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

Quoted 39 lines · Ted Ts'o
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile).  The problem is that resume events are racy with respect to suspend and vice versa.  This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away).  The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem.  I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving.  Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager.  Rafael has stated his complete unwillingness to deal with this part of the problem.  OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

Arve's suspend blockers patch stack actually separates the core functionality (ability for drivers to delay suspend while doing work suspend would interfere with), from the ability to hold suspend blockers from userspace (a separate, smaller patch building on the core functionality).

Brian
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

#775 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Ted Ts'o
Quoted 20 lines · Ted Ts'o
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

Quoted 8 lines

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

OK, so I tried desperately to avoid the question of whether opportunistic suspend is a good way of managing power. However, it seems to me that it is in use by several systems (android, olpc, etc). I'll defer the question of whether it's better in user space or kernel space to Rafael's investigations ... but I will point out that the kernel space patch, once the suspend blockers issue is taken care of looks like a single patch to one file, so should be locally containable and should allow upstream to be useful as the driver base again.

Quoted 10 lines

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

That's my goal.

James

#776 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to Ted Ts'o
Quoted 20 lines · Ted Ts'o
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

Quoted 8 lines

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

OK, so I tried desperately to avoid the question of whether opportunistic suspend is a good way of managing power. However, it seems to me that it is in use by several systems (android, olpc, etc). I'll defer the question of whether it's better in user space or kernel space to Rafael's investigations ... but I will point out that the kernel space patch, once the suspend blockers issue is taken care of looks like a single patch to one file, so should be locally containable and should allow upstream to be useful as the driver base again.

Quoted 10 lines

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

That's my goal.

James

#777 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 49 lines · James Bottomley
Quoted 20 lines · Ted Ts'o
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

Quoted 8 lines

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

OK, so I tried desperately to avoid the question of whether opportunistic suspend is a good way of managing power. However, it seems to me that it is in use by several systems (android, olpc, etc). I'll defer the question of whether it's better in user space or kernel space to Rafael's investigations ... but I will point out that the kernel space patch, once the suspend blockers issue is taken care of looks like a single patch to one file, so should be locally containable and should allow upstream to be useful as the driver base again.

Quoted 10 lines

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 4 lines
Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

That's my goal.

In fact, we (which means basically Alan Stern and me at this point) are working with Arve on this right now.

Thanks,
Rafael

#778 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

In reply to James Bottomley
Quoted 49 lines · James Bottomley
Quoted 20 lines · Ted Ts'o
Quoted 11 lines · James Bottomley

The facts are that suspend blockers identifies a race within our suspend to ram system that permeates from top to bottom (that's from server to mobile). The problem is that resume events are racy with respect to suspend and vice versa. This manifests itself most annoyingly on my laptop in the "double suspend" case: where I suspend with a pending suspend event, my laptop will resume and then immediately re-suspend (leading me to kick myself and remind myself to check it stayed up before pushing unsuspend and walking away). The other annoying case is that if I accidentally close the lid before presenting, I have to wait until the system is fully down before pressing resume.

This is all true, but it's also only one aspect of the problem. I agree with you that this is the part of the problem which affects Linux at all scales, from Cloud servers in a data center that want to suspend themselves when there's no work to do (and then fail to respond to the WOL packet) to mobile platforms that are suspending much more frequently.

Quoted 8 lines

However, it doesn't follow that this is the _only_ problem that the Android folks might be interested in solving. Opportunistic suspend is a different part of the problem space, which is generally believed by the Android developers as being far more efficient than a user-space suspend manager. Rafael has stated his complete unwillingness to deal with this part of the problem. OK, so that probably means that for Android, it will have to be an out-of-tree kernel patch.

OK, so I tried desperately to avoid the question of whether opportunistic suspend is a good way of managing power. However, it seems to me that it is in use by several systems (android, olpc, etc). I'll defer the question of whether it's better in user space or kernel space to Rafael's investigations ... but I will point out that the kernel space patch, once the suspend blockers issue is taken care of looks like a single patch to one file, so should be locally containable and should allow upstream to be useful as the driver base again.

Quoted 10 lines

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 4 lines
Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

That's my goal.

In fact, we (which means basically Alan Stern and me at this point) are working with Arve on this right now.

Thanks,
Rafael

#779 lore raw

Re: [linux-pm] Attempted summary of suspend-blockers LKML thread, take three

Hi,

Quoted 1 line · ext Rafael J. Wysocki

On Saturday, August 14, 2010, James Bottomley wrote:

<snip>

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

The question, then, is whether a solution which addresses the only part of the problem which Rafael is interested in dealing with at this point, is sufficient such that (a) the kernel-level opportunistic suspend can be done as an out-of-tree patch, while simultaneously (b) allowing device drivers for Android devices can utilize Rafael's interfaces to solve the race design bug currently found in our suspend subsystem, while (c) requiring minimal changes to the Android userspace, and (d) providing all of the statistics and debugging functionality required by the Android userspace.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

If we can engineer a solution which meets (a), (b), (c), and (d) above, then everyone will be happy.

That's my goal.

In fact, we (which means basically Alan Stern and me at this point) are working with Arve on this right now.

At least for (d) we - Nokia - would be also interested as well to contribute, see [1].

In general it should help with keeping the solution more generic.

cheers, igor

[1]
https://lists.linux-foundation.org/pipermail/linux-pm/2010-August/028248.html

#780 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Alan

#781 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 9 lines · Alan Cox
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Given that you are talking about going from 2 processors to 1 and back, I would guess that you are not actually talking about suspend/resume, which is a system-wide thing rather than a CPU-by-CPU thing. I am not sure whether you are using CPU hotplug or invoking SMP alternatives once all but one CPU is idle.

Can't say that I can tell exactly what pit you are digging for me here. ;-)

Thanx, Paul

#782 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Alan Cox
Quoted 9 lines · Alan Cox
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Given that you are talking about going from 2 processors to 1 and back, I would guess that you are not actually talking about suspend/resume, which is a system-wide thing rather than a CPU-by-CPU thing. I am not sure whether you are using CPU hotplug or invoking SMP alternatives once all but one CPU is idle.

Can't say that I can tell exactly what pit you are digging for me here. ;-)

Thanx, Paul

#783 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Hi!

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Quoted 5 lines

Given that you are talking about going from 2 processors to 1 and back, I would guess that you are not actually talking about suspend/resume, which is a system-wide thing rather than a CPU-by-CPU thing. I am not sure whether you are using CPU hotplug or invoking SMP alternatives once all but one CPU is idle.

When entering system suspend, we disable non-boot-CPUs to simplify locking. We reenable them when going out of suspend.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#784 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 12 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Quoted 8 lines
Quoted 5 lines

Given that you are talking about going from 2 processors to 1 and back, I would guess that you are not actually talking about suspend/resume, which is a system-wide thing rather than a CPU-by-CPU thing. I am not sure whether you are using CPU hotplug or invoking SMP alternatives once all but one CPU is idle.

When entering system suspend, we disable non-boot-CPUs to simplify locking. We reenable them when going out of suspend.

Thank you for the info, Pavel!

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

Thanx, Paul

#785 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Pavel Machek
Quoted 12 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Think in terms of an ARM laptop. What good is opportunistic suspend if it's not going to help when the laptop is being used?

For when the laptop is not being used, presumably.

Or in time between keystrokes for most of the platform (backlight excepted). The Intel MID x86 devices are at the point that suspend/resume time on x86 is being hurt by the kernel rewriting smp alternatives as we go from 2 processors live to 1 and back.

Quoted 8 lines
Quoted 5 lines

Given that you are talking about going from 2 processors to 1 and back, I would guess that you are not actually talking about suspend/resume, which is a system-wide thing rather than a CPU-by-CPU thing. I am not sure whether you are using CPU hotplug or invoking SMP alternatives once all but one CPU is idle.

When entering system suspend, we disable non-boot-CPUs to simplify locking. We reenable them when going out of suspend.

Thank you for the info, Pavel!

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

Thanx, Paul

#786 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 6 lines · On Sat, 14 Aug 2010 08:10:48 -0700 "Paul E. McKenney"…

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#787 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 5 lines · Arjan van de Ven

however I think you're making an assumption
that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't
really valid.

For ARM processors it's not unrealistic. THey
tend to have idle states that place constraints on
peripherals and clocks which allow peripherals to run independently of CPUs.

I recall for example various processors that allow
USB to continue operating in one or more idle states, if the right clocks are active (and RAM). Similarly with some other peripherals. It may be
desirable to have I/O active while CPUs are idle.

Not all low power states map to x86/ACPI models;
and Linux hasn't accomodated that reality well.

#788 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 5 lines · Arjan van de Ven

however I think you're making an assumption
that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't
really valid.

For ARM processors it's not unrealistic. THey
tend to have idle states that place constraints on
peripherals and clocks which allow peripherals to run independently of CPUs.

I recall for example various processors that allow
USB to continue operating in one or more idle states, if the right clocks are active (and RAM). Similarly with some other peripherals. It may be
desirable to have I/O active while CPUs are idle.

Not all low power states map to x86/ACPI models;
and Linux hasn't accomodated that reality well.

#789 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 9 lines · Arjan van de Ven
Quoted 6 lines · On Sat, 14 Aug 2010 08:10:48 -0700 "Paul E. McKenney"…

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

Quoted 8 lines

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

I am and have been taking you at your word that some systems can reach power levels while idle that rival suspended/off. The differences between idle and suspend are instead semantic, have been posted here more than once, and make themselves felt when the non-suspended system is non-idle, even for systems whose deep-idle power approximates that of suspend/off.

Thanx, Paul

#790 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 9 lines · Arjan van de Ven
Quoted 6 lines · On Sat, 14 Aug 2010 08:10:48 -0700 "Paul E. McKenney"…

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

Quoted 8 lines

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

I am and have been taking you at your word that some systems can reach power levels while idle that rival suspended/off. The differences between idle and suspend are instead semantic, have been posted here more than once, and make themselves felt when the non-suspended system is non-idle, even for systems whose deep-idle power approximates that of suspend/off.

Thanx, Paul

#791 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 8 lines · Arjan van de Ven

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

Really? I thought the TSC stopped in suspend. Does having a package go into C6 mean that the RAM goes into self-refresh?

Signature · 1 line
Matthew Garrett | [email protected]
#792 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 8 lines · Arjan van de Ven

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

Really? I thought the TSC stopped in suspend. Does having a package go into C6 mean that the RAM goes into self-refresh?

Signature · 1 line
Matthew Garrett | [email protected]
#793 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

This is more of CPU statement than a chipset or laptop/device-wide statement, correct?

If "hardware" applies to the entire laptop, how "modern" is "modern"?

- Ted

#794 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 6 lines · On Sat, 14 Aug 2010 08:10:48 -0700 "Paul E. McKenney"…

So once you are down to one CPU, the last CPU shuts the system off, itself included? Or does the last CPU "run" in a deep idle state throughout suspend? (My guess is the former, and I am also curious whether the cache SRAMs are powered off, etc. But figured I should ask rather than guessing.)

they tend to go "off".

however I think you're making an assumption that there is a real difference between a deep idle state and "off"....

For modern x86 hardware, that assumption isn't really valid. (other than a very very small sram that stores register content in the idle case)

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#795 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Alan Cox
Quoted 8 lines · Alan Cox
Quoted 3 lines

I have to worry about manually killing off applications when memory gets low, I actually thought it was incredibly sucky. It was a miniature, badly done laptop.

Likewise I thought the lack of proper multi-tasking apps in Android was comically bad. Nice device completely wrecked by the inability to flip between running apps each with their own screen - something that was old tech in 1990.

Rather beside the point for this thread and it's perhaps not so intuitive as it ought to be but holding down the home button should do what you're looking for here.

#796 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Alan Cox
Quoted 8 lines · Alan Cox
Quoted 3 lines

I have to worry about manually killing off applications when memory gets low, I actually thought it was incredibly sucky. It was a miniature, badly done laptop.

Likewise I thought the lack of proper multi-tasking apps in Android was comically bad. Nice device completely wrecked by the inability to flip between running apps each with their own screen - something that was old tech in 1990.

Rather beside the point for this thread and it's perhaps not so intuitive as it ought to be but holding down the home button should do what you're looking for here.

#797 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Ted Ts'o
Quoted 6 lines · Ted Ts'o
Quoted 4 lines · Felipe Contreras

My guess is you haven't used a truly multi-tasking device like the N900; now that I've got used to it, I consider that functionality *essential*.

Quoted 8 lines

I've used an N800, and I wasn't impressed; if anything, the fact that I have to worry about manually killing off applications when memory gets low, I actually thought it was incredibly sucky.  It was a miniature, badly done laptop.

Maybe the N900 is different, but the bigger question is what do you mean by "multi-tasking"?  Definitions are critical here, which is why Paul was so careful in his definitions section of his document.

Yes, the N900 is drastically different, for starters, it has an actual window manager.

By multi-tasking I mean me (the user) being able to perform multiple tasks at the same time.

For example: writing an email, while browsing the web, while having IM conversations. Obviously not exactly at the same time; start writing an email, go browse for some url, copy, answer a pending IM message, go back to the mail, paste.

Quoted 10 lines
Quoted 10 lines

The argument in favor of suspend blockers is that you could take applications that are not designed for embedded, and make them run on an embedded device without draining excessive battery life; those applications would have to be background services not conflicting with Android's design.

I agree there probably would not be that many background apps, and probably even less ported background apps, but that is actually an argument against suspend blockers.

Quoted 8 lines
Quoted 3 lines

The rest of the apps (UI apps), cannot be ported, but have to be written specifically for Android, and therefore should have PM in mind, and not require suspend blockers to have good power usage.

If you are using a GUI framework which is optimized for a single- application-focus-at-a-time UI that isn't GNOME or KDE, then that will require the applications to be written.  However, that's not because of suspend-blockers.

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

Quoted 9 lines

If you assume a GUI framework which is flexible enough --- maybe Qt falls into this category, maybe not --- for the rest of the applications, they don't need to *know* about suspend blockers, and they certainly do't have to be rewritten or modified specifically for suspend blockers.  So if your argument is that applications that don't need bacground services (which you've admitted comprises majority of applicatios) need to be modified or written specifically to support suspend blockers, that's simply not true.  They don't need to be modified at all.

That's not my argument at all. I was talking about a counter-argument to "suspend blockers make porting desktop apps easer".

Android's UI applications are unimportant here because they have not been ported from the desktop realm; they were designed specifically for Android, including all its PM capabilities.

The only relevant applications are the ones designed for the desktop that are ported to Android, and thus might make assumptions that hurt battery life. These are background services.

If you are saying that there are few background apps, then that's an argument against suspend blockers:
1) few applications can be ported
2) the few applications that can be ported, being background
services, might miss timers and behave worst than _without_ suspend blockers

Quoted 11 lines

As far as whether they *should* require suspend blockers to be in the kernel to get power usage that is suitable for cell phone batteries, I would agree that in the ideal world, it would be nice if you could have applications that make the correct performance/battery utilization tradeoff for devices running on 800 mWh batteries, 94,000 mWh batteries, and while running on the AC mains.  But I don't believe that it's likely to be true, and if you want to try to beat up on application writers one at a time to be power optimized --- as far as I'm concerned, that's an argument *for* suspend blockers, since I'm not big believer in plans that begin, "First, you command the tides of the sea to go back", King Canute style.  :-)

Power is just like any other resource, why are desktop applications not using 100% CPU, or 100% of memory? Because if they did nobody would be using them. There's a social pressure to use less resources, or at least less resources than the competence. If an application uses too much battery time nobody would use it, unless perhaps if the functionality is too good and there are no alternatives.

I believe social forces already deal with this problem, all we need to do is provide better tools, not patronize user-space applications.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#798 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Ted Ts'o
Quoted 6 lines · Ted Ts'o
Quoted 4 lines · Felipe Contreras

My guess is you haven't used a truly multi-tasking device like the N900; now that I've got used to it, I consider that functionality *essential*.

Quoted 8 lines

I've used an N800, and I wasn't impressed; if anything, the fact that I have to worry about manually killing off applications when memory gets low, I actually thought it was incredibly sucky.  It was a miniature, badly done laptop.

Maybe the N900 is different, but the bigger question is what do you mean by "multi-tasking"?  Definitions are critical here, which is why Paul was so careful in his definitions section of his document.

Yes, the N900 is drastically different, for starters, it has an actual window manager.

By multi-tasking I mean me (the user) being able to perform multiple tasks at the same time.

For example: writing an email, while browsing the web, while having IM conversations. Obviously not exactly at the same time; start writing an email, go browse for some url, copy, answer a pending IM message, go back to the mail, paste.

Quoted 10 lines
Quoted 10 lines

The argument in favor of suspend blockers is that you could take applications that are not designed for embedded, and make them run on an embedded device without draining excessive battery life; those applications would have to be background services not conflicting with Android's design.

I agree there probably would not be that many background apps, and probably even less ported background apps, but that is actually an argument against suspend blockers.

Quoted 8 lines
Quoted 3 lines

The rest of the apps (UI apps), cannot be ported, but have to be written specifically for Android, and therefore should have PM in mind, and not require suspend blockers to have good power usage.

If you are using a GUI framework which is optimized for a single- application-focus-at-a-time UI that isn't GNOME or KDE, then that will require the applications to be written.  However, that's not because of suspend-blockers.

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

Quoted 9 lines

If you assume a GUI framework which is flexible enough --- maybe Qt falls into this category, maybe not --- for the rest of the applications, they don't need to *know* about suspend blockers, and they certainly do't have to be rewritten or modified specifically for suspend blockers.  So if your argument is that applications that don't need bacground services (which you've admitted comprises majority of applicatios) need to be modified or written specifically to support suspend blockers, that's simply not true.  They don't need to be modified at all.

That's not my argument at all. I was talking about a counter-argument to "suspend blockers make porting desktop apps easer".

Android's UI applications are unimportant here because they have not been ported from the desktop realm; they were designed specifically for Android, including all its PM capabilities.

The only relevant applications are the ones designed for the desktop that are ported to Android, and thus might make assumptions that hurt battery life. These are background services.

If you are saying that there are few background apps, then that's an argument against suspend blockers:
1) few applications can be ported
2) the few applications that can be ported, being background
services, might miss timers and behave worst than _without_ suspend blockers

Quoted 11 lines

As far as whether they *should* require suspend blockers to be in the kernel to get power usage that is suitable for cell phone batteries, I would agree that in the ideal world, it would be nice if you could have applications that make the correct performance/battery utilization tradeoff for devices running on 800 mWh batteries, 94,000 mWh batteries, and while running on the AC mains.  But I don't believe that it's likely to be true, and if you want to try to beat up on application writers one at a time to be power optimized --- as far as I'm concerned, that's an argument *for* suspend blockers, since I'm not big believer in plans that begin, "First, you command the tides of the sea to go back", King Canute style.  :-)

Power is just like any other resource, why are desktop applications not using 100% CPU, or 100% of memory? Because if they did nobody would be using them. There's a social pressure to use less resources, or at least less resources than the competence. If an application uses too much battery time nobody would use it, unless perhaps if the functionality is too good and there are no alternatives.

I believe social forces already deal with this problem, all we need to do is provide better tools, not patronize user-space applications.

Signature · 1 line
Felipe Contreras
#799 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 5 lines · Felipe Contreras

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

I think you're wrong that this will be sufficient, but I've already stated my position before, namely that what you do when you only have 800mWh has very different performance/battery tradeoffs than when you have 94,000mWh batteries. One of the reasons why my mail archive for this discussion has over 1800 messages and is close to 10MB is that everyone keeps saying the same thing over and over again. So I'm not going to say it again.

I was thinking that the only way we can tell is for us to go away and come back in two years, and we can see whether or not Meego is getting the same 200,000 activations per day that Android is, and maybe *then* people will understand.

However, earlier today, I had a very productive conversation with an engineer from Nokia who has had many years of experience of doing power management for cell phones, and who is now trying to make Meego power efficient enough for cell phones, and he seemed to think that problem which suspend blockers or wakelocks are trying to solve was valid.

I now believe that part of the problem is that is that many Meego folks only have an experience with Netbooks or Laptops, and don't appreciate that sometimes, when you make such a radical change in battery capacity to a mobile handset, things become qualitatively different, and not just quantitatively different. Put another way, a laptop has six hours of battery lifetime with 94,000 mWh worth of battery; a cell phone needs to be able to be usable over a 20-24 hour period of despite having a 800-1200 mWh battery --- and what you need do for these two are different.

This is very similar to how trying to make a kernel scale to 512 NUMA nodes is quite different to trying make a kernel work with 4-8 SMP cpu's. Until you've actually tried doing it, you might think that all you have to do is just throw in a bunch of spinlocks and rw spinlocks. But it turns out it's a lot harder than that --- but it's very hard to convince someone who hasn't had that experience to understand why that is true.

So it may very well be that we should just agree to disagree, and if there are one or more Nokia engineers who are interested in doing something that would help their cell phones (I will let them speak up and clarify their positions for themselves), that they work directly with those who agree that there _is_ a problem.

At that point, we can either keep these patches out of tree, much like how the SGI Altix has patches that are needed so that the Linux kernel scales enough so it will even successfully complete its kernel initialization successfully. Or if there is consensus between people who are interested at Linaro (if any), Nokia (if any), and Android (if any), maybe we take this directly to Linus, and he can say yes or no.

But for those who are unwilling to believe it isn't even a problem, I don't know that another 2000 e-mail messages, and another 10MB of mail archives, is going to achieve anything. Let's just agree to disagree.

- Ted

P.S. Just to make it clear, I am speaking only for myself, and not for the Android team and not for Google in any way, shape, or form. Nor was the person from Nokia who expressed to me his opinions was not necessarily expressing the opinions of Nokia or (obviously) Meego.

#800 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 5 lines · Felipe Contreras

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

I think you're wrong that this will be sufficient, but I've already stated my position before, namely that what you do when you only have 800mWh has very different performance/battery tradeoffs than when you have 94,000mWh batteries. One of the reasons why my mail archive for this discussion has over 1800 messages and is close to 10MB is that everyone keeps saying the same thing over and over again. So I'm not going to say it again.

I was thinking that the only way we can tell is for us to go away and come back in two years, and we can see whether or not Meego is getting the same 200,000 activations per day that Android is, and maybe *then* people will understand.

However, earlier today, I had a very productive conversation with an engineer from Nokia who has had many years of experience of doing power management for cell phones, and who is now trying to make Meego power efficient enough for cell phones, and he seemed to think that problem which suspend blockers or wakelocks are trying to solve was valid.

I now believe that part of the problem is that is that many Meego folks only have an experience with Netbooks or Laptops, and don't appreciate that sometimes, when you make such a radical change in battery capacity to a mobile handset, things become qualitatively different, and not just quantitatively different. Put another way, a laptop has six hours of battery lifetime with 94,000 mWh worth of battery; a cell phone needs to be able to be usable over a 20-24 hour period of despite having a 800-1200 mWh battery --- and what you need do for these two are different.

This is very similar to how trying to make a kernel scale to 512 NUMA nodes is quite different to trying make a kernel work with 4-8 SMP cpu's. Until you've actually tried doing it, you might think that all you have to do is just throw in a bunch of spinlocks and rw spinlocks. But it turns out it's a lot harder than that --- but it's very hard to convince someone who hasn't had that experience to understand why that is true.

So it may very well be that we should just agree to disagree, and if there are one or more Nokia engineers who are interested in doing something that would help their cell phones (I will let them speak up and clarify their positions for themselves), that they work directly with those who agree that there _is_ a problem.

At that point, we can either keep these patches out of tree, much like how the SGI Altix has patches that are needed so that the Linux kernel scales enough so it will even successfully complete its kernel initialization successfully. Or if there is consensus between people who are interested at Linaro (if any), Nokia (if any), and Android (if any), maybe we take this directly to Linus, and he can say yes or no.

But for those who are unwilling to believe it isn't even a problem, I don't know that another 2000 e-mail messages, and another 10MB of mail archives, is going to achieve anything. Let's just agree to disagree.

- Ted

P.S. Just to make it clear, I am speaking only for myself, and not for the Android team and not for Google in any way, shape, or form. Nor was the person from Nokia who expressed to me his opinions was not necessarily expressing the opinions of Nokia or (obviously) Meego.

#801 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 7 lines · Ted Ts'o
Quoted 5 lines · Felipe Contreras

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

Quoted 7 lines

I think you're wrong that this will be sufficient, but I've already stated my position before, namely that what you do when you only have 800mWh has very different performance/battery tradeoffs than when you have 94,000mWh batteries.  One of the reasons why my mail archive for this discussion has over 1800 messages and is close to 10MB is that everyone keeps saying the same thing over and over again.  So I'm not going to say it again.

Applications need to take smart decisions to save power based on a number of things: is the screen on? is the ear close to the speaker? is there a network available? is it a cellular connection? has the user decided to automatically disconnect from the network after certain time, or at night? etc. I think that, and range timers / ip heartbeat is enough. But that, as you say has been discussed before.

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

Quoted 4 lines

I was thinking that the only way we can tell is for us to go away and come back in two years, and we can see whether or not Meego is getting the same 200,000 activations per day that Android is, and maybe *then* people will understand.

Are you kidding? Even if MeeGo fails in being as popular as Android, that doesn't saying anything about whether suspend-blockers are sensible or not. Besides, there is also the possibility that Android people realize they don't need suspend-blockers.

Quoted 6 lines

However, earlier today, I had a very productive conversation with an engineer from Nokia who has had many years of experience of doing power management for cell phones, and who is now trying to make Meego power efficient enough for cell phones, and he seemed to think that problem which suspend blockers or wakelocks are trying to solve was valid.

So? I'm sure there's some people in Google that believe that suspend-blockers are not needed.

Quoted 9 lines

I now believe that part of the problem is that is that many Meego folks only have an experience with Netbooks or Laptops, and don't appreciate that sometimes, when you make such a radical change in battery capacity to a mobile handset, things become qualitatively different, and not just quantitatively different.  Put another way, a laptop has six hours of battery lifetime with 94,000 mWh worth of battery; a cell phone needs to be able to be usable over a 20-24 hour period of despite having a 800-1200 mWh battery --- and what you need do for these two are different.

Right. Nokia people only have experience with laptops. Surely my N900 lasts days because it's receiving energy from another dimension.

Quoted 7 lines

This is very similar to how trying to make a kernel scale to 512 NUMA nodes is quite different to trying make a kernel work with 4-8 SMP cpu's.  Until you've actually tried doing it, you might think that all you have to do is just throw in a bunch of spinlocks and rw spinlocks. But it turns out it's a lot harder than that --- but it's very hard to convince someone who hasn't had that experience to understand why that is true.

We are talking about user-space.

Quoted 5 lines

So it may very well be that we should just agree to disagree, and if there are one or more Nokia engineers who are interested in doing something that would help their cell phones (I will let them speak up and clarify their positions for themselves), that they work directly with those who agree that there _is_ a problem.

Yeah, there is a problem, and the solution doesn't require suspend-blockers.

Quoted 10 lines

At that point, we can either keep these patches out of tree, much like how the SGI Altix has patches that are needed so that the Linux kernel scales enough so it will even successfully complete its kernel initialization successfully.  Or if there is consensus between people who are interested at Linaro (if any), Nokia (if any), and Android (if any), maybe we take this directly to Linus, and he can say yes or no.

But for those who are unwilling to believe it isn't even a problem, I don't know that another 2000 e-mail messages, and another 10MB of mail archives, is going to achieve anything.  Let's just agree to disagree.

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#802 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Ted Ts'o
Quoted 7 lines · Ted Ts'o
Quoted 5 lines · Felipe Contreras

Let's concentrate; Android is the only mobile platform that has expressed interested in suspend blockers. UI applications in Android are written specifically for Android. Period.

Other platforms, such as MeeGo, rely on Qt API, not suspend blockers.

Quoted 7 lines

I think you're wrong that this will be sufficient, but I've already stated my position before, namely that what you do when you only have 800mWh has very different performance/battery tradeoffs than when you have 94,000mWh batteries.  One of the reasons why my mail archive for this discussion has over 1800 messages and is close to 10MB is that everyone keeps saying the same thing over and over again.  So I'm not going to say it again.

Applications need to take smart decisions to save power based on a number of things: is the screen on? is the ear close to the speaker? is there a network available? is it a cellular connection? has the user decided to automatically disconnect from the network after certain time, or at night? etc. I think that, and range timers / ip heartbeat is enough. But that, as you say has been discussed before.

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

Quoted 4 lines

I was thinking that the only way we can tell is for us to go away and come back in two years, and we can see whether or not Meego is getting the same 200,000 activations per day that Android is, and maybe *then* people will understand.

Are you kidding? Even if MeeGo fails in being as popular as Android, that doesn't saying anything about whether suspend-blockers are sensible or not. Besides, there is also the possibility that Android people realize they don't need suspend-blockers.

Quoted 6 lines

However, earlier today, I had a very productive conversation with an engineer from Nokia who has had many years of experience of doing power management for cell phones, and who is now trying to make Meego power efficient enough for cell phones, and he seemed to think that problem which suspend blockers or wakelocks are trying to solve was valid.

So? I'm sure there's some people in Google that believe that suspend-blockers are not needed.

Quoted 9 lines

I now believe that part of the problem is that is that many Meego folks only have an experience with Netbooks or Laptops, and don't appreciate that sometimes, when you make such a radical change in battery capacity to a mobile handset, things become qualitatively different, and not just quantitatively different.  Put another way, a laptop has six hours of battery lifetime with 94,000 mWh worth of battery; a cell phone needs to be able to be usable over a 20-24 hour period of despite having a 800-1200 mWh battery --- and what you need do for these two are different.

Right. Nokia people only have experience with laptops. Surely my N900 lasts days because it's receiving energy from another dimension.

Quoted 7 lines

This is very similar to how trying to make a kernel scale to 512 NUMA nodes is quite different to trying make a kernel work with 4-8 SMP cpu's.  Until you've actually tried doing it, you might think that all you have to do is just throw in a bunch of spinlocks and rw spinlocks. But it turns out it's a lot harder than that --- but it's very hard to convince someone who hasn't had that experience to understand why that is true.

We are talking about user-space.

Quoted 5 lines

So it may very well be that we should just agree to disagree, and if there are one or more Nokia engineers who are interested in doing something that would help their cell phones (I will let them speak up and clarify their positions for themselves), that they work directly with those who agree that there _is_ a problem.

Yeah, there is a problem, and the solution doesn't require suspend-blockers.

Quoted 10 lines

At that point, we can either keep these patches out of tree, much like how the SGI Altix has patches that are needed so that the Linux kernel scales enough so it will even successfully complete its kernel initialization successfully.  Or if there is consensus between people who are interested at Linaro (if any), Nokia (if any), and Android (if any), maybe we take this directly to Linus, and he can say yes or no.

But for those who are unwilling to believe it isn't even a problem, I don't know that another 2000 e-mail messages, and another 10MB of mail archives, is going to achieve anything.  Let's just agree to disagree.

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Signature · 1 line
Felipe Contreras
#803 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 5 lines · Felipe Contreras

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

On behalf of the Android folks, we don't agree with this. If you're going to wait until we suddenly change our minds, I think you're going to be in for a long wait.

Quoted 5 lines

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it. I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers. I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

Given your opinion that Android lacks multitasking (what? really?) and various other strange statements about the platform, I'm likely to be taking your suggestions with generous helping of skepticism.

Brian

#804 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 5 lines · Felipe Contreras

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

On behalf of the Android folks, we don't agree with this. If you're going to wait until we suddenly change our minds, I think you're going to be in for a long wait.

Quoted 5 lines

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it. I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers. I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

Given your opinion that Android lacks multitasking (what? really?) and various other strange statements about the platform, I'm likely to be taking your suggestions with generous helping of skepticism.

Brian

#805 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 11 lines · Brian Swetland
Quoted 5 lines · Felipe Contreras

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

On behalf of the Android folks, we don't agree with this.  If you're going to wait until we suddenly change our minds, I think you're going to be in for a long wait.

I'm sure as a team that's the case, but you can't know what's in the mind of everyone at Google (not Android).

Quoted 6 lines
Quoted 5 lines

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Quoted 6 lines

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it.  I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers.  I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

That was not an argument, it was an opinion. If you want an argument go back to read this one:
http://article.gmane.org/gmane.linux.kernel/1021834

Quoted 1 line

Given your opinion that Android lacks multitasking (what? really?)

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#806 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 11 lines · Brian Swetland
Quoted 5 lines · Felipe Contreras

Now, only Android has decided to use suspend blockers, that's a *fact*, and I wanted to narrow the discussion to Android in order to make it easier to understand that Android doesn't need suspend blockers, once we have agreed that, then I'd gladly discuss it's merits outside Android.

On behalf of the Android folks, we don't agree with this.  If you're going to wait until we suddenly change our minds, I think you're going to be in for a long wait.

I'm sure as a team that's the case, but you can't know what's in the mind of everyone at Google (not Android).

Quoted 6 lines
Quoted 5 lines

I argued to you that suspend-blockers are not required in Android, and suddenly you decide we should agree to disagree without arguing back? Well, suit yourself. I still maintain that suspend-blockers is just an expensive workaround, and in some cases actually degrades power consumption; the right solution is much more sophisticated.

Quoted 6 lines

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it.  I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers.  I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

That was not an argument, it was an opinion. If you want an argument go back to read this one:
http://article.gmane.org/gmane.linux.kernel/1021834

Quoted 1 line

Given your opinion that Android lacks multitasking (what? really?)

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Signature · 1 line
Felipe Contreras
#807 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 11 lines · Felipe Contreras
Quoted 6 lines

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it.  I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers.  I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

That was not an argument, it was an opinion. If you want an argument go back to read this one:
http://article.gmane.org/gmane.linux.kernel/1021834

Quoted 5 lines
Quoted 1 line

Given your opinion that Android lacks multitasking (what? really?)

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Home + pick app -> switch to the app in whatever state it was in.

Home (longpress) -> recent app list + pick app from popup -> switch to recent app in whatever state it was in.

pull down alert windowshade + pick app from alerts list -> switch to that app

I routinely flip back and forth between email / browser / IM / musicplayer / etc

I have no problem with you perhaps liking the visuals of the N900 better, but to say Android lacks multitasking (as you explain it below) is incorrect:

Quoted 7 lines

By multi-tasking I mean me (the user) being able to perform multiple tasks at the same time.

For example: writing an email, while browsing the web, while having IM conversations. Obviously not exactly at the same time; start writing an email, go browse for some url, copy, answer a pending IM message, go back to the mail, paste.

As far as implementing app switching with a deck of cards metaphor, I've seen that done by some OEMs with Android, though it's not the default system UI.

Brian
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

#808 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 11 lines · Felipe Contreras
Quoted 6 lines

Once "the right solution" exists and solves our problems, we'll certainly look into switching over to it.  I've yet to see a proposal in all this arguing that appears to me to be an improvement over what we have today with suspend blockers.  I find the "don't do what you're doing because someday, somebody will do it better" to be an uncompelling argument.

That was not an argument, it was an opinion. If you want an argument go back to read this one:
http://article.gmane.org/gmane.linux.kernel/1021834

Quoted 5 lines
Quoted 1 line

Given your opinion that Android lacks multitasking (what? really?)

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Home + pick app -> switch to the app in whatever state it was in.

Home (longpress) -> recent app list + pick app from popup -> switch to recent app in whatever state it was in.

pull down alert windowshade + pick app from alerts list -> switch to that app

I routinely flip back and forth between email / browser / IM / musicplayer / etc

I have no problem with you perhaps liking the visuals of the N900 better, but to say Android lacks multitasking (as you explain it below) is incorrect:

Quoted 7 lines

By multi-tasking I mean me (the user) being able to perform multiple tasks at the same time.

For example: writing an email, while browsing the web, while having IM conversations. Obviously not exactly at the same time; start writing an email, go browse for some url, copy, answer a pending IM message, go back to the mail, paste.

As far as implementing app switching with a deck of cards metaphor, I've seen that done by some OEMs with Android, though it's not the default system UI.

Brian

#809 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 7 lines · Brian Swetland
Quoted 3 lines · Felipe Contreras

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Home + pick app -> switch to the app in whatever state it was in.

If the app stops running, that's *fake* multi-tasking, and doesn't match my experience; I can't remember the details, but I tested it on a Nexus One, and the item I was looking at was gone, I had to scroll again.

Also, I cannot go to last.fm on the browser, play some music, and do other stuff at the same time, can I?

Anyway, what you do in Android is your problem. The point is that in Linux we need good PM *with* multi-tasking (not really an argument against opportunistic suspend, I think, but a clarification from Ted's comment)

Signature · 1 line
Felipe Contreras
#810 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Brian Swetland
Quoted 7 lines · Brian Swetland
Quoted 3 lines · Felipe Contreras

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Home + pick app -> switch to the app in whatever state it was in.

If the app stops running, that's *fake* multi-tasking, and doesn't match my experience; I can't remember the details, but I tested it on a Nexus One, and the item I was looking at was gone, I had to scroll again.

Also, I cannot go to last.fm on the browser, play some music, and do other stuff at the same time, can I?

Anyway, what you do in Android is your problem. The point is that in Linux we need good PM *with* multi-tasking (not really an argument against opportunistic suspend, I think, but a clarification from Ted's comment)

Signature · 1 line
Felipe Contreras
#811 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 7 lines · Felipe Contreras
Quoted 6 lines · Brian Swetland
Quoted 3 lines · Felipe Contreras

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Quoted 6 lines
Quoted 1 line

Home + pick app -> switch to the app in whatever state it was in.

If the app stops running, that's *fake* multi-tasking, and doesn't match my experience; I can't remember the details, but I tested it on a Nexus One, and the item I was looking at was gone, I had to scroll again.

That'd be surprise. Last I checked I was able to launch 40-50 apps on N1 before we even started getting low on memory and the system won't kill apps off unless we completely bottom out on memory. It's possible that some app might do the wrong thing when going to the background and back to the foreground but that'd be an app bug.

Quoted 2 lines

Also, I cannot go to last.fm on the browser, play some music, and do other stuff at the same time, can I?

I'm not sure off the top of my head if the browser will keep music/flash playing on pages when it's not the foreground app, but you can certainly run something like Pandora (or a number of other streaming music apps) in the background and play streaming music while you do other stuff. There's no reason the browser *couldn't* do this as well.

Quoted 4 lines

Anyway, what you do in Android is your problem. The point is that in Linux we need good PM *with* multi-tasking (not really an argument against opportunistic suspend, I think, but a clarification from Ted's comment)

Well I'm glad we agree that multitasking and PM are important.

Brian

#812 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 7 lines · Felipe Contreras
Quoted 6 lines · Brian Swetland
Quoted 3 lines · Felipe Contreras

This is what I'm talking about when I say multi-tasking, Android certainly doesn't have anything remotely like that:
http://www.youtube.com/watch?v=7emvUBpEkbU

Quoted 6 lines
Quoted 1 line

Home + pick app -> switch to the app in whatever state it was in.

If the app stops running, that's *fake* multi-tasking, and doesn't match my experience; I can't remember the details, but I tested it on a Nexus One, and the item I was looking at was gone, I had to scroll again.

That'd be surprise. Last I checked I was able to launch 40-50 apps on N1 before we even started getting low on memory and the system won't kill apps off unless we completely bottom out on memory. It's possible that some app might do the wrong thing when going to the background and back to the foreground but that'd be an app bug.

Quoted 2 lines

Also, I cannot go to last.fm on the browser, play some music, and do other stuff at the same time, can I?

I'm not sure off the top of my head if the browser will keep music/flash playing on pages when it's not the foreground app, but you can certainly run something like Pandora (or a number of other streaming music apps) in the background and play streaming music while you do other stuff. There's no reason the browser *couldn't* do this as well.

Quoted 4 lines

Anyway, what you do in Android is your problem. The point is that in Linux we need good PM *with* multi-tasking (not really an argument against opportunistic suspend, I think, but a clarification from Ted's comment)

Well I'm glad we agree that multitasking and PM are important.

Brian

#813 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 5 lines · Paul E. McKenney

o       "Ill-behaved application" AKA "untrusted application" AKA "crappy application".

o       "PM-driving application" are applications that are permitted to acquire suspend blockers on Android.

These definitions are wrong.

1) There are trusted applications that misbehave (the user clicks Yes when asked about PM permissions)
2) There are untrusted applications that are power optimized (The user clicks No)

The proponents of suspend blockers in user-space have tried to ignore this fact, but the truth is that PM permissions and power optimization are orthogonal to each other.

Signature · 5 lines
Felipe Contreras
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
#814 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Paul E. McKenney
Quoted 5 lines · Paul E. McKenney

o       "Ill-behaved application" AKA "untrusted application" AKA "crappy application".

o       "PM-driving application" are applications that are permitted to acquire suspend blockers on Android.

These definitions are wrong.

1) There are trusted applications that misbehave (the user clicks Yes when asked about PM permissions)
2) There are untrusted applications that are power optimized (The user clicks No)

The proponents of suspend blockers in user-space have tried to ignore this fact, but the truth is that PM permissions and power optimization are orthogonal to each other.

Signature · 1 line
Felipe Contreras
#815 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

Quoted 9 lines · Felipe Contreras
Quoted 5 lines · Paul E. McKenney

o       "Ill-behaved application" AKA "untrusted application" AKA "crappy application".

o       "PM-driving application" are applications that are permitted to acquire suspend blockers on Android.

These definitions are wrong.

Indeed they are, given the way you quoted small portions of them. ;-)

Quoted 2 lines

1) There are trusted applications that misbehave (the user clicks Yes when asked about PM permissions)

These would be buggy PM-driving applications. Of course, any type of application might have bugs, including PM-driving applications.

Quoted 2 lines

2) There are untrusted applications that are power optimized (The user clicks No)

I did indeed exclude this category by saying "power-optimized applications are those PM-driving applications that have been aggressively tuned to reduce power consumption." The reason I excluded this case is that that there are a number of cases where removing the PM-driving attribute could destroy the power optimization.

If you have an example power-optimized application that retains its power-optimized property despite lacking PM-driving privileges, please put it forward. In doing so, please keep two things in mind:

1. The definition of power-optimized is more aggressive than many

	people are used to -- look at http://lkml.org/lkml/2010/8/4/409
	and search for "POWER-OPTIMIZED APPLICATIONS".

2. In a number of the implementations that do not use suspend blockers,
-all- applications are in effect PM-driving applications. So it is quite possible that different people are using subtly different flavors of the "PM-driving applications" definition.

For example, an Android person might consider a application to be PM-driving only if it is permitted to use suspend blockers, while a Maemo person might consider an application to be PM-driving if it had permission to invoke pm_qos functions. If these two hypothetical people each try to apply their definition of PM-driving to each others' platforms, they will likely have severe problems communicating with each other, right? ;-)

But if you do have a good example, perhaps I will need to change my definition of power-optimized application.

Quoted 3 lines

The proponents of suspend blockers in user-space have tried to ignore this fact, but the truth is that PM permissions and power optimization are orthogonal to each other.

In fact, you might have noticed that the proponents of each platform have been quite persistent in shouting past each other from the warmth and security of their own particular viewpoints. ;-)

Thanx, Paul

#816 lore raw

Re: Attempted summary of suspend-blockers LKML thread, take three

In reply to Felipe Contreras
Quoted 9 lines · Felipe Contreras
Quoted 5 lines · Paul E. McKenney

o       "Ill-behaved application" AKA "untrusted application" AKA "crappy application".

o       "PM-driving application" are applications that are permitted to acquire suspend blockers on Android.

These definitions are wrong.

Indeed they are, given the way you quoted small portions of them. ;-)

Quoted 2 lines

1) There are trusted applications that misbehave (the user clicks Yes when asked about PM permissions)

These would be buggy PM-driving applications. Of course, any type of application might have bugs, including PM-driving applications.

Quoted 2 lines

2) There are untrusted applications that are power optimized (The user clicks No)

I did indeed exclude this category by saying "power-optimized applications are those PM-driving applications that have been aggressively tuned to reduce power consumption." The reason I excluded this case is that that there are a number of cases where removing the PM-driving attribute could destroy the power optimization.

If you have an example power-optimized application that retains its power-optimized property despite lacking PM-driving privileges, please put it forward. In doing so, please keep two things in mind:

1. The definition of power-optimized is more aggressive than many

	people are used to -- look at http://lkml.org/lkml/2010/8/4/409
	and search for "POWER-OPTIMIZED APPLICATIONS".

2. In a number of the implementations that do not use suspend blockers,
-all- applications are in effect PM-driving applications. So it is quite possible that different people are using subtly different flavors of the "PM-driving applications" definition.

For example, an Android person might consider a application to be PM-driving only if it is permitted to use suspend blockers, while a Maemo person might consider an application to be PM-driving if it had permission to invoke pm_qos functions. If these two hypothetical people each try to apply their definition of PM-driving to each others' platforms, they will likely have severe problems communicating with each other, right? ;-)

But if you do have a good example, perhaps I will need to change my definition of power-optimized application.

Quoted 3 lines

The proponents of suspend blockers in user-space have tried to ignore this fact, but the truth is that PM permissions and power optimization are orthogonal to each other.

In fact, you might have noticed that the proponents of each platform have been quite persistent in shouting past each other from the warmth and security of their own particular viewpoints. ;-)

Thanx, Paul