CALL TO COMMITTERS! HELPING WITH SPL REMOVAL!

Matthew Dillon dillon at apollo.backplane.com
Thu Jun 2 10:11:32 PDT 2005


    Ok, I spoke too soon.  There are over 500 files still using SPLs.

    In order to get this done in a reasonable length of time I would like
    to call on those committers with a few hours to burn to help me 
    remove SPLs!  To reduce overheads, I am only asking for people with a
    commit bit here, because in this case it's almost as much effort to
    make the changes as it would be to review a patch submission!

    Basically, SPL operations have to be replaced by critical section
    operations.  So, for example, code that does this:

	s = splblah(); 
	...
	splx(s);

    would become:

	[add #include <sys/thread2.h> if necessary]

	[remove the 'int s' declaration]
	crit_enter();
	...
	crit_exit();

    There are a few cases where SPLs are assymetric, such as this:

	s = splblah1();
	splblah2();
	...
	splx(s);

    SPLs can do that, critical sections cannot.  Critical sections must
    properly match up a crit_enter() to a crit_exit().  so that would become:
	
	crit_enter();
	...
	crit_exit();

    Critical sections CAN be nested, and CAN be held across a blocking 
    condition.

    Committers wishing to help out should email me and I will assign you a
    directory in /usr/src/sys.  Work on that directory, make sure your kernel
    still compiles and runs, then commit the work and I'll review it 
    from the commit message and do any followup commits if necessary.

    Originally I wanted to keep SPLs intact so I could tell which parts of
    the kernel need more involved SMP work, but frankly they are now just 
    getting in the way and they need to be replaced with critical sections.

						Thanks!

						-Matt






More information about the Kernel mailing list