[elephant-devel] More work on BDB interrupt-proofing

Red Daly reddaly at gmail.com
Sun Nov 22 13:04:03 UTC 2009


Hi Leslie et al,

On Wed, Oct 14, 2009 at 4:37 AM, Leslie P. Polzer
<sky at viridian-project.de> wrote:
> The attached patch makes BDB more robust against interrupts in various
> places. It achieves this mainly by wrapping critical paths in
> WITHOUT-INTERRUPTS and by registering cursors on the Lisp level
> (and cleaning up any dangling ones when the txn ends).

Why do these sections require WITHOUT-INTERRUPTS instead of locking?
WITHOUT-INTERRUPTS is deprecated in Allegro, and in lisps running on
multiple cores, it seems to have no atomicity guarantees that are
immediately relevant to me.

Quoted below is the Allegro documentation.  I'm not sure if
WITHOUT-INTERRUPTS has the same semantics in other lisps:

"Because Symmetric Multiprocessing (SMP) will be introduced into
Allegro CL 9.0 on some platforms, use of multiprocessing macros
without-interrupts and sys:without-scheduling, whose behavior is
significantly different in an SMP environment, is deprecated,
particularly for those users who intend to use the SMP facility. See
smp.htm for full details, but in brief, without-interrupts and
sys:without-scheduling effectively provided object locking -- because
they prevented process switches, and only one Lisp process could ever
run at a time, no object could be modified by another process while
code wrapped in the macros was being run. In an SMP Lisp, that is no
longer true because processes can run on separate processors
simultaneously. Therefore, object locking must be achieved in some
other fashion. See smp.htm for links to object locking functionality."



>
> This is work in progress, although it passes the test suite.
>
>  Leslie
>
> --
> http://www.linkedin.com/in/polzer
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
>

Best,
Red Daly




More information about the elephant-devel mailing list