[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Norm Dresner" <ndrez@att.net>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Norm Dresner" <ndrez@att.net>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Fri, 1 Jun 2001 06:46:37 +0200 (CEST)
>From owner-rtl Thu May 31 15:12:57 2001
Received: from mtiwmhc22.worldnet.att.net (mtiwmhc22.worldnet.att.net [204.127.131.47])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4VLCus11533
for <rtl@fsmlabs.com>; Thu, 31 May 2001 15:12:56 -0600
Received: from thedm ([12.79.104.22]) by mtiwmhc22.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010531210739.YXHM29100.mtiwmhc22.worldnet.att.net@thedm>;
Thu, 31 May 2001 21:07:39 +0000
Message-ID: <016401c0ea15$7b944020$0600a8c0@compumagic>
From: "Norm Dresner" <ndrez@att.net>
To: <rtl@fsmlabs.com>
Cc: <EstabridisJP@navair.navy.mil>
References: <0560141A7916D211A64A00A0C9C9A81501949BBF@nwms15.chinalake.navy.mil>
Subject: Re: [rtl] Can't Unload Modules - "in use"
Date: Thu, 31 May 2001 17:05:54 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Janet,
Here's the output from the lsmod command on my system here:
Module Size Used by
lvi 13036 0
rtl_sched 40936 0 (lvi)
rtl_time 10164 0 [rtl_sched]
rtl 25984 0 [rtl_sched rtl_time]
The "only" order that will work is
rmmod lvi # depends on nothing
rmmod rtl_time # depends on nothing
rmmod rtl_sched # was used by rtl_time
rmmod rtl # finally unused
BUT... The counts under used-column show the usage count as reflected by
MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT (if you use them). If these aren't
zero, you can't remove the module. If you don't use them, IIRC, they should
always be zero. In all of my drivers that use the MOD_xxx_USE_COUNT
mechanism for counting usage, I provide an ioctl-mechanism for setting the
USE_COUNT to zero regardless of what's actually going on. This is -- of
course -- a last-resort trick, but it does allow me to remove modules which
didn't get to DEC_ because a user-program terminated with extreme prejudice
and never closed the open device(s).
That's the extent of what I know about it. You might find more in Rubini
and you'll find a lot in the kernel source code (a court of last resort
IMHO);
Norman Dresner
Fellow Systems Engineer &(SGI) Advanced Signal Processing Laboratory
Administrator
Radar Systems Engineering Department
Electronic Systems and Sensors Segment
Northrop Grumman Corporation
Baltimore-Washington International Airport
7323 Aviation Boulevard
Baltimore Maryland 21240
Voice: (410) 993 - 2096 Mornings; all-day voice-mail
(410) 969 - 8068 Afternoons with answering machine
FAX: (410) 993 - 8084 On-site
(410) 969 - 8068 Afternoons; call first to arrange
E-Mail: Mornings: mailto:Norman_A_Dresner@mail.Northgrum.com
Afternoons: mailto:ndrez@att.net
----- Original Message -----
From: Estabridis, Janet P <EstabridisJP@navair.navy.mil>
To: <rtl@fsmlabs.com>
Sent: Thursday, May 31, 2001 10:28 AM
Subject: [rtl] Can't Unload Modules - "in use"
> Hi,
> Sorry I am not at my machine to get the exact message and I haven't gotten
> to check the archives, but I figure someone can steer me in the correct
> direction.
>
> I am using RTLV2.3 with kernel 2.2.14
>
>
> I have four modules, three of them just contain routines that the main
> modules calls.
>
> bit.o
> vig.o
> tspi.o
> rt_main.o
>
> When I try and remove the modules with "rmmod" I get that it can't be
> removed because the modules are in use. I use "lsmod" and try and remove
> them in the correct order, but still it won't let me remove any of them.
I
> have to re-boot.
>
> So, the big question is - What am I doing wrong ? Do my modules that only
> have routines need to have "init_module" and "cleanup_module" ?
> Do I need to use the linker to create one big "rt_main.o" ? I tried that
> but got some errors.
>
> Thanks in advance =
> Janet Estabridis
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>