cvs commit: src/sys/kern kern_mpipe.c kern_sysctl.c

Matthew Dillon dillon at apollo.backplane.com
Mon Mar 29 08:54:35 PST 2004


:Nope, this is a different patch. You might have a look at it, it is an SMP
:safe version of the current code with the allocation API of your code w/o
:the support for a destructor. I still don't like the destructor, since I
:can't think of any real use. The option to disable zeroing is fine, e.g.
:for mbufs which will be overriden anyway. The code needs some more
:tweaking anyway and some further extensions, but should work.
:
:Joerg

    Interesting.  That's certainly one solution.  I'm using an array of
    pointers instead of a queue in the new code, and I think that's what
    we want to do generally.  It would be extendable to an SMP-safe 
    interface in much the same way (an array of pointers to fixed arrays
    rather then an array of tailqs as you had).

    I had realized that since MPIPE needs to be able to guarentee some
    sort of minimum, one might as well throw that minimum into an array
    of pointers rather then a queue and get rid of all the pointer field
    manipulation.

    I don't think I'd implement the global_* variables, though, and we
    still have to solve the cpu balancing problems... not an impossible
    task, but I'm annoyed that I haven't thought up a perfect algorithm
    for it.  I don't think you want to use a token-based lock.  I really
    think the best solution is to use an IPI message of some sort
    between cpus (besides, that's what mpipe_token would wind up doing
    anyway).

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list