summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #14 from craigmaloney/masterHEADmasterAndy Wingo2017-08-171-4/+4
|\ | | | | Substitute @math for @sub, typo fixes
| * Substitute @math for @sub, typo fixesCraig Maloney2017-08-161-4/+4
|/
* Garbage collect synchronized items from channels put/get queues.Christopher Allan Webber2017-08-105-35/+91
| | | | | | | | | | | | | * fibers/conditions.scm (make-counter, %steps-till-gc, counter-decrement!) (counter-reset!): Moved to new module, counter.scm. * fibers/counter.scm: New file. Rename `%steps-till-gc' to `%countdown-steps'. * Makefile.am: Add counter.scm. * fibers/channels.scm (<channel>, make-channel): Add new slots `getq-gc-counter' and `putq-gc-counter'. (put-operation, get-operation): Garbage collect synchronized items from queues. * fibers/deque.scm (dequeue-filter, dequeue-filter!): New procedures.
* Update copyright headers, adding Chris Webber where appropriate.Christopher Allan Webber2017-08-102-0/+2
| | | | | * fibers/conditions.scm: * fibers/stack.scm: Update copyright headers.
* Add guix.scm file for easy development environments.Christopher Allan Webber2017-08-061-0/+77
| | | | | | | `guix environment -l guix.scm' and go! You can also do `guix build -f guix.scm' to test that the package builds. * guix.scm: New file.
* Removing accidental inclusion of example's previous timing.Christopher Allan Webber2017-08-061-4/+0
| | | | * fibers.texi: Removing previous timing output.
* Update speed measurement for ping-pong testAndy Wingo2017-08-061-2/+6
|
* Fix concurrency bug in memcached serverAndy Wingo2017-08-061-1/+3
|
* Lighten up fibers by installing "catch" in schedulerAndy Wingo2017-08-062-36/+37
| | | | This takes the load off of each fiber and speeds things up.
* Fix typo in schedule-task-when-fd-writableAndy Wingo2017-08-061-1/+1
|
* Rebase fibers on top of schedulers and tasksAndy Wingo2017-08-0611-708/+583
| | | | | | | | | | This commit refactors fibers to be based on lighter-weight "tasks", and makes the scheduler API more orthogonal. Now there are no more fiber objects (although the fibers layer could re-add them if they are useful), and fibers no longer have names (although again this could be re-added at an upper layer). Also it's the current scheduler that's bound by a parameter, not the current fiber, and as it's a thread-safe parameter it doesn't need to be bound in each fiber.
* Garbage collect old condition waiters.Christopher Allan Webber2017-07-312-5/+56
| | | | | | | | * fibers/stack.scm (stack-filter!): New variable. * fibers/conditions.scm (make-counter, counter-increment!) (counter-reset!, %steps-till-gc): New variables. (<condition>, make-condition): Update to take gc-step argument. (wait-operation): Occasionally garbage collect old condition waiters.
* Merge pull request #10 from cwebber/document-signal-conditionAndy Wingo2017-07-311-0/+5
|\ | | | | Document signal-condition!
| * Document signal-condition!Christopher Allan Webber2017-07-301-0/+5
|/ | | | * fibers.texi (Conditions): Document signal-condition!
* Add local ping-pong benchmarkAndy Wingo2017-06-182-1/+44
|
* Fix diagonal benchmarkAndy Wingo2017-06-171-1/+1
|
* Remove dep on local dev setupAndy Wingo2017-06-171-5/+5
|
* Add makefile for collecting dataAndy Wingo2017-06-172-0/+25
|
* Add scale-bench file.Andy Wingo2017-06-171-0/+36
| | | | * benchmarks/scale-bench: New file.
* Add parallel ping-pong benchmarkAndy Wingo2017-06-161-0/+40
|
* Remove sieve printoutAndy Wingo2017-06-161-1/+1
|
* Fix sieve bugAndy Wingo2017-06-161-2/+2
|
* Add false sieve-of-erastothenes benchmarkAndy Wingo2017-06-161-0/+51
|
* Add benchmarks.Andy Wingo2017-06-163-0/+176
|
* Support compiling against Guile 3.0.Andy Wingo2017-06-162-18/+67
|
* Fibers 1.0.0.v1.0.0Andy Wingo2017-02-201-1/+1
| | | | * configure.ac: Bump version.
* Fix fibers/config.scm ruleAndy Wingo2017-02-201-0/+1
| | | | * Makefile.am (fibers/config.scm): Fix rule.
* Fibers 1.0.0 documentation.Andy Wingo2017-02-201-13/+11
| | | | * fibers.texi: Update for 1.0.0.
* Add gitignoreAndy Wingo2017-02-201-0/+1
| | | | * .gitignore: Add fibers/config.scm.
* Update examples in manualAndy Wingo2017-02-201-18/+15
| | | | * fibers.texi: Update examples and example timings.
* Update examplesAndy Wingo2017-02-204-39/+31
| | | | | | | * examples/memcached-client.scm: * examples/memcached-server.scm: * examples/ping-client.scm: * examples/ping-server.scm: Update for newest run-fibers.
* Add block-asyncs in fiber->thread resume pathAndy Wingo2017-02-201-4/+6
| | | | | | * fibers/operations.scm (perform-operation): Block asyncs in resume callback; otherwise the fiber doing the resuming could be scheduled away.
* Update (web server fibers)Andy Wingo2017-02-201-12/+7
| | | | * web/server/fibers.scm: Update for new-style nonblocking management.
* Add new channels test.Andy Wingo2017-02-201-0/+22
| | | | * tests/channels.scm (pingpong): New test.
* Fix deprecation warning in (fibers operations)Andy Wingo2017-02-201-0/+5
| | | | * fibers/operations.scm: Use (ice-9 threads).
* Fix epoll wakeupAndy Wingo2017-02-201-5/+7
| | | | | | * fibers/epoll.scm (epoll): Like a complete idiot, I broke epoll wakeup. Fixed by calling expiry->timeout while epoll-state is waiting.
* Update REPL support for run-fibers changes.Andy Wingo2017-02-201-11/+26
| | | | * fibers/repl.scm (fibers): Update for new run-fibers changes.
* Update documentation.Andy Wingo2017-02-201-0/+5
| | | | * fibers.texi (Internals): Document scheduler-work-pending?.
* run-fibers returns when initial fiber finishesAndy Wingo2017-02-197-126/+148
| | | | | | | | | | | | | | | | | | | | | * epoll.c (scm_primitive_epoll_wait): Accept timeout in internal time units instead of milliseconds. Avoid some overhead if the timeout is zero. * fibers/epoll.scm (epoll): Adapt to primitive-epoll-wait chance. Change get-timeout callback to an "expiry" argument and an update-expiry last-minute function. Tighten the window around the "waiting" epoll-state. * fibers.scm (%run-fibers): Remove current-read-waiter / current-write-waiter parameterization, given that fibers individually each have this parameterization. (run-fibers): Add #:drain? argument. * fibers/internal.scm (schedule-runnables-for-next-turn): Simplify a bit, inlining scheduler-poll-timeout and adapting to epoll change. (scheduler-work-pending?): New function. (run-scheduler): Simplify finish? logic. * tests/basic.scm: * tests/speedup.scm: Update to drain where needed. * fibers.texi: Update for new run-fibers termination condition.
* Fix make -j problemAndy Wingo2017-02-191-0/+1
| | | | * Makefile.am ($(GOBJECTS)): Depend on epoll.la.
* Minor documentation updateAndy Wingo2017-02-191-2/+26
| | | | * fibers.texi: Bump version and date. Add words about scalability.
* Require Guile 2.1.7Andy Wingo2017-02-181-1/+1
| | | | * README.md (Download): Update required Guile version.
* Lower preemption overheadAndy Wingo2017-02-172-11/+14
| | | | | | | * fibers/interrupts.scm (with-interrupts/sigprof): (with-interrupts/thread-cputime, with-interrupts): Separate predicate from interrupt routine, so that predicate can run off-thread. * fibers.scm (%run-fibers): Adapt.
* Prevent spurious preemptionAndy Wingo2017-02-172-3/+21
| | | | | | | * fibers/internal.scm (<scheduler>, make-scheduler): (scheduler-runcount, run-scheduler): Maintain a count of run fibers. * fibers.scm (%run-fibers): Only cause the current fiber to suspend if the runcount isn't advancing.
* Add allocation speedup testAndy Wingo2017-02-171-0/+13
| | | | * tests/speedup.scm: Add allocation speedup test.
* Take advantage of accept4 interface.Andy Wingo2017-02-151-2/+2
| | | | | * fibers/web/server.scm (client-loop): Setvbuf here. (socket-loop): Use new accept4 interface.
* Tweak fibers web socket optionsAndy Wingo2017-02-151-7/+4
| | | | | | | * fibers/web/server.scm (client-loop): Move NODELAY things here and actually enable NODELAY (before we were... disabling it???). (socket-loop): Remove SNDBUF munging; let's assume it doesn't matter rather than the reverse.
* Fix epoll-modify logicAndy Wingo2017-02-151-66/+52
| | | | | | | | | | | | | | | | Because this case wasn't being hit before, there were bugs. * fibers/internal.scm (<scheduler>): Remove active fd count; we'll add a #:forever? option to run-fibers instead. Simplify sources. (make-scheduler): Adapt. (schedule-fibers-for-fd): Use resume callbacks, to allow for other kinds of callbacks. (scheduler-poll-timeout): Don't wait for active fd count to go to zero. (finalize-fd): Avoid mucking with hash tables from this potentially-gc callback. (add-fd-event-waiter): New function. (resume-on-fd-events): Call new function.
* Add epoll-add*!Andy Wingo2017-02-151-1/+8
| | | | | * fibers/epoll.scm (epoll-add*!): New function, tries an epoll-modify! then falls back to epoll-add!.
* fibers/config.scm is built sourceAndy Wingo2017-02-151-0/+2
| | | | * Makefile.am (BUILT_SOURCES): Mark fibers/config.scm as built.