From: Dave Jones <davej@redhat.com>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Dave Jones <davej@codemonkey.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: agpgart.ko can't be unloaded
Date: Thu, 15 Dec 2005 15:52:21 -0500 [thread overview]
Message-ID: <20051215205221.GG19354@redhat.com> (raw)
In-Reply-To: <m3acf2i05d.fsf@defiant.localdomain>
On Thu, Dec 15, 2005 at 09:19:10PM +0100, Krzysztof Halasa wrote:
> Hi,
>
> I recently noticed that agpgart.ko (and corresponding hardware driver)
> can't be unloaded:
>
> Module Size Used by
> intel_agp 19228 1
> agpgart 27592 1 intel_agp
>
> The same is true for via_agp and probably for all other drivers.
>
> The problem is agpgart increases reference count of hw driver
> to prevent it from being unloaded, and the hw driver references
> agpgart so agpgart can't be unloaded either.
>
> Should agpgart be split into 2 parts, one (which would have to be unloaded
> first) managing the thing and the other - the library referenced by
> hw drivers?
the reference on the chipset driver should only be bumped when
/dev/agpgart is open()'d, but currently that isn't the case.
> I wouldn't write about this but there is code to unload them so I think
> it's not intentional.
The reference counting has been horked since the 'new' module loader
appeared[*], and never got fixed as I've nearly always found something
more important to work on, and it's not really a problem for 99%
of users. If someone found the time to write a patch to make it do the
right thing though, I'd be happy to merge it as long as it's done
correctly.
Dave
[*] In fact, my first attempt at fixing it way back then may have
even made the problem worse.
next prev parent reply other threads:[~2005-12-15 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 20:19 agpgart.ko can't be unloaded Krzysztof Halasa
2005-12-15 20:38 ` Krzysztof Halasa
2005-12-17 1:31 ` Rusty Russell
2005-12-17 15:16 ` Krzysztof Halasa
2005-12-15 20:52 ` Dave Jones [this message]
2005-12-15 22:58 ` Krzysztof Halasa
2005-12-16 22:28 ` Jan Engelhardt
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=20051215205221.GG19354@redhat.com \
--to=davej@redhat.com \
--cc=davej@codemonkey.org.uk \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.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