From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/6] radio settings: add FastDormancy property
Date: Thu, 28 Oct 2010 10:19:27 -0500 [thread overview]
Message-ID: <4CC9947F.8050205@gmail.com> (raw)
In-Reply-To: <C358A26273CF2948B8BCDBA661A581782A7DCA1810@NOK-EUMSG-03.mgdnok.nokia.com>
[-- Attachment #1: Type: text/plain, Size: 2754 bytes --]
Hi Mika,
On 10/28/2010 08:32 AM, Mika.Liljeberg(a)nokia.com wrote:
> Hi Denis,
>
>> Patch has been applied, thanks. I did make a couple of minor tweaks
>> afterwards.
>
> Thanks. A question regarding this particular tweak:
>
> diff --git a/src/radio-settings.c b/src/radio-settings.c
> index cb0a598..eb2a42d 100644
> --- a/src/radio-settings.c
> +++ b/src/radio-settings.c
> @@ -126,8 +126,7 @@ static void radio_set_fast_dormancy(struct ofono_radio_settings *rs,
> const char *path = __ofono_atom_get_path(rs->atom);
> dbus_bool_t value = enable;
>
> - if ((rs->flags & RADIO_SETTINGS_FLAG_CACHED) &&
> - rs->fast_dormancy == enable)
> + if (rs->fast_dormancy == enable)
> return;
>
> ofono_dbus_signal_property_changed(conn, path,
>
> The fundamental problem here is that there is only a single CACHED flag for multiple properties, which may be modified individually. So, either you get extra signals or you get too few. I checked the CACHED flag here because otherwise the following might happen:
Yes, I know. But this problem is present in every single atom. oFono
does not guarantee that every attribute is signaled when the atom is
initialized.
>
> 1. client tries to GetProperties() and gets the "Operation already in progress" error.
> 2. client waits for PropertyChanged signal to get the FastDormancy value
> 3. signal never comes because the default value happens to match the one returned by the driver and the signal is suppressed
>
In general I think that for interfaces where this can happen, the
likelihood is very low that it actually will in the real world.
Do note that I have had the same argument with myself off and on for the
past two years. So far this was never raised as an issue. If this ever
becomes a problem, we can fix it properly using an appropriate idiom.
> I do agree that sending extra signals is bad but I think that not sending a signal is even worse. If the client cannot rely on getting a PropertyChanged signal after a busy error, all it can do is resort to polling. I.e., every client has to implement a polling pattern for GetProperties:
>
> while (GetProperties() == BUSY)
> sleep(FOR_A_WHILE);
>
> Having a separate CACHED flag for each value would solve this optimally. Failing that, I don't think a few extra signals is so bad. Forcing clients to poll is just ugly.
>
Honestly, if you expect multiple applications to battle over the
FastDormancy property, then it should be modeled differently. Perhaps
with application registration and lifetime tracking over D-Bus, similar
to how agents work.
> Am I missing something?
>
> MikaL
Regards,
-Denis
next prev parent reply other threads:[~2010-10-28 15:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 15:31 [PATCH 0/6] Fast dormancy support Mika Liljeberg
2010-10-26 15:31 ` [PATCH 1/6] radio settings: fix mode initializion Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 2/6] stemodem: add default case Mika Liljeberg
2010-10-26 15:35 ` Marcel Holtmann
2010-10-26 15:43 ` Mika.Liljeberg
2010-10-26 16:24 ` Marcel Holtmann
2010-10-27 7:06 ` Mika.Liljeberg
2010-10-27 9:12 ` Marcel Holtmann
2010-10-26 15:31 ` [PATCH 3/6] radio settings: add FastDormancy property Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-28 13:32 ` Mika.Liljeberg
2010-10-28 15:19 ` Denis Kenzior [this message]
2010-10-29 8:52 ` Mika.Liljeberg
2010-10-29 14:34 ` Denis Kenzior
2010-11-01 9:18 ` Mika.Liljeberg
2010-10-26 15:31 ` [PATCH 4/6] test: add script to control fast dormancy Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 5/6] isimodem: add support for FastDormancy property Mika Liljeberg
2010-10-28 3:28 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 6/6] TODO: mark fast dormancy as done Mika Liljeberg
2010-10-28 3:28 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CC9947F.8050205@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.