DragonFly BSD
DragonFly commits List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Mar 2004 08:53:44 -0800 (PST)

: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@xxxxxxxxxxxxx>



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