Commit Graph

18 Commits

Author SHA1 Message Date
Matthew Flatt
c195288251 scalable object locking
The `unlock-object` operation was O(N) with N currently locked objects
--- so, O(N^2) to lock N objects and then unlock them --- because
locked objects were stored in and searched in a global list. Also, GC
was O(N) at any generation with N locked objects across generations,
since every locked object was scanned.

Fix these poblems so that locking and unlocking is practically O(1)
and GC is not poportional to locked objects. More precisely, locking
and unlocking is now O(C) for locking an individual object C times to
be balanced by C unlocks. (Since multiple locks on a single object
is rare, this performance seems good enough.)

The implementation replaces the global list with segment-specific
lists. Backpointers are managed using the general generational
support, so that unmodified, old-generation locked objects do not
need to be swept duing a new-generation collection.

original commit: a57d256ca73a3d507792c471facb7e35afbe88b3
2019-09-01 07:03:16 -06:00
Matthew Flatt
71846161f9 Merge branch 'bsd' of github.com:mflatt/ChezScheme
original commit: 198477a40c2c580924d95491e63d80e1f9a39c0d
2019-07-05 07:30:37 -06:00
Matthew Flatt
c38194c0ca adjust build for BSDs, MinGW cross-compile, and more configuration
Includes joint work with @abmclin, @pmatos, and @jessealama.

original commit: 70559d074f70dcadec5cea3619f75f91fcda77eb
2019-07-03 18:54:04 -06:00
Matthew Flatt
4030eae6a7 support cross-compile using MinGW
original commit: f36d5f8c0a4e31666e4332824d79279d9986e886
2019-03-02 05:30:08 -07:00
Matthew Flatt
8070a7b910 Merge branch 'eqfl' of github.com:mflatt/ChezScheme
original commit: 8b36396eacb139e0fff70efcd2c9dc842815324f
2019-01-22 05:57:17 -07:00
Matthew Flatt
21fc705234 adjust GC to preserve eq? on flonums
original commit: d405416eb2ec6d5dd147afc7a2af5a6c2f0a8130
2019-01-22 05:24:05 -07:00
Matthew Flatt
6e999d02c3 add ordered guardians
Also, avoid quadratic time in GC for guardian chains.

original commit: 273f79a7be5c04370c399e6b1d8af799efc8b33f
2019-01-22 05:19:38 -07:00
Matthew Flatt
3658fad6b7 Merge branch 'count' of github.com:mflatt/ChezScheme
original commit: 9d0a647e87089c91195cc49480d848212025a7ed
2019-01-05 09:55:07 -07:00
Matthew Flatt
aaaa5fefa1 add compute-size-increments
Also adds `get-initial-thread`, since threa values are useful with
`compute-size[-increments]`.

Changes the compiler to inline `weak-pair?` and `ephemeron-pair?`,
since that provides better performance for `compute-size-increments`.

original commit: 57d0cc13f8e932972cba3837b4f54e9c86786091
2019-01-05 09:49:12 -07:00
Matthew Flatt
5a27f6de14 Merge branch 'orderfnl' of github.com:mflatt/ChezScheme
original commit: 04618715b7b447877cd874715d78094befb0b988
2018-12-16 06:46:34 -07:00
dyb
19f3c85fe2 attempted partial fix for github issue 352
- when thread_get_room exhausts the local allocation area, it now
  goes through a common path with S_get_more_room to allocate a new
  local allocation area when appropriate.  this can greatly reduce
  the use of global allocation (and the number of tc mutex acquires
  in threaded builds) when a lot of small objects are allocated by
  C code with no intervening Scheme-side allocation or dirty writes.
    alloc.c, types.h, externs.h

original commit: 93dfa7674a95837e5a22bc622fecc50b0224f60d
2018-10-05 09:03:30 -07:00
Matthew Flatt
2ca43d6c6f add ordered guardians
Also, avoid quadratic time in GC for guardian chains.

original commit: a07c7e14b61862989777909ee63a2ec120c2ea47
2018-07-15 19:12:43 -06:00
Matthew Flatt
18cdcd977e add ephemerons
original commit: 8a09c2c3f032e6e30b1ef393d2334963aa70507e
2017-05-24 09:38:24 -06:00
Bob Burger
831ea8ad18 changed copyright year to 2017
7.ss, scheme.1.in, comments of many files

original commit: 06f858f9a505b9d6fb6ca1ac97234927cb2dc641
2017-04-06 11:41:33 -04:00
Kent Dybvig
c503362914 - various tweaks to the immutable object support; also taught cp0
to simplify ($fxu< (most-positive-fixnum) e) => (fx< e 0) so we
  don't have any incentive in special casing length checks where
  the maximum length happens to be (most-positive-fixnum).
    5_4.ss, 5_6.ss, bytevector.ss, cmacros.ss, cp0.ss, cpnanopass.ss,
    mkheader.ss, primdata.ss, prims.ss,
    fasl.c, gc.c, types.h
    root-experr*, patch*

original commit: 9eb63deda025fd4560b54746b21a881c01af46d6
2017-03-15 14:49:58 -04:00
Kent Dybvig
9cd0199a39 merge @mflatt immutable-vector, immutable-string, immutable-bytevector,
immutable-fxvector, and immutable-box support

original commit: 547fce9b99c6566d5cb3f7af9ca84654e798486e
2017-03-15 11:09:57 -04:00
Bob Burger
51db0ddbc1 scheme_mutex_t now uses volatile keyword for owner and count fields
because these fields can be accessed from multiple threads concurrently.
Updated $yield and $thread-check in mats/thread.ms to be more tolerant of timing variability.

original commit: 0a6a1e14e7ecb9e39fa7a10a8584ed2fec24cbf4
2016-06-22 15:33:21 -04:00
dyb
1356af91b3 initial upload of open-source release
original commit: 47a210c15c63ba9677852269447bd2f2598b51fe
2016-04-26 10:04:54 -04:00