mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: "Luis R. Rodriguez" <mcgrof@frijolero.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	lf_driver_backport@lists.linux-foundation.org,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andre Guedes <andre.guedes@openbossa.org>
Subject: Re: [Lf_driver_backport] [PATCH 2/4] compat: backport work_busy()
Date: Tue, 20 Mar 2012 10:29:33 -0400	[thread overview]
Message-ID: <CAJdJm_MD1QQG3hyQmo-RffeObGBSViLAOBZeyRJqoEbh0x2PMA@mail.gmail.com> (raw)
In-Reply-To: <CAB=NE6V4NuNc8Xr3qKAaXgs2og-2e6qusek=ZFdvQCq4JtKavQ@mail.gmail.com>

Hi Luiz,

[I'm subscribed only to lf_driver_backport]

On Tue, Mar 20, 2012 at 9:50 AM, Luis R. Rodriguez <mcgrof@frijolero.org> wrote:
> On Tue, Mar 20, 2012 at 5:07 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
>> On Mon, 2012-03-19 at 20:26 -0700, Luis R. Rodriguez wrote:
>>> From: "Luis R. Rodriguez" <mcgrof@frijolero.org>
>>>
>>> Best we can do is just tell the users of we are WORK_BUSY_PENDING
>>> for older kernels. The ckmake log:
>>
>> [...]
>>
>>> + * Test whether @work is currently pending or running.  There is no
>>> + * synchronization around this function and the test result is
>>> + * unreliable and only useful as advisory hints or for debugging.
>>> + * Especially for reentrant wqs, the pending state might hide the
>>> + * running state.
>>
>> What's this needed for? It seems if it's used only for hints/debugging
>> we should not need the function, or possibly simply return some
>> pointless combination like -1?
>
> net/bluetooth/hci_core.c:1701:  if (work_busy(&hdev->le_scan))

Did you consider making this change bluetooth specific (e.g. under
patches/16-bluetooth.patch with LINUX_VERSION_CODE check) so that
work_pending() is used on this location for older kernels? Or are
there other users for work_busy() besides bluetooth?

I talked with the author of this code (CC'd) and he said it should be
safe to make this replacement.

Another change I made sometime ago (specifically to bluetooth code)
for it to build with older kenels (2.6.32 in my case), was to change
this line in net/bluetooth/hci_core.c:

queue_work(system_long_wq, &hdev->le_scan);

to:

schedule_work(&hdev->le_scan);

Again, I checked with the original author and we believe it is okay to
do this (I also lightly tested these changes).

Hope that helps. Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

  reply	other threads:[~2012-03-20 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20  3:26 [PATCH 0/4] compat: March 19 backport work Luis R. Rodriguez
2012-03-20  3:26 ` [PATCH 1/4] compat: backport system work queues system_wq and system_long_wq Luis R. Rodriguez
2012-03-20  3:26 ` [PATCH 2/4] compat: backport work_busy() Luis R. Rodriguez
2012-03-20 12:07   ` Johannes Berg
2012-03-20 13:50     ` Luis R. Rodriguez
2012-03-20 14:29       ` Anderson Lizardo [this message]
2012-03-20 14:30         ` [Lf_driver_backport] " Anderson Lizardo
2012-03-20  3:27 ` [PATCH 3/4] compat: fix load time issue with kfifo backport Luis R. Rodriguez
2012-03-20  3:27 ` [PATCH 4/4] compat: add some tracing backport work Luis R. Rodriguez
2012-03-20 12:11   ` Johannes Berg
2012-03-20 12:16   ` Johannes Berg
2012-03-20 13:53     ` Luis R. Rodriguez
2012-03-22  4:29       ` Luis R. Rodriguez
2012-03-26  8:49         ` Johannes Berg
2012-03-26 12:58           ` Luis R. Rodriguez
2012-03-28 10:00             ` Luis R. Rodriguez
2012-04-05 12:33               ` Johannes Berg

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=CAJdJm_MD1QQG3hyQmo-RffeObGBSViLAOBZeyRJqoEbh0x2PMA@mail.gmail.com \
    --to=anderson.lizardo@openbossa.org \
    --cc=andre.guedes@openbossa.org \
    --cc=johannes@sipsolutions.net \
    --cc=lf_driver_backport@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@frijolero.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®