tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modules loading modules?

On Tue, 3 Aug 2010, haad wrote:

Well, still no hurry, but it would be nice if some additional eyes were pointed this way. I've got the recursive-module-load test case added
to the existing tests/modules/ stuff (and it works)!

BTW, since this is changing the kernel ABI, I guess it will need a version bump. Do we have any other bumps coming soon that we can "share"?

I talked with Andrew today and he said that basicaly we can use
mutex_owned for this particular case. That should make your code much
simpler :) sorry for any additional work :)

Well, we've come full circle!  :)

It seems to me that, even if it is "OK to use mutex_owned() for this particular case", perhaps we should not. Most everyone seemed to agree that your condvar solution was "technically correct", and if we did use the mutex_owned() solution it would only serve as a temptation for someone else in the future!

We now have two solutions, both of which actually work (tested on my home machine). One solution (mutex_owned) might be slightly simpler and slightly more efficient than the other (condvar), but this section of code is certainly not performance-critical. Therefore, is there any reason for preferring the mutex_owned solution?

I'm happy to go either way based on concensus here, but I'm leaning towards the condvar solution. It doesn't require any "exemptions" or long explanations of why it is "OK to use mutex_owned" in ways that would appear to violate our own documentation. And it also addresses eeh's (and mrg's) concerns of keeping the lock across potentially long-duration operations.

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index