Re: a little bit of c++ in kernel [module]
On Wed, Feb 11, 2009 at 8:25 AM, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2009 22:43 Aniruddha Bohra said the following: You can see Click: http://read.cs.ucla.edu/click/ It does not run on FreeBSD 4. I have an old diff which builds on the work by Marko Zec and Bruce Simpson, that allows me to load the click module. http://www.cs.rutgers.edu/~bohra/click-1.5.0.diff 1. options -fpermissive -fno-exceptions -fno-rtti are passed to c++ compiler 2. there are new/delete implementations that use kernel malloc I think that #1 means that there are no exceptions, (non-trivial) dynamic_cast and typeid for kernel c++ code. Correct. 1. do you use any global/static objects with constructors? did you have to write any code to call on those constructors when the module is loaded? Not sure about this one. But AFAIK, there are no global static objects with constructors in Click code. There is one router object that is always initialized and it is updated by writing to the clickfs file system. The other objects are created with new. 2. did you have to write any other run-time support code or platform glue code (besides new/delete)? Apart from the new and delete, I think the other things were the pseudofs code to initialize the file system, the locks in include/click/sync.hh, the glue code in atomic.hh. 3. I assume virtual inheritance can be used in kernel code? do you use it? Yes. For example, all objects inherit from Element and that defines virtual functions. (include/click/element.hh) Hope this helps. Aniruddha ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: a little bit of c++ in kernel [module]
You can see Click: http://read.cs.ucla.edu/click/ It does not run on FreeBSD 4. I have an old diff which builds on the work by Marko Zec and Bruce Simpson, that allows me to load the click module. http://www.cs.rutgers.edu/~bohra/click-1.5.0.diff Hope this helps Aniruddha ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: VMWARE GSX Port?
On Thu, 2006-03-02 at 13:28 -0800, Kip Macy wrote: -CURRENT runs on 3.0 as a domU. There is partial dom0 support. The changes have not gone back into the mainline because xenbus is extremely difficult to integrate cleanly. You can check on the state of the xen3 branch in perforce. At several places the difficulties are mentioned. Is there some place that these are listed or discussed in more detail? Thanks Aniruddha ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Van Jacobson's network stack restructure
Greg 'groggy' Lehey wrote: Last week, at the Linux.conf.au in Dunedin, Van Jacobson presented some slides about work he has been doing rearchitecting the Linux network stack. He claims to have reduced the CPU usage by 80% and doubled network throughput (he expects more, but it was limited by memory bandwidth). The approach looks like it would work on FreeBSD as well. I spoke to him and he confirmed. Comments? The approach there is very similar to Lazy Receiver Processing. More details are available here : http://www.cs.rice.edu/CS/Systems/LRP/ http://www.cs.rice.edu/CS/Systems/ScalaServer/code/rescon-lrp/README.html Maybe people want to look at that as well. Aniruddha ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: suggestions ?
i was thinking about implementing Robust TCP/IP connections .. but somebody told me that is not very consistent , and i think so also , Did you consider fault-tolerant TCP/IP connections to multiple servers? See these : This one is heavy-weight, whole process wrapping etc. Also the implementation is on Linux. Engineering fault-tolerant TCP/IP servers using FT-TCP. D. Zagorodnov, K. Marzullo, L. Alvisi, and T.C. Bressoud. In Proc. IEEE Intl. Conf. on Dependable Systems and Networks (DSN), http://www.cs.ucsd.edu/~dzagorod/research/pubs/zagorodnov_et_al-fttcp-dsn03.pdf This one is lightweight(in place logging), works for TCP/IP and for pipes and the implementation is on FreeBSD. Service Continuations: An Operating System Mechanism for Dynamic Migration of Internet Service Sessions. F. Sultan, A. Bohra, L. Iftode. The 22nd Symposium on Reliable Distributed Systems (SRDS), October 2003. http://discolab.rutgers.edu/sc/srds03.ps Cheers Aniruddha This would make it very easy to implement fault-tolerant systems with FreeBSD if the communication is TCP/IP based. Erich ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: suggestions ?
Hello, I see what you mean , you are talking at higher level , when i mentioned Robust TCP/IP i meant TCP connections in the kernel network stack level , the architecture you are talking about is like a middle ware handeling all TCP/IP connections for a client to multiple servers. the mechanism is something like buffereing data in the network stack as prevention for eventual connection problem , when that problem happens and is detected , the Net. stack will try to reconnect ( while buffering the user data ) , once the connection is reistablished the buffered data will be sent and the user wont notice nothing ( if the outage time is not huge of course ). that may sounds stupid , but that's what i'm thinking about. The links that I sent earlier do exactly that. However there are two basic problems : 1) Synchronization of the stream This problem arises if there is a reconnection, you do not know where the stream was cut (disconnect) at both the client and the server. If the client receives a byte of data, and ACKs it, the server discards the buffer transparent to the application. In order to keep the stream consistent, you need to copy every byte sent on the connection and synchronize on reconnect. This kills performance. FT-TCP linked in the previous mail takes this approach. There are others e.g. TESLA[4], ROCKS[5] etc. that provide user level logging to create consistent socket streams. Another approach is to modify the server and keep a log in the kernel (not discard the socket buffer until the application asks you to). This requires modifications to the server but is low overhead, since there is no extra copy and migration is lightweight. Service Continuations[1], and M-TCP[3] take this approach. You can find more details from http://discolab.rutgers.edu/sc. 2) Fault-tolerance : If by fault tolerance you mean a machine crash, then recovering state is not possible by traditional means. We do that (in a separate paper) by using a programmable NIC (Myrinet) to remotely read the memory of the machine. This allows us to recover connections from a dead machine (OS crash) [2] (http://discolab.rutgers.edu/bda). If you mean network level, then TCP provides that, unless you want geographical separation, in which case, the client TCP must be modified to route packets to the alternate route. This is again used in Service Continuations and M-TCP[3]. I hope this helps. Cheers Aniruddha [1]Service Continuations: An Operating System Mechanism for Dynamic Migration of Internet Service Sessions. F. Sultan, A. Bohra, L. Iftode. http://discolab.rutgers.edu/sc/srds03.ps [2]System Support for Nonintrusive Failure Detection and Recovery using Backdoors. F. Sultan, A. Bohra, P. Gallard, I. Neamtiu, S. Smaldone, Y. Pan, and L. Iftode. http://discolab.rutgers.edu/bda/remrecov04.pdf [3] Migratory TCP: Highly Available Internet Services Using Connection Migration. Florin Sultan, Kiran Srinivasan, Deepa Iyer, Liviu Iftode. http://discolab.rutgers.edu/mtcp/dcs-tr-462.ps [4] TESLA : http://nms.lcs.mit.edu/projects/migrate/ [5]ROCKS: http://www.cs.wisc.edu/~zandy/rocks/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: suggestions ?
I'll get my self informed by reading those papers then i'll have some comments and questions if you dont mind. Questions are always welcome although ,i want to know , when you said If you mean network level, then TCP provides that, maybe you are talking about timeouts in TCP/IP ? TCP retransmits data that it thinks is not delivered. If there is a network problem downstream (not at the end hosts), and you try to reconnect, you may end up in the same situation as trying to retransmit. Overlay networks try to route around network problems to provide alternative paths. But that again is a whole list of references ;) Cheers Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [call for helpers!] Tuning for the Beaver Challenge
Hello, The one setting that I do suggest you keep is: kern.ipc.somaxconn=512 (128 may be too low for http testing) In our experience with Apache and clients that do not use Keep Alive (are short lived), 512 is also very low. It causes listen queue overflows and leads to a very low throughput. Another place that we had to look at was the IP sw interrupt queue length. # IP sw interrupt queue len, default 50; # check queue drops stats in net.inet.ip.intr_queue_drops net.inet.ip.intr_queue_maxlen=1000 Hope this helps Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
RFC 1892 - serial arithmetic
Hello, I was wondering if there is a standard header file that implements the RFC 1982 ? It basically defines serial numbers and the arithmetic operations on them. All it does is : s' = (s + n) modulo (2 ^ SERIAL_BITS) i1 is the arithmetic integer whose value is the same as s1, and i2 has the same value as i2 s1 is said to be less than s2 if, and only if, s1 is not equal to s2, and (i1 i2 and i2 - i1 2^(SERIAL_BITS - 1)) or (i1 i2 and i1 - i2 2^(SERIAL_BITS - 1)) s1 is said to be greater than s2 if, and only if, s1 is not equal to s2, and (i1 i2 and i2 - i1 2^(SERIAL_BITS - 1)) or (i1 i2 and i1 - i2 2^(SERIAL_BITS - 1)) I am currently using these as my local defns but would like to use a standard header if possible. Thanks Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Per CPU region of memory
Hello, I am writing a loadable kernel module where I need a per-cpu region of wired memory. The module should work for -current and -stable. How can I get such a region of memory? Any docs or pointers would be great. Thanks Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Subscription to n lists
Somebody is again subscribing hackers to several lists.. Again a disgruntled member maybe ... Is there any way to stop this ? Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some mmap observations compared to Linux 2.6/OpenBSD
As always, you're seeing the lack of available committer time, not a real lack of interest. One way to accelerate the process might be for someone (not necessarily you, any reader of this mailing list could do it) to show that this change visibly benefits some easy to run benchmark. Some simple setup of apachebench vs thttpd (which uses sendfile, afaik) would be useful for this purpose. I think he said in the mail that they are setting a record for SPEC Web benchmarking numbers. I think it is a very visible and referred to benchmark as far as web servers go, and it would be (800/600) as compared to the best linux webserver. I think it is proof enough. Would be fun to have the best SPEC number from FreeBSD and a university and not Linux and some industrial giant :) Thanks Aniruddha ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]