I've been doing more SMP cleanup and for the life of me I can't figure
    out why cpl operations are surrounded by its own [S]CPL_LOCK ??

    As far as I can tell, the cpl is only accessed/modified:

        * by mainline code while the MP lock is held 
        * by an interrupt while the MP lock is held

    Since any modification of the cpl within an interrupt is paired and
    thus from the point of view of mainline code the cpl does not change
    at all (i.e. s = splvm(); ... splx(s);), I don't see why the cpl needs 
    to be locked at all.  We shouldn't even need to use a 'lock' prefix.

    Now, I understand that we eventually want to get out from under the MP
    lock's thumb, but it needs to be pointed out that the cpl mechanism
    itself is likely to be depreciated in favor of something more 
    thread-friendly.  I don't see any point in trying to make the cpl
    operate independantly of the MP lock at this time.

    Does anyone know why all the locking was added to the cpl code?

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to