From: Florian Mickler <florian@mickler.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
james.bottomley@suse.de, markgross@thegnar.org,
mgross@linux.intel.com,
"John W. Linville" <linville@tuxdriver.com>,
"David S. Miller" <davem@davemloft.net>,
Javier Cardona <javier@cozybit.com>, Jouni Malinen <j@w1.fi>,
Rui Paulo <rpaulo@gmail.com>, Kalle Valo <kalle.valo@nokia.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH 1/2] mac80211: make max_network_latency notifier atomic safe
Date: Wed, 9 Jun 2010 12:20:50 +0200 [thread overview]
Message-ID: <20100609122050.1dd18132@schatten.dmk.lab> (raw)
In-Reply-To: <1276076287.3727.15.camel@jlt3.sipsolutions.net>
On Wed, 09 Jun 2010 11:38:07 +0200
Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2010-06-09 at 11:15 +0200, florian@mickler.org wrote:
> > In order to have the pm_qos framework be callable from interrupt
> > context, all listeners have to also be callable in that context.
>
> That makes no sense at all. Why add work structs _everywhere_ in the
> callees and make the API harder to use and easy to get wrong completely,
> instead of just adding a single work struct that will be queued from the
> caller and dealing with the locking complexity etc. just once.
>
> johannes
Just to defend this approach, but I'm certainly not married to it
(hence RFC):
There are only two listeners at the moment. I suspect that most future
uses of the framework need to be atomic, as the driver that
requests a specific quality of service probably doesn't want to get into
races with the provider of that service(listener). So i suspected the
network listener to be the special case.
The race between service-provider and qos-requester for non-atomic
contextes is already there, isn't it? so, locking complexity shouldn't
be worse than before.
But my first approach to this is seen here:
https://lists.linux-foundation.org/pipermail/linux-pm/2010-June/026902.html
A third possibility would be to make it dependent on the
type of the constraint, if blocking notifiers are allowed or not.
But that would sacrifice API consistency (update_request for one
constraint is allowed to be called in interrupt context and
update_request for another would be not).
Cheers,
Flo
next prev parent reply other threads:[~2010-06-09 10:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 9:15 [RFC PATCH 1/2] mac80211: make max_network_latency notifier atomic safe florian
2010-06-09 9:15 ` [PATCH 2/2] pm_qos: make update_request callable from interrupt context florian
2010-06-09 9:15 ` florian
2010-06-09 9:46 ` Thomas Gleixner
2010-06-09 12:38 ` James Bottomley
2010-06-09 15:27 ` Florian Mickler
2010-06-09 15:32 ` James Bottomley
2010-06-09 15:32 ` James Bottomley
2010-06-09 16:48 ` Florian Mickler
2010-06-09 16:48 ` Florian Mickler
2010-06-09 15:27 ` Florian Mickler
2010-06-09 12:38 ` James Bottomley
2010-06-09 9:46 ` Thomas Gleixner
2010-06-09 9:38 ` [RFC PATCH 1/2] mac80211: make max_network_latency notifier atomic safe Johannes Berg
2010-06-09 10:20 ` Florian Mickler [this message]
2010-06-09 10:42 ` Johannes Berg
2010-06-09 10:42 ` Johannes Berg
2010-06-09 12:16 ` Florian Mickler
2010-06-09 12:16 ` Florian Mickler
2010-06-09 12:27 ` Johannes Berg
2010-06-09 12:27 ` Johannes Berg
2010-06-09 15:37 ` Florian Mickler
2010-06-09 15:37 ` Florian Mickler
2010-06-09 15:37 ` Florian Mickler
2010-06-09 12:27 ` Johannes Berg
2010-06-09 10:20 ` Florian Mickler
2010-06-09 9:38 ` Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2010-06-09 9:15 florian
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=20100609122050.1dd18132@schatten.dmk.lab \
--to=florian@mickler.org \
--cc=davem@davemloft.net \
--cc=j@w1.fi \
--cc=james.bottomley@suse.de \
--cc=javier@cozybit.com \
--cc=johannes@sipsolutions.net \
--cc=kalle.valo@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=markgross@thegnar.org \
--cc=mgross@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=rpaulo@gmail.com \
--cc=tglx@linutronix.de \
/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.