[lkml]   [2002]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: simple handling of module removals Re: [OKS] Module removal
On Wednesday 03 July 2002 05:48, Pavel Machek wrote:
> Hi!
> Okay. So we want modules and want them unload. And we want it bugfree.
> So... then its okay if module unload is *slow*, right?
> I believe you can just freeze_processes(), unload module [now its
> safe, you *know* noone is using that module, because all processes are
> in your refrigerator], thaw_processes().
> That's going to take *lot* of time, but should be very simple and very
> effective.

Hi Pavel,

Is it just the mod_dec_use_count; return/unload race we're worried about?
I'm not clear on why this is hard. I'd think it would be sufficient just to
walk all runnable processes to ensure none has an execution address inside the
module. For smp, an ipi would pick up the current process on each cpu.

At this point the use count must be zero and the module deregistered, so all
we're interested in is that every process that dec'ed the module's use count
has succeeded in executing its way out of the module. If not, we try again
later, or if we're impatient, also bump any processes still inside the module
to the front of the run queue.

I'm sure I must have missed something.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.080 / U:10.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site