| Commit message (Expand) | Author | Age | Files | Lines |
| * | Cope with migration of initial fiber•••* fibers.scm (run-fibers): Allow migration of main fiber.
| Andy Wingo | 2017-02-12 | 1 | -1/+4 |
| * | 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 | 1 | -35/+22 |
| * | 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 |
| * | 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 | 1 | -2/+1 |
| * | 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 |
| * | 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 |
| * | 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 | 1 | -23/+47 |
| * | 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 |
| * | 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 | 1 | -19/+19 |
| * | 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 | 1 | -6/+5 |
| * | 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 | 1 | -14/+12 |
| * | 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 | 1 | -11/+15 |
| * | 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 | 1 | -1/+1 |
| * | 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 | 1 | -2/+7 |
| * | Internals twiddles•••* fibers/internal.scm (current-scheduler/public): Document.
(current-fiber/public): New accessor.
(resume-on-timer): Document.
* fibers.scm: Adapt to use current-fiber directly from the internals.
Remove kill-fiber.
| Andy Wingo | 2016-10-12 | 1 | -14/+4 |
| * | Rework internals resume interface•••* fibers/internal.scm (resume-on-fd-events, resume-on-readable-fd)
(resume-on-writable-fd, resume-on-timer): Rework primitive resume
interface.
* fibers.scm:
* fibers/timers.scm: Adapt users.
| Andy Wingo | 2016-10-12 | 1 | -10/+6 |
| * | Lighter fibers•••* fibers/internal.scm: Remove fiber-state; this is managed implicitly
now by ensuring that a fiber is only resumed at most once per suspend.
We no longer record fiber return values; that should be up to the
fiber's init continuation. Replace scheduler inbox with making the
runqueue atomic.
* fibers.scm (run-fibers): Adapt to run-scheduler change.
* fibers/repl.scm (fibers): Adapt to fiber-data change.
| Andy Wingo | 2016-10-11 | 1 | -7/+10 |
| * | Timeout CML operations•••* fibers/timers.scm: New file.
* fibers/internal.scm (add-timer!): Take expiry as absolute time.
* fibers.scm (fibers): Re-export sleep from (fibers timers).
* Makefile.am: Adapt.
| Andy Wingo | 2016-10-03 | 1 | -9/+2 |
| * | Sleep refactor•••* fibers/internal.scm: Rename sleepers to timers, and be callbacks
instead of waking fibers directly.
* fibers.scm (sleep): Adapt.
| Andy Wingo | 2016-10-03 | 1 | -1/+4 |
| * | Add support for ,spawn-fiber | Andy Wingo | 2016-09-20 | 1 | -10/+11 |
| * | Add ,fibers command. | Andy Wingo | 2016-09-20 | 1 | -0/+1 |
| * | run-fibers returns values from initial thread•••* fibers.scm (run-fibers):
* fibers/internal.scm (run-scheduler): If there is an init thunk, keep
the scheduler running until the corresponding fiber is finished.
Return the values returned from the fiber.
* tests/basic.scm (assert-run-fibers-terminates): Return values.
(assert-run-fibers-returns): New helper. Use it.
| Andy Wingo | 2016-09-10 | 1 | -3/+7 |
| * | Tidy up fibers imports•••* fibers.scm (fibers): Trim imports.
| Andy Wingo | 2016-09-07 | 1 | -5/+2 |
| * | Separate public and private fibers interfaces•••* fibers/internal.scm: New file, factored out of (fibers).
* fibers.scm: Refactor to be just the public interface.
* fibers/channels.scm:
* web/server/fibers.scm:
* examples/memcached-client.scm:
* examples/memcached-server.scm:
* examples/ping-client.scm:
* examples/ping-server.scm: Adapt to interface changes.
* Makefile.am (SOURCES): Add (fibers internal).
| Andy Wingo | 2016-09-07 | 1 | -250/+38 |
| * | Add channels implementation•••* fibers/channels.scm: New file.
* fibers.scm: Add comment.
* Makefile.am: Add new file.
| Andy Wingo | 2016-09-06 | 1 | -0/+5 |
| * | Add support for FD finalization•••* fibers.scm (finalize-fd, wait-for-events): Arrange for close-port to
call into the scheduler.
| Andy Wingo | 2016-09-02 | 1 | -0/+16 |
| * | Slight internal refactor•••* fibers.scm (run): Inline `next-fiber' into its only use.
| Andy Wingo | 2016-09-02 | 1 | -14/+12 |
| * | Readability refactors to fibers.scm•••* fibers.scm (schedule-fibers-for-fd): New function, factored out of
poll-for-events.
(poll-for-events): Comments and style refactorings.
| Andy Wingo | 2016-07-06 | 1 | -38/+44 |
| * | Add (fibers) module•••* fibers.scm: New file.
* Makefile.am: Add new file.
| Andy Wingo | 2016-07-03 | 1 | -0/+265 |