public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Christian Lamparter <chunkeey@web.de>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	ath9k-devel@lists.ath9k.org,
	Reinette Chatre <reinette.chatre@intel.com>,
	Dan Williams <dcbw@redhat.com>,
	Lennert Buytenhek <buytenh@marvell.com>,
	Daniel Drake <ddrake@brontes3d.com>
Subject: Re: [PATCH] mac80211: redefine usage of the mac80211 workqueue
Date: Sun, 26 Jul 2009 01:06:22 -0700	[thread overview]
Message-ID: <43e72e890907260106h1ad9cdd6i9dc22e3bfece86d8@mail.gmail.com> (raw)
In-Reply-To: <1248510909.32151.48.camel@johannes.local>

On Sat, Jul 25, 2009 at 1:35 AM, Johannes Berg<johannes@sipsolutions.net> wrote:
> On Fri, 2009-07-24 at 20:47 -0400, Luis R. Rodriguez wrote:
>> The mac80211 workqueue exists to enable mac80211 and drivers
>> to queue their own work on a single threaded workqueue. mac80211
>> takes care to flush the workqueue during suspend but we never
>> really had requirements on drivers for how they should use
>> the workqueue in consideration for suspend.
>>
>> We extend mac80211 to document how the mac80211 workqueue should
>> be used, how it should not be used and finally move raw access to
>> the workqueue to mac80211 only. Drivers and mac80211 use helpers
>> to queue work and flush the mac80211 workqueue:
>>
>>   * ieee80211_queue_work()
>>   * ieee80211_queue_delayed_work()
>>   * ieee80211_flush_workqueue()
>
> I would prefer to have wait_on_work()

That's currently static.

> and/or cancel_work_sync() instead
> of flushing?

That's fine but currently drivers are issuing flush_workqueue() directly.

> It's often preferable due to locking constraints to
> cancel_work_sync() instead of flush_workqueue(). Do people really need
> flush_workqueue()?

Yeah good point, so I see 2 users of flush_workqueue, one in at76 and
another on ar9170.

at76: at76_delete_device()

This is used at usb disconnect and probe failure. cancel_work_sync()
definitely seems more appropriate.

ar9170: ar9170_op_stop()

same here, but seems we could add the flush on mac80211 prior to
calling the drv_stop() currently we call it after.

  Luis

  reply	other threads:[~2009-07-26  8:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-25  0:47 [PATCH] mac80211/drivers: add new mac80211 workqueue API Luis R. Rodriguez
2009-07-25  0:47 ` [PATCH] mac80211: redefine usage of the mac80211 workqueue Luis R. Rodriguez
2009-07-25  8:35   ` Johannes Berg
2009-07-26  8:06     ` Luis R. Rodriguez [this message]
2009-07-25  0:47 ` [PATCH] mac80211: do not queue work after suspend in the dynamic ps timer Luis R. Rodriguez
2009-07-27 15:37   ` Luis R. Rodriguez
2009-07-25  0:47 ` [PATCH] ath9k: cancel xmit poll work at stop() callback Luis R. Rodriguez
2009-07-26  9:48   ` Luis R. Rodriguez
2009-07-25  0:50 ` [PATCH] mac80211/drivers: add new mac80211 workqueue API Luis R. Rodriguez

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=43e72e890907260106h1ad9cdd6i9dc22e3bfece86d8@mail.gmail.com \
    --to=lrodriguez@atheros.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=buytenh@marvell.com \
    --cc=chunkeey@web.de \
    --cc=dcbw@redhat.com \
    --cc=ddrake@brontes3d.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=reinette.chatre@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox