From: Andrew Morton <akpm@linux-foundation.org>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Greg KH <greg@kroah.com>,
matthew@wil.cx, kay.sievers@vrfy.org,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/3][-mm] add class_reclassify macro
Date: Mon, 26 May 2008 23:59:34 -0700 [thread overview]
Message-ID: <20080526235934.8a28bfba.akpm@linux-foundation.org> (raw)
In-Reply-To: <a8e1da0805262342g2dec037eqfdf376e66459e758@mail.gmail.com>
On Tue, 27 May 2008 14:42:51 +0800 "Dave Young" <hidave.darkstar@gmail.com> wrote:
> On Wed, May 21, 2008 at 1:21 AM, Greg KH <greg@kroah.com> wrote:
> > On Tue, May 20, 2008 at 03:02:32AM -0700, Andrew Morton wrote:
> >> On Tue, 20 May 2008 17:55:54 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:
> >>
> >> > Converting class semaphore to mutex cause lockdep warnings due to
> >> > class_interface_register/unregister will possible call device_add/del
> >>
> >> Shouldn't we just fix that?
> >
> > Um, no, that's a "feature" that some types of hardware and interfaces
> > require.
> >
> > This is one reason I really don't like this type of conversion, it's
> > causing lots of problems for no known gain.
> >
> > So I would just recommend dropping this patch set, the current "convert
> > class semaphore to a mutex" patch in the -mm tree is already causing
> > lockdep warnings, and trying to do something like this isn't really
> > going to solve the root problem here.
>
> At last, I decide to give up.
>
> Andrew, I could not do more for this issue now, you can drop the
> conversion patch if there's no suitable fix from others.
>
If that semaphore is being used as a mutex then we should convert it to
a mutex (dammit).
Leaving it implemented as a semphore is not the proper way of
suppressing the lockdep warnings. It would be better to convert it to
a mutex then add suitable (and suitably commented) open-coded lockdep
annotations to suppress the runtime warnings.
And afaik that's pretty much what your patch did, except you added that
unpopular macro. If instead of the macro we were to convert that patch
to add open-coded lockdep annotation, what problems remain?
next prev parent reply other threads:[~2008-05-27 6:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 9:55 [PATCH 1/3][-mm] add class_reclassify macro Dave Young
2008-05-20 10:02 ` Andrew Morton
2008-05-20 11:05 ` Dave Young
2008-05-20 17:30 ` Andrew Morton
2008-05-20 17:36 ` Matthew Wilcox
2008-05-20 19:23 ` Andrew Morton
2008-05-21 2:05 ` Dave Young
2008-05-20 11:36 ` Matthew Wilcox
2008-05-20 17:21 ` Greg KH
2008-05-27 6:42 ` Dave Young
2008-05-27 6:59 ` Andrew Morton [this message]
2008-05-27 7:31 ` Dave Young
2008-05-28 15:48 ` Matthew Wilcox
2008-05-28 16:06 ` Greg KH
2008-05-28 16:28 ` Greg KH
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=20080526235934.8a28bfba.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=hidave.darkstar@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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;
as well as URLs for NNTP newsgroup(s).