All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-modules <linux-modules@vger.kernel.org>, david.spinadel@intel.com
Subject: Re: [PATCH] modprobe: don't check refcount with remove command
Date: Fri, 03 May 2013 08:32:43 +0200	[thread overview]
Message-ID: <1367562763.9430.3.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAMOw1v7cpGCxWKOstCf-h6mMVe9Op18BU-E_nvR4FnKmedrHgA@mail.gmail.com> (sfid-20130503_044803_937283_B0C7BBD1)

Hi Lucas,

> Thanks, patch has been applied.

Thanks.

> However.... I'd like to strongly advise not to use install/remove
> commands for simple dependencies like this. It's much simpler and
> faster both for kmod and for who is configuring to use softdeps. Your
> example could be very well replace with the single line below:
> 
> softdep fred pre: barney

Yes, however, I was just copying the man page example for illustration
purposes.

> I think we need a better explanation on man page and even remove this
> example from there. Install/remove commands are only there because of
> the legacy stuff that would stop working otherwise.

Makes sense. However, the use case we have for this is slightly
different, and not a simple dependency -- we have a bit of a reverse
dependency tree:

 modA1 and modA2 depend on modB

However, modB contains the driver struct, so modB is loaded first
automatically and pulls in either modA1 or modA2 depending on some other
information that can't be encoded in direct dependencies. Then, after
having loaded modB, you can't unload modB any more, and David noticed
that a configuration like

remove modB /sbin/rmmod modA1 modA2 modB

(actually it's a bit more complicated, but for no good reason I think)
no longer worked.

johannes


      reply	other threads:[~2013-05-03  6:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367501008-10459-1-git-send-email-johannes@sipsolutions.net>
2013-05-03  2:47 ` [PATCH] modprobe: don't check refcount with remove command Lucas De Marchi
2013-05-03  6:32   ` Johannes Berg [this message]

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=1367562763.9430.3.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=david.spinadel@intel.com \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    /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.