Date: Mon, 27 Jul 1998 11:36:05 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: current@FreeBSD.ORG Subject: Re: SMP kernels... how many processes can be in ? Message-ID: <Pine.BSF.3.95.980727111155.5892E-100000@current1.whistle.com> In-Reply-To: <199807271345.PAA04072@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 27 Jul 1998, Luigi Rizzo wrote: > Hi, > > I am about to do some minor modifications to the dummynet code and, for > technical reasons (don't want to change interfaces to widely used > kernel functions) need to keep some state to be passed between > functions in a static variable. > > Something similar is already done in the ipfw package using the > DIVERT option. Now my doubt is, on a multiprocessor machine, could > it happen that multiple instances of the code in /sys/netinet are > run, in which case i should also have multiple instances of such > variables where i pass state ? In fine-graned SMP it breaks, however the 'chunkiness' of the present SMP means that only one processor is in the networking stacks at a time.. now I've been thinking about how to fix this... 1/ Some extra flags in the header mbuf. 2/ sticking some 'MT_RIGHTS' or 'MT_CONTROL' mbufs can be added on the head or end of the packet, and used to hold this info. (encoded like tcp options.. 1 byte type, 1 byte len, data.) the hack would be to put code that 'unpacks' this info on entry to ip_input and ip_output. (and tcp_input) Normal data flow woudl be the same if the lead type or flags did not indicate the existance of these modifiers.. I would include a 'flow' as one of the modifiers. julian > > luigi > -----------------------------+-------------------------------------- > Luigi Rizzo | Dip. di Ingegneria dell'Informazione > email: luigi@iet.unipi.it | Universita' di Pisa > tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) > fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ > _____________________________|______________________________________ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980727111155.5892E-100000>