Changeset 5038


Ignore:
Timestamp:
Aug 26, 2006, 12:50:44 PM (18 years ago)
Author:
Gary Byers
Message:

Updated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/release-notes.txt

    r4872 r5038  
     1OpenMCL 1.1-pre-069826
     2- There's an (alpha-quality, maybe) port to x86-64 Darwin (e.g., the
     3  Mac Pro.)  Some known problems include:
     4 
     5  * infrequently (but not infrequently enough) the lisp dies on
     6    startup with a spurious "Trace/BKPT trap" error message.  This
     7    seems to be timing-dependent and (very generally) seems to
     8    involve the Mach exception thread not recognizing an exception
     9    used to effect exception return.  Sometimes, this shows up
     10    a (:SIGNALED 5) error when REBUILD-CCL runs the lisp to
     11    create a new image.
     12
     13  * some math library primitives (#_asin, for one) generate
     14    spurious incidental FP exceptions that have nothing to
     15    do with the validity of the arguments or result.  To work around
     16    this, the lisp ignores FP exceptions which might have occurred
     17    during a call into the math library; that means that it doesn't
     18    detect -real- FP exceptions when they're signaled.  (This bug
     19    only affects things that call into the system math library;
     20    lisp arithmetic operations that're done inline are not affected.)
     21
     22  * The version of OSX/Darwin that shipped with the Mac Pro is missing
     23    some functionality that from OpenMCL's point of view is highly
     24    desirable (namely, the ability to keep application-level thread-
     25    specific data in a per-thread block of memory addressed by an
     26    otherwise unused segment register.)  To get things working (as
     27    well as they are), the lisp "shares" the segment register that
     28    the pthreads library uses to access thread data.  This scheme
     29    isn't intended to be long-lived (and negatively affects
     30    performance of things like foreign-function calls, callbacks,
     31    and exception handling).
     32 
     33  * The .cdb files (libc only for Tiger) in ccl:darwin-x86-headers64;
     34    were cross-developed on a Linux x86-64 system, since Apple
     35    has not yet released the sources to their x86-64 enabled gcc.
     36
     37- On all platforms, stream code has been rewritten and often offers
     38  better (sometimes substantially better) performance.  OPEN and
     39  MAKE-SOCKET have each been extended to take additional keyword
     40  arguments.
     41
     42  :SHARING, which can have the values :PRIVATE (the default), :LOCK,
     43  or :EXTERNAL (NIL is also accepted as synonym for :EXTERNAL)
     44
     45   :PRIVATE specifies that the stream can only be accessed by
     46   the thread that created it.  (There was some discussion on openmcl-devel
     47   about the idea of "transferring ownership" of a stream; this has
     48   not yet been implemented.)  Attempts to do I/O on a stream with
     49   :PRIVATE sharing from a thread other than the stream's owner yield
     50   an error.
     51
     52   :LOCK specifies that all access to the stream require the calling
     53   thread to obtain a lock; there are separate "read" and "write"
     54   locks for IO streams (so it's possible for one thread to read
     55   from such a stream while another thread writes to it, for instance.)
     56   :LOCK was the implicit default for all streams prior to this change.
     57   (See below - under the discussion of the AUTO-FLUSH mechanism -
     58   for a discussion of one of the implications of this change that
     59   affects SLIME users.)
     60
     61   :EXTERNAL (or NIL) specifies that I/O primitives enforce no
     62   access protocol.  This may be appropriate for some types of application
     63   which can control stream access via application-level protocols.  Note
     64   that since even the act of reading from a stream changes its internal
     65   state (and simultaneous access from multiple threads can therefore
     66   lead to corruption of that state), some care must be taken in the
     67   design of such protocols.
     68
     69  The :BASIC keyword argument influences whether or not the stream
     70  will be an instance of the class FUNDAMENTAL-STREAM (the superclass
     71  from which all Gray stream classes inherit) or a subclass of the
     72  built-in class CCL::BASIC-STREAM.  The default value of :BASIC
     73  is T and this has effect for FILE-STREAMs created via OPEN;
     74  SOCKETs are still always implemented as FUNDAMENTAL (Gray) streams,
     75  though this should change soon.
     76
     77   The tradeoff between FUNDAMENTAL and BASIC streams is entirely
     78   between flexibility and (potential or actual) performance.  I/O
     79   primitives can recognize BASIC-STREAMs and exploit knowledge of
     80   implementation details; FUNDAMENTAL stream classes can be
     81   subclassed in a semi-standard way (the Gray streams protocol.)
     82
     83   For existing stream classes (FILE-STREAMs, SOCKETs, and the
     84   internal CCL::FD-STREAM classes used to implement file streams
     85   and sockets), a lot of code can be shared between the
     86   FUNDAMENTAL and BASIC implementations.  The biggest difference
     87   should be that that code can be reached from I/O primitives
     88   like READ-CHAR without going through some steps that're there
     89   to support generality and extensibility, and skipping those
     90   steps when that support isn't needed can improve I/O performance.
     91
     92   Gray stream methods (STREAM-READ-CHAR) should work on
     93   appropriate BASIC-STREAMs.  (There may still be cases where
     94   such methods are undefined; such cases should be considered
     95   bugs.)  It is not guaranteed that Gray stream methods would
     96   ever be called by I/O primitives to read a character from
     97   a BASIC-STREAM (though there are still cases where this happens.)
     98
     99   A simple loop reading 2M characters from a text file runs about
     100   10X faster when the file is opened the new defaults (:SHARING :PRIVATE
     101   :BASIC T) than it had before these changes were made.  That sounds
     102   good, until one realizes that the "equivalent" C loop can be about
     103   10X faster still ...
     104
     105 - Forcing output to interactive streams.
     106
     107   OpenMCL has long had a (mostly undocumented) mechanism whereby
     108   a mostly idle thread wakes up a few (~3) times per second and
     109   calls FORCE-OUTPUT on specified OUTPUT-STREAMS; this helps to
     110   ensure that streams with which a user would be expected to
     111   interact (the output side of *TERMINAL-IO*, listener windows
     112   in a GUI, etc.) have all buffered output flushed without
     113   requiring application or I/O library code to be concerned about
     114   that.
     115
     116   The SLIME lisp interaction mode for Emacs uses this mechanism,
     117   but the changes described above interfere with SLIMEs use of
     118   it:  in order to be safely accessed from multiple threads (the
     119   SLIME REPL thread and the thread which does the background
     120   periodic flushing of buffered output), a stream must have
     121   been created with :SHARING :LOCK in effect.  This is no longer
     122   the effective default; the code which does the periodic
     123   output flushing ignores streams which do not use locks as an
     124   access/sharing mechanism.  THIS MEANS THAT BUFFERRED OUTPUT
     125   TO SLIME REPLs WILL NOT BE AUTOMATICALLY FLUSHED TO THE SCREEN.
     126   A small change to SLIME's "swank-openmcl.lisp" is required
     127   to restore this functionality.  First,  a brief description of
     128   a couple of new primitives:
     129
     130   (CCL:ADD-AUTO-FLUSH-STREAM s)
     131
     132    Adds "s", which should be a "simple" OUTPUT-STREAM as returned
     133    by OPEN or MAKE-SOCKET, to a list of streams whose buffered
     134    output should be periodically flushed.  If S was not created
     135    with :SHARING :LOCK in effect, the stream will have its
     136    :SHARING mode changed to put :SHARING :LOCK into effect.
     137
     138   (CCL:REMOVE-AUTO-FLUSH-STREAM s)
     139   
     140    Removes S from the internal list of automatically flushed
     141    streams.  Does not restore the stream's :SHARING mode, which
     142    may have been changed by a previous call to ADD-AUTO-FLUSH-STREAM.
     143
     144 - SLIME changes
     145   In slime:swank-openmcl.lisp, around line 182, the method
     146
     147(defmethod make-stream-interactive ((stream ccl:fundamental-output-stream))
     148  (push stream ccl::*auto-flush-streams*))
     149
     150   should be changed to use CCL:ADD-AUTOFLUSH-STREAM if it's defined:
     151
     152(defmethod make-stream-interactive ((stream ccl:fundamental-output-stream))
     153  (if (fboundp 'ccl::add-auto-flush-stream)
     154    (ccl::add-auto-flush-stream stream)
     155    (push stream ccl::*auto-flush-streams*)))
     156
     157   That's adequate for the moment, since sockets are still
     158   FUNDAMENTAL-STREAMs.  When that changes, some more extensive changes
     159   to swank-openmcl.lisp may become necessary.
     160
     161- on x86-64, floating-point-underflow exceptions are now enabled
     162  by default.  (They really should be on ppc as well.)  Again,
     163  this affects FP operations that are done in lisp code and
     164  the results of FP operations that are reported in response
     165  to calls to reasonable (non-Darwin) math libraries.  This
     166  can affect whether or not some "potential number"  reader
     167  tokens are representable as numbers, e.g., whether or not
     168  attempts to read something like "1.0f-50" signal underflow
     169  or are quietly mapped to 0.0f0.
     170
     171- Bug fixes: see ChangeLog
     172
     173
     174
    1175OpenMCL 1.1-pre-060705
    2176- Bug fixes again.  Some internal changes to support a FreeBSD/AMD64
Note: See TracChangeset for help on using the changeset viewer.