From: Jake H. <jh...@po...> - 2005-02-22 20:49:58
|
Here's a quick heads-up on my kernel progress. Yesterday I integrated Arno's patches and now I can boot in SMP mode on my P4. Whoohoo! The bad news is that I'm still getting random lockups every now and then, but that's been happening for a while, SMP or no. My next check-in will be Arno's patches plus commenting out the microsecond timer code and the beginnings of the C99 stuff. I'm pulling in the C99 code one file at a time so that I can figure out which one is causing the early crash. The size of the diffs wasn't as big as I was afraid of, so I'll probably check in all the rest of the C99/typesafety patches in one step, after I verify that I can rebuild all the drivers and filesystems, as well as libsyllable and the appserver and run them w/o any problems or crashes. There is still one problem with GCC 3.4.3 which is that it occasionally generates code which requires memcpy(), which is only available as an inline function in kernel land. If you don't add "-ffreestanding" then it sometimes also requires strcpy(). This didn't affect any of the filesystems and only affected one driver (emu10k1) so I just added a "gcc34_memcpy.c" file to that build like I did for the kernel. But the -ffreestanding flag is supposed to prevent this kind of code from being generated so I would like to know whether it's a bug in GCC itself or in our port specifically. In other news: two links I found interesting. First, I started reading an O'Reilly book on unit testing and it mentioned this clever example of a unit testing framework for C programs in just three lines of code: http://www.jera.com/techinfo/jtns/jtn002.html So I am going to start writing some unit tests for the kernel that could be optionally compiled to run while the kernel is booting to test the various features. I'm also going to add a kassertp() macro to panic if the assertion fails, as kassertw() just gives a warning and continues, which may not be a good idea if the assertion failure indicates some sort of data structure corruption. The other link I found was to an interesting project called NetKernel, which is a microkernel developed for running web services. There may be one or two concepts that we could integrate into Syllable, for example using URIs to address software components: http://www.1060research.com/netkernel/ -Jake |
From: Kristian V. D. V. <va...@li...> - 2005-02-22 22:14:31
|
On Tuesday 22 February 2005 20:49, Jake Hamby wrote: > Here's a quick heads-up on my kernel progress. Yesterday I integrated > Arno's patches and now I can boot in SMP mode on my P4. Whoohoo! The > bad news is that I'm still getting random lockups every now and then, > but that's been happening for a while, SMP or no. Cool :) The lockups seemed to be worse with the syncronisation primitives removed but it's hard to tell. Obviously we should be aiming for no know lock ups no matter what is currently causing them, though! > My next check-in will be Arno's patches plus commenting out the > microsecond timer code and the beginnings of the C99 stuff. I'm pulling > in the C99 code one file at a time so that I can figure out which one is > causing the early crash. The size of the diffs wasn't as big as I was > afraid of, so I'll probably check in all the rest of the C99/typesafety > patches in one step, after I verify that I can rebuild all the drivers > and filesystems, as well as libsyllable and the appserver and run them > w/o any problems or crashes. I'd like to hold off on the C99 changes until after 0.5.6, if possible. It's probably best to avoid too many changes all at once, as it may make life difficult for us if we need to track down any remaining SMP or lockup bugs. To the best of my knowledge the appserver currently doesn't build with Gcc 3.4.3 by the way, although Henrik may have found & fixed this by now. > There is still one problem with GCC 3.4.3 which is that it occasionally > generates code which requires memcpy(), which is only available as an > inline function in kernel land. If you don't add "-ffreestanding" then > it sometimes also requires strcpy(). We should modify Gcc 3.4 so that -kernel implies -ffreestanding > This didn't affect any of the > filesystems and only affected one driver (emu10k1) so I just added a > "gcc34_memcpy.c" file to that build like I did for the kernel. But the > -ffreestanding flag is supposed to prevent this kind of code from being > generated so I would like to know whether it's a bug in GCC itself or in > our port specifically. There is nothing about the Gcc port for Syllable that would affect this. Our port just adds configuration files so Gcc builds correctly, but no source files are patched. I had heard of issues with Gcc 3.4 so perhaps it is a bug; it may be worth searching GNATS for Gcc? > So I am going to start writing some unit tests for the kernel that could > be optionally compiled to run while the kernel is booting to test the > various features. I'm also going to add a kassertp() macro to panic if > the assertion fails, as kassertw() just gives a warning and continues, > which may not be a good idea if the assertion failure indicates some > sort of data structure corruption. Sounds like an excelent idea to me. kassertp() is probably long overdue, too. -- Vanders (If this email makes it through..) http://www.syllable.org http://www.liqwyd.com |
From: Saem G. <sae...@gm...> - 2005-02-23 07:40:36
|
On Tue, 22 Feb 2005 12:49:21 -0800, Jake Hamby <jh...@po...> wrote: > The other link I found was to an interesting project called NetKernel, > which is a microkernel developed for running web services. There may be > one or two concepts that we could integrate into Syllable, for example > using URIs to address software components: > > http://www.1060research.com/netkernel/ > > -Jake IIRC, zeroinstall does something like this for package management. It makes a lot of sense actually, furthermore, I posted a while back on the Syllable forums about zero-install, I was told that there were plans to either port it or bring something very similliar in to the mix for Syllable. |
From: Brent P. N. <me...@ot...> - 2005-03-03 22:38:24
|
Quoting Jake Hamby <jh...@po...>: > So I am going to start writing some unit tests for the kernel that could > be optionally compiled to run while the kernel is booting to test the > various features. YAAAAAAAY! ::Brent dances in the streets:: I'm a big believer in unit testing. I'm thrilled to see it being implemented here. This could make our lives much, much easier. -- Brent P. Newhall http://brent.other-space.com/ ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |