Karim Belabas on Thu, 11 Dec 1997 15:16:18 +0100


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

Re: src/kernel


Louis Granboulan wrote:
> I am beginning a big reorganisation of the directory src/kernel.
> The way its files are included is really ugly, and it is not
> coherent with chapter 5 of the user manual.

  This chapter has not been rewritten for the alpha. I have changed some
small things since then (prototype for gpuigs was wrong, removed mant and
setmant). I was planning to include these in the new update, but I can send
you the new version before you make any changes.

> Here is what I am planning to do :
> [...]
> The goal is to have a clear view of what should be done to add
> assembly code for a new architecture.

All of this is very sensible. Thanks for doing it!

> The problem is that I may break the code for M68k (I will try to check my
> changes, but I cannot test pari/gp on a Sun3 since version 1.916). If one
> of you still has a Sun3 running, that will help.

  mp.s is a BIG problem (not even mentioning the Mac or Amiga versions...).
1) It might already be broken due to my pere <--> CLONEBIT changes (that has
GP 2.0 perform orders of magnitudes faster on array manipulations than GP
1.39).

2) Some functions in it ARE broken since most bugs that were discovered in
the recent years have not been corrected in there. I think I removed all
offending functions from the kernel (like cgiv, gerepile) but I might have
overlooked something. And there are still some doubtful spots.

3) All constants are hardcoded, no macro is taken into account. If some are
changed, we get a catastrophe (hence the OLD_CODES hack in gencom.h for
instance).

4) Some functions in it are not up to date. No fast multiplication for
instance! Whereas standard mulii implements Karatsuba, and mulrr/mulir soon
will.


  I think that we should remove completely this 680x0 specificity: the 680x0
kernel should be turned into a micro kernel as for all other architectures
(which just means removing most functions from the kernel). 

  The general structure would be much simpler, and it would me much easier to
maintain. I think the very fact that we have problems finding machines to
test it on means that it's not worth the trouble. Besides I'm not sure we
would lose that much performance on 680x0 machines in doing that (we would
keep a micro kernel of course!).

What do you think ?

Karim.
--
Karim Belabas                          e-mail:
Max-Planck-Institut fuer Mathematik       karim@mpim-bonn.mpg.de
Gottfried-Claren-Str. 26               tel:
53225 Bonn (Germany)                      (00 49 228) 402-245