Notices


Reply
Thread Tools
Posts: 3,267 | Thanked: 4,225 times | Joined on May 2011 @ Poland
#11
I verified the sources of the kernel I'm running and while there are traces of the HAS_EARLY_SUSPEND define guard, the early suspend is definitely gone. I have thus asked a little different, more specific question on TJC: https://together.jolla.com/question/...by-the-kernel/

____________________

I think I don't really understand your stance, so I'll explain my reservations with an example.

The motivation for this example is XMPP - the IM I'm using every day with my best friends but I do a little simplification, so as to make the analysis easier.

The scenario
An applications opens a TCP connection to a server. After the three-way-handshake, in an infinite loop it
1) makes a blocking read() on the socket, waiting for the data sent by the server
2) prints the message sent by the server to stdout
The messages are sent by the server in random intervals between 0 and 120 minutes.

The problem
There are two scenarios available:
1. The application acquires a wakelock. This means that all subsystems are running 24/7, even the touchscreen or the microphone. This means that the applications drains more battery that it would do on a normal computer, as far as I understand
2. The application doesn't acquire a wakelock. This means that it won't work correctly - after some time it will simply stop receiving the messages.

______________

Different problems:

Besides, if the whole system is suspended, how can it receive calls in real time? If the whole system is suspended, then the applications handling the calls are suspended too and the GSM radios are suspended as well. And the kernel needs some CPU and RAM to run, and these are suspended as well.

Besides, if only the whole system can be suspended, how may be that we can turn the GPS on and off?

Disclaimer: this post may be a result of severe misunderstanding on my side, in particular: how is the behavior of the device with `-sdisabled` different from the behavior of a laptop running mainline Linux.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following 4 Users Say Thank You to marmistrz For This Useful Post:
ZogG's Avatar
Posts: 1,388 | Thanked: 1,852 times | Joined on Feb 2010 @ Israel
#12
Reminded me of this post
https://felipec.wordpress.com/2012/0...ic-vs-dynamic/
__________________
IRC nick on freenode ZogG
imgrup
 

The Following 5 Users Say Thank You to ZogG For This Useful Post:
Posts: 391 | Thanked: 1,743 times | Joined on Aug 2016 @ Estonia
#13
Originally Posted by marmistrz View Post
...

I think I don't really understand your stance, so I'll explain my reservations with an example.

The motivation for this example is XMPP - the IM I'm using every day with my best friends but I do a little simplification, so as to make the analysis easier.

The scenario
An applications opens a TCP connection to a server. After the three-way-handshake, in an infinite loop it
1) makes a blocking read() on the socket, waiting for the data sent by the server
2) prints the message sent by the server to stdout
The messages are sent by the server in random intervals between 0 and 120 minutes.

The problem
There are two scenarios available:
1. The application acquires a wakelock. This means that all subsystems are running 24/7, even the touchscreen or the microphone. This means that the applications drains more battery that it would do on a normal computer, as far as I understand
2. The application doesn't acquire a wakelock. This means that it won't work correctly - after some time it will simply stop receiving the messages.
Excellent example and I do understand the problem. I think that the proposed scenarios are not all options that you have. However, I haven't written nor looked into the options for such TCP code. Maybe someone here can help you out or you could ask for help in sailfish-dev mailing list or TJC. I would expect that there is an API that you could use for your case which would help you out. In the end, we do have an option for IDLE mail check, don't we?


Originally Posted by marmistrz View Post
Different problems:

Besides, if the whole system is suspended, how can it receive calls in real time? If the whole system is suspended, then the applications handling the calls are suspended too and the GSM radios are suspended as well. And the kernel needs some CPU and RAM to run, and these are suspended as well.

Besides, if only the whole system can be suspended, how may be that we can turn the GPS on and off?

Disclaimer: this post may be a result of severe misunderstanding on my side, in particular: how is the behavior of the device with `-sdisabled` different from the behavior of a laptop running mainline Linux.
Things are a touch more complicated. Some devices on your phone can wake it up and also can function without the help of the main CPU. Note that also CPU cores can be switched off individually. In PC world, you could also have wake-on-lan or using the keyboard. This is similar, I expect.
 

The Following 3 Users Say Thank You to rinigus For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:52.