[lkml]   [1997]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Module unloading (was modutils-970118 problem)

> Ok, it seems there are irritating side effects of the MOD_USED_ONCE
> bits in the recent modules code.
> What I want most of all is for things not to fail mysteriously for
> L. User -- which is why I think that the used once hack is still a
> good one. But what about everyone else that just gets irritated?

One side effect of MOD_USED_ONCE might be that we will be hiding
races by making them very rare, but not eliminate them completely.

For example:

1. Some code uses the module without MOD_INC_USE_COUNT and goes
to sleep.

2. kerneld wants to unload the module, but MOD_USED_ONCE entered
the picture and eliminated the race.

3. We register the module usage and use the module for a while.
At some point, we stop using the module and from now on,
kerneld is free to unload it.

4. Before kerneld managed to unload the module, we want to use it
again. We therefore repeat the cycle starting from step 1, only
this time with MOD_USED_ONCE set, and the original race can now
affect us.


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