| Commit message (Expand) | Author | Age | Files | Lines |
| * | Fibers v0.5.0.•••* configure.ac: Bump version.
* NEWS: Update.
v0.5.0 | Andy Wingo | 2017-01-19 | 2 | -1/+12 |
| * | Update documentation.•••* fibers.texi (Using Fibers): Update.
| Andy Wingo | 2017-01-19 | 1 | -2/+9 |
| * | Better findability for epoll extension.•••* fibers/config.scm.in: New file.
* Makefile.am: Wire up new file.
* env.in: Define FIBERS_BUILD_DIR.
* fibers/epoll.scm: Use (fibers config) to get dir for epoll extension.
| Andy Wingo | 2017-01-19 | 4 | -1/+44 |
| * | Randomized round-robin work sharing/stealing•••* fibers.scm (start-auxiliary-threads, stop-auxiliary-threads): Adapt to
scheduler-remote-peers change.
(spawn-fiber): Adapt to use choose-parallel-scheduler.
* fibers/internal.scm (<scheduler>): Add choose-parallel-scheduler
field.
(shuffle, make-selector): New helpers.
(make-scheduler): Adapt to initialize choose-parallel-scheduler
field.
(choose-parallel-scheduler): New public function.
(run-scheduler): Use fiber-stealer.
| Andy Wingo | 2017-01-18 | 2 | -63/+76 |
| * | More speedup tests.•••* tests/speedup.scm (do-times): Add different loop-to tests.
| Andy Wingo | 2017-01-18 | 1 | -3/+7 |
| * | Add test for parallel speedup.•••* tests/speedup.scm: New file.
* Makefile.am (TESTS): Add new file.
| Andy Wingo | 2017-01-18 | 2 | -1/+57 |
| * | Pin worker threads to CPUs if appropriate•••* fibers.scm (with-affinity): New helper.
(%run-fibers): Add affinity argument.
(start-auxiliary-threads): Add affinities argument.
(compute-affinities): New helper.
(run-fibers): If the parallelism is complete, pin threads to CPUs.
| Andy Wingo | 2017-01-17 | 1 | -21/+58 |
| * | Update TODO | Andy Wingo | 2017-01-08 | 1 | -4/+0 |
| * | Update documentation•••* fibers.texi: Update.
| Andy Wingo | 2017-01-08 | 1 | -85/+211 |
| * | Disable parallelism in scheduling-order tests•••* tests/basic.scm (assert-run-fibers-terminates): Allow keyword args to
run-fibers.
(run-order, wakeup-order): Disable parallelism.
| Andy Wingo | 2017-01-08 | 1 | -4/+4 |
| * | create-fiber always captures dynamic state•••* fibers/internal.scm (create-fiber): Remove dynamic-state argument;
always capture the current dynamic state.
* fibers/timers.scm (timer-operation):
* fibers.scm (spawn-fiber): Adapt.
| Andy Wingo | 2017-01-08 | 3 | -13/+12 |
| * | Enable preemption by default•••* fibers.scm (run-fibers): Enable preemption by default with a period of
10ms.
| Andy Wingo | 2017-01-08 | 1 | -3/+2 |
| * | Peer schedulers share a prompt tag•••* fibers/internal.scm (make-scheduler): Peer schedulers share a prompt
tag. This eliminates TOCTTOU bugs in suspend-current-fiber when
computing the suspension prompt tag.
(run-scheduler): Inline run-fiber and just use the same prompt tag for
all fibers.
| Andy Wingo | 2017-01-08 | 1 | -15/+17 |
| * | Fix race between with-interrupts and thread start•••* fibers/interrupts.scm (with-interrupts/thread-cputime): Fix race.
| Andy Wingo | 2017-01-08 | 1 | -4/+10 |
| * | Fix clock-nanosleep wrapper•••* fibers/posix-clocks.scm (clock-nanosleep): clock_nanosleep returns
the error value directly; it doesn't set errno. Fix.
| Andy Wingo | 2017-01-08 | 1 | -9/+7 |
| * | Web server uses dedicated fiber thread•••* web/server/fibers.scm: Instead of manually cothreading between fibers
and the web server, instead have the web server use our new support
for CML operations from outside fibers to use channels to communicate
with a pool of threads running fibers.
| Andy Wingo | 2017-01-06 | 1 | -55/+56 |
| * | Allow run-fibers thread to be cleanly cancelled•••* fibers.scm (run-fibers): Spawn and cancel aux threads within a
dynamic-wind.
| Andy Wingo | 2017-01-06 | 1 | -3/+4 |
| * | Add support for operations from foreign threads•••* tests/foreign.scm: New file.
* Makefile.am: Add new file.
* fibers/operations.scm (perform-operation): Support blocking operations
from foreign threads (without a scheduler).
* fibers/timers.scm (timer-sched, *timer-sched*, timer-operation): Add
support for timeouts that use an auxiliary thread instead of relying
on the current scheduler.
| Andy Wingo | 2017-01-05 | 4 | -2/+123 |
| * | Remove epoll dep on suspendable ports•••* epoll.c (scm_primitive_epoll_wake): New function.
(scm_primitive_epoll_wait): If the epoll was woken, drain the read
pipe directly.
(init_fibers_epoll): Adapt prototypes.
* fibers/epoll.scm (epoll-wake!): Use primitive-epoll-wake.
(epoll): Let primitive-epoll-wait handle wakeup.
| Andy Wingo | 2017-01-04 | 2 | -21/+50 |
| * | Centralize operation wrap handling•••* fibers/operations.scm (<base-op>): Update comment.
(perform-operation): Wrap resume proc before calling block function.
* fibers/channels.scm (put-operation, get-operation):
* fibers/timers.scm (timer-operation): Adapt to pre-wrapped resume proc.
| Andy Wingo | 2017-01-04 | 3 | -28/+28 |
| * | Prepare for support for blocking operations•••* fibers/operations.scm (perform-operation): Block function takes sched
and resume function, not fiber. Will allow blocking operations in the
future.
* fibers/internal.scm (add-timer): Rename from resume-on-timer; just
call a thunk after a time has passed.
* fibers/timers.scm (timer-operation): Adapt to resume-on-timer and
operation changes.
* fibers/channels.scm (put-operation, get-operation): Adapt to operation
changes.
| Andy Wingo | 2017-01-04 | 4 | -62/+58 |
| * | Fix ,spawn-fiber•••* fibers/repl.scm (spawn-fiber): Use spawn-fiber instead of create-fiber
to get right dynamic-state.
| Andy Wingo | 2016-12-30 | 1 | -1/+1 |
| * | Fix spawn-fiber outside run-fibers•••* fibers.scm (run-fibers): Require init thunk for run-fibers without a
scheduler.
(spawn-fiber): Incorporate helper procedures, remove dynamic-state
argument (as it's always the current dynamic state), and add parallel?
argument. Ensure the fiber will have the right read/write waiters.
* tests/basic.scm: Update.
| Andy Wingo | 2016-12-30 | 2 | -24/+53 |
| * | Enable parallelism by default•••* fibers.scm (run-fibers): Default to use all current processor cores.
(%run-fibers, start-auxiliary-threads, stop-auxiliary-threads): New
helpers.
| Andy Wingo | 2016-12-29 | 1 | -18/+50 |
| * | Flesh out remote peers interface•••* fibers/internal.scm (<scheduler>): Add remote-peers setter, and expose
getter publically.
(make-scheduler): Change remote-peers arg to "parallelism", and use
setter to initialize remote peers.
| Andy Wingo | 2016-12-29 | 1 | -3/+14 |
| * | C-c works on threads stuck in epoll•••* epoll.c (scm_primitive_epoll_wait): Add wakefd argument, and use
facilities from git guile to ensure that C-c will wake a thread
sleeping in epoll.
(init_fibers_epoll): Declare additional primitive-epoll-wait arg.
* fibers/epoll.scm (epoll): Tell Guile about the wake fd.
| Andy Wingo | 2016-12-29 | 2 | -11/+21 |
| * | Remove #:keep-scheduler? arg•••* fibers.scm (run-fibers): Remove #:keep-scheduler? argument; instead,
only destroy schedulers that we create.
* fibers.texi (Using Fibers): Update run-fibers docs.
* web/server/fibers.scm (server-read): Adapt.
| Andy Wingo | 2016-12-27 | 3 | -32/+27 |
| * | Fix yield-current-fiber•••* fibers/internal.scm (yield-current-fiber): Fix to allow
yield-current-fiber to be run from an interrupt tick, when it's
possible that no fiber is current.
| Andy Wingo | 2016-12-23 | 1 | -5/+8 |
| * | Enable work stealing in run-scheduler•••* fibers.scm (run-fibers): Store result in an atomic box, given that the
initial fiber could migrate.
* fibers/internal.scm (<scheduler>): Add remote-peers field.
(<fiber>): Add set-fiber-scheduler!.
(make-scheduler): Adapt to <scheduler> change.
(scheduler-finished?): New helper.
(scheduler-poll-timeout): Take a finished? predicate to know when to
wait and when to return directly.
(schedule-runnables-for-next-turn): Plumb finished? predicate
through.
(run-scheduler): Avoid returning until finished? is true. Refactor to
add work stealing.
(steal-fiber!): New helper.
| Andy Wingo | 2016-12-22 | 2 | -43/+58 |
| * | Get current scheduler from current fiber•••* fibers.scm (run-fibers): Refine #:keep-scheduler? default.
(current-fiber-scheduler): Rename from require-current-scheduler, and
use the current fiber to get at the scheduler.
(spawn-fiber): Let create-fiber handle dynamic state shenanigans, as
it needs to ensure that current-fiber is bound in the thunk.
* fibers/internal.scm (with-scheduler): Don't parameterize
current-scheduler, as that binding for a given scheduler needs to
change over time, and the with-dynamic-state prevents this from
happening.
(schedule-fiber!): Wake schedulers not on the current kernel thread.
(run-fiber): Don't parameterize current-fiber; it's lost across the
with-dynamic-state.
(create-fiber): Instead set current-fiber inside the
with-dynamic-state.
(suspend-current-fiber, yield-current-fiber): Get current scheduler
from current fiber.
| Andy Wingo | 2016-12-22 | 2 | -41/+37 |
| * | run-scheduler pops one fiber at a time•••* fibers/internal.scm (run-scheduler): Pop one fiber at a time.
| Andy Wingo | 2016-12-22 | 1 | -13/+15 |
| * | Rework runqueue as pair of stacks•••* fibers/stack.scm: New file.
* Makefile.am: Add new file.
* fibers/internal.scm: Rework runqueue to have separate current and next
stacks. We want to expose the current runqueue so that remote
schedulers can steal work, but we also need to know when we flip the
next runqueue to the current runqueue so that we can pull in
additional wakeups from epoll and timers.
| Andy Wingo | 2016-12-22 | 3 | -23/+93 |
| * | Beginnings of work stealing•••* fibers/deque.scm (update!): Don't spin if value didn't change.
(dequeue!): New function.
* fibers/internal.scm (schedule-fibers-for-fd): Add comment about
stealing and fd's.
(steal-work!): New internal function.
| Andy Wingo | 2016-12-21 | 2 | -4/+26 |
| * | Bump version to 0.4.0v0.4.0 | Andy Wingo | 2016-12-16 | 2 | -3/+3 |
| * | Update NEWS.•••* NEWS: Update.
| Andy Wingo | 2016-12-16 | 1 | -0/+24 |
| * | Add REPL commands to manual | Andy Wingo | 2016-12-16 | 2 | -1/+38 |
| * | Add examples to fibers.texi | Andy Wingo | 2016-12-16 | 2 | -1/+199 |
| * | Update fibers manual | Andy Wingo | 2016-12-16 | 1 | -23/+23 |
| * | Factor interrupt generation to separate facility•••* fibers/interrupts.scm: New file.
* fibers/internal.scm (<scheduler>): Remove Hz field and adapt users.
(run-scheduler): Remove preemption; (fibers) handles this now.
(yield-current-fiber): New primitive.
* fibers.scm (run-fibers): Use interrupts module and wrap run-scheduler
in `with-interrupts'.
* Makefile.am: Add new file.
| Andy Wingo | 2016-12-16 | 4 | -61/+121 |
| * | Add posix-clocks.scm•••* fibers/posix-clocks.scm: New file.
* Makefile.am: Add new file.
| Andy Wingo | 2016-12-16 | 2 | -0/+167 |
| * | Add support for preemption•••* Makefile.am: Add new test.
* TODO.md: Remove stale TODO entries.
* fibers.scm (run-fibers): Add #:hz parameter.
* fibers.texi (Design): Mention that we support preemption.
(Using Fibers): Update for preemption.
* fibers/internal.scm (<scheduler>): Add hz field.
(make-scheduler): Add #:hz initarg.
(maybe-preemptive): New helper.
(run-scheduler): Use maybe-preemptive.
* tests/preemption.scm: New test.
| Andy Wingo | 2016-12-12 | 6 | -47/+154 |
| * | Minor documentation tweak•••* fibers.texi (Barriers): Prefer the word "suspendable" over
"rewindable".
| Andy Wingo | 2016-12-12 | 1 | -4/+6 |
| * | Error on attempt to suspend unsuspendable continuations•••* fibers/internal.scm (suspend-current-fiber): Error if the fiber is not
suspendable.
| Andy Wingo | 2016-12-12 | 1 | -2/+9 |
| * | Fix manual build•••* fibers.texi: Fix Continuation Barriers xref.
| Andy Wingo | 2016-12-12 | 1 | -2/+2 |
| * | Add scary words about mutexes•••* fibers.texi (Mutexes): New section.
| Andy Wingo | 2016-12-12 | 1 | -3/+38 |
| * | Add manual section on continuation barriers.•••* fibers.texi (Barriers): New section.
| Andy Wingo | 2016-12-12 | 1 | -1/+85 |
| * | Update spawn-fiber documentation | Andy Wingo | 2016-12-12 | 1 | -1/+7 |
| * | Describe fibers as being Go-like rather than Erlang-like.•••* README.md: Update.
| Andy Wingo | 2016-12-12 | 1 | -2/+2 |
| * | Fibers inherit dynamic state of parent.•••* fibers.scm (spawn-fiber): Fibers inherit dynamic state of parent.
* tests/parameters.scm: New test.
* Makefile.am: Add new file.
| Andy Wingo | 2016-12-12 | 3 | -3/+81 |
| * | Import (ice-9 threads) to avoid deprecation warnings•••* fibers/internal.scm:
* fibers/repl.scm: Explicitly import (ice-9 threads).
| Andy Wingo | 2016-12-12 | 2 | -0/+2 |