| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | tor-memquota: queue plan: Add a cross-reference | Ian Jackson | 2024-09-10 | 1 | -0/+3 | |
| | | ||||||
| * | tor-memquota: queue plan: Clean up intent and make into a doc comment | Ian Jackson | 2024-09-10 | 1 | -32/+24 | |
| | | | | | Remove extraneous text, wrap it, and change to a more declarative style. | |||||
| * | tor-memquota: queue plan: Copy from !1997 discussion | Ian Jackson | 2024-09-10 | 1 | -0/+32 | |
| | | ||||||
| * | tor-memquota: Worsify formatting to stop rustfmt making it even worse | Ian Jackson | 2024-09-10 | 1 | -1/+3 | |
| | | ||||||
| * | tor-memquota: Use clippy::arithmetic_side_effects, against panics | Ian Jackson | 2024-09-10 | 4 | -0/+12 | |
| | | | | | | | This detect possibly-panicking operations. Empirically this lint seems rather better now. | |||||
| * | tor-memquota: Document that we're panic-free | Ian Jackson | 2024-09-10 | 1 | -0/+10 | |
| | | ||||||
| * | tor-memquota: Avoid a perhaps-impossible division-by-zero (fmt) | Ian Jackson | 2024-09-10 | 1 | -1/+5 | |
| | | ||||||
| * | tor-memquota: Avoid a perhaps-impossible division-by-zero | Ian Jackson | 2024-09-10 | 1 | -1/+3 | |
| | | | | | | | It is not locally obvious that n_particips can't be zero, here. Certainly if it *is* that would be state corruption, but I don't think I can quite rule it out in the presence of a bug somewhere else. | |||||
| * | tor-memquota: Use a const to hoist a panic to compile-time | Ian Jackson | 2024-09-10 | 1 | -1/+3 | |
| | | ||||||
| * | tor-memquota: Use checked_sub .. expect in two places (fmt) | Ian Jackson | 2024-09-10 | 1 | -2/+6 | |
| | | ||||||
| * | tor-memquota: Use checked_sub .. expect in two places | Ian Jackson | 2024-09-10 | 1 | -2/+6 | |
| | | | | | | In these two places, underflow is statically impossible, but demonstrating that to the compiler is probably too onerous. | |||||
| * | tor-memquota: Move some information into the proper docs | Ian Jackson | 2024-09-10 | 1 | -0/+8 | |
| | | | | | | This sentence is very important piece of overall explanation, but didn't make it into the crate level docs. | |||||
| * | Fix typo in tor_memquota::ConfigBuilder doc | Ian Jackson | 2024-09-04 | 1 | -1/+1 | |
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2374#note_3070500 | |||||
| * | tor-memquota: Provide reconfigure method | Ian Jackson | 2024-09-04 | 2 | -1/+56 | |
| | | ||||||
| * | tor-memquota: Break out reclamation wakeup | Ian Jackson | 2024-09-04 | 1 | -1/+6 | |
| | | ||||||
| * | tor-memquota: Make reclamation wakeup no longer throw internal errors | Ian Jackson | 2024-09-04 | 2 | -5/+6 | |
| | | | | | I realised a way this could happen without there being a bug. | |||||
| * | tor-memquota: Unstable cargo feature for exposing info for testing | Ian Jackson | 2024-09-04 | 2 | -2/+23 | |
| | | ||||||
| * | tor-memquota: Rework optionality configuration | Ian Jackson | 2024-09-04 | 5 | -30/+86 | |
| | | | | | | | | | | | | | | | | | | | Allow a `Config` to represent "this is supposed to be disabled". This involves wrapping the actual built configuration in an IfEnabled. We treat max = usize::MAX, or max being unspecified, as "disable". We can now reporting an error during config building if max is set but we're compiling the feature out. Conversely, we can now make `MemoryQuotaTracker::new()` unconditional, since enabled confiogurations are uninhabited when the feature is compiled out. We change how we derive the setters, deriving them from the Builder. I chose to abolish the use of derive_builder. See the new comment on ConfigBuilder. | |||||
| * | tor-memquota: impl PartialEq for IfEnabled and EnabledToken | Ian Jackson | 2024-09-04 | 1 | -2/+4 | |
| | | ||||||
| * | tor-memquota: Add unit tests for config handling | Ian Jackson | 2024-09-04 | 1 | -0/+56 | |
| | | | | | | We're about to change the config behaviour; adding these tests first allows us to demonstrate the changes. | |||||
| * | Fix typos | Dimitris Apostolou | 2024-09-03 | 6 | -15/+15 | |
| | | ||||||
| * | Move stream_peek into tor-async-utils | Jim Newsome | 2024-08-29 | 3 | -514/+3 | |
| | | ||||||
| * | Expose StreamUnobtrusivePeeker::as_raw_inner_pin_mut | Jim Newsome | 2024-08-27 | 1 | -1/+1 | |
| | | ||||||
| * | Remove NoopWaker; use futures::task::noop_waker_ref instead | Jim Newsome | 2024-08-27 | 4 | -21/+5 | |
| | | ||||||
| * | byte_qty: Move to tor-basic-utils | Ian Jackson | 2024-08-27 | 5 | -74/+5 | |
| | | | | | Code motion of byte_qty.rs, and minimal necessary supporting changes. | |||||
| * | byte_qty: Rename Qty to ByteQty and make it pub | Ian Jackson | 2024-08-27 | 2 | -8/+12 | |
| | | | | | | | | We're going to make this into a proper public type. It's going to move into a different crate, where there's no prelude, so give it a bespoke set of imports too. | |||||
| * | byte_qty: Move Qty into its own module, byte_qty. | Ian Jackson | 2024-08-27 | 4 | -57/+68 | |
| | | | | | | | | Code motion, part 1. Also explain in comments at the top of the new module why we are doing this at all rather than using an existing thing. | |||||
| * | tor-memquota: Move the macro-containing modules earlier in the lib.rs | Ian Jackson | 2024-08-27 | 1 | -2/+3 | |
| | | | | | | | This makes more sense than having them alphabetical. Noticed while I was working on moving other code. | |||||
| * | Merge branch 'peekable-poll-set' into 'main' | Jim Newsome | 2024-08-21 | 3 | -51/+37 | |
| |\ | | | | | | | | | Add and use `PeekableStream` and `UnobtrusivePeekableStream` See merge request tpo/core/arti!2345 | |||||
| | * | Expose stream_peek | Jim Newsome | 2024-08-21 | 2 | -6/+18 | |
| | | | ||||||
| | * | PeekFuture: implement for all PeekableStream | Jim Newsome | 2024-08-21 | 1 | -5/+6 | |
| | | | ||||||
| | * | StreamUnobtrusivePeeker: implement PeekableStream and UnobtrusivePeekableStream | Jim Newsome | 2024-08-21 | 2 | -41/+14 | |
| | | | ||||||
| * | | tor-memquota: IfEnabled: Complete a thought in a comment | Ian Jackson | 2024-08-21 | 1 | -1/+3 | |
| | | | | | | | | | | | Reported at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2351#note_3062292 | |||||
| * | | tor-memquota: Pass EnabledToken to HasMemoryCost method | Ian Jackson | 2024-08-19 | 2 | -17/+29 | |
| | | | ||||||
| * | | tor-memquota: Pass EnabledToken to IsParticipant methods | Ian Jackson | 2024-08-19 | 6 | -19/+22 | |
| | | | | | | | | | | | | | | | This will hopefully allow much caller code to be compiled out. The users (IsParticipant impls) don't generally need to bother with it - they can just ignore it. | |||||
| * | | tor-memquota: Put EnabledToken in various structs, including the reclaimer | Ian Jackson | 2024-08-19 | 3 | -4/+26 | |
| | | | ||||||
| * | | tor-memquota: Allow memory tracking to be compiled out | Ian Jackson | 2024-08-19 | 5 | -6/+43 | |
| | | | | | | | | | | | | | | | Now if we run doctests without the feature enabled, we test that a no-op MemoryQuotaTracker works. Those tests aren't currently run in CI, but they will be after !2350. | |||||
| * | | tor-memquota: Support a no-op MemoryQuotaTracker | Ian Jackson | 2024-08-19 | 4 | -51/+168 | |
| | | | | | | | | | | | | | | | | | | | | | Wrap up most of the structures in IfEnabled. Sadly this diff is very noisy. I experimented with macros for the little enabled check at the start of each function but they didn't really help. We don't test this yet. We'll do a smoke test of this later. | |||||
| * | | tor-memquota: Introduce self_ variables in mtracker.rs (fmt) | Ian Jackson | 2024-08-19 | 1 | -1/+4 | |
| | | | ||||||
| * | | tor-memquota: Introduce self_ variables in mtracker.rs | Ian Jackson | 2024-08-19 | 1 | -48/+69 | |
| | | | | | | | | | | | | | | | | | We're going to bind self_ to something more complicated, in each of these functions, and that's what all these field references etc. will need to refer to. Do this mechanical change first for clarity. | |||||
| * | | tor-memquota: Introduce IfEnabled and EnabledToken | Ian Jackson | 2024-08-19 | 3 | -0/+84 | |
| | | | | | | | | | EnabledToken is pub because it's going to appear in public APIs. | |||||
| * | | tor-memquota: find_in_tracker: Allow internal use of non-unit errors | Ian Jackson | 2024-08-19 | 1 | -6/+6 | |
| | | | ||||||
| * | | tor-memquota: pre-apply rustfmt churn | Ian Jackson | 2024-08-19 | 2 | -4/+14 | |
| |/ | | | | This will make some later diffs easier to read. | |||||
| * | tor-memquota: mq_queue: tests: Replace eprintln with debug | Ian Jackson | 2024-08-15 | 1 | -1/+1 | |
| | | | | | We use `debug!` (tracing logging) everywhere else. Use it here too. | |||||
| * | tor-memquota: mq_queue: tests: fill_and_empty: check balance | Ian Jackson | 2024-08-15 | 1 | -0/+3 | |
| | | ||||||
| * | tor-memquota: mq_queue: tests: break out check_zero_claimed and fix bug | Ian Jackson | 2024-08-15 | 1 | -1/+17 | |
| | | | | | | | | | | | | Each queue has two `Participation`s, not just one. This didn't matter in the `lifecycle` test, because one of the two Participations was never touched since it was cloned, and a fresh clone starts out with a cache of zero. But we're about to reuse this code in a context where both Participations end up with a cache. | |||||
| * | tor-memquota: mq_queue: impl Default for MpscUnboundedSpec | Ian Jackson | 2024-08-15 | 1 | -1/+1 | |
| | | ||||||
| * | tor-memquota: mq_queue: Provide `new` constructors for Specs | Ian Jackson | 2024-08-15 | 2 | -3/+8 | |
| | | | | | | Discussed here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059928 | |||||
| * | tor-memquota: mq_queue: Fix doc for `MpscSpec` | Ian Jackson | 2024-08-15 | 1 | -2/+2 | |
| | | | | | It's not a unit. It's `MpscUnboundedSpec` that's a unit | |||||
| * | tor-memquota: mq_queue: Rename Mpsc to MpscSpec | Ian Jackson | 2024-08-15 | 1 | -12/+12 | |
| | | | | | | | | And MpscUnboundedSpec too. As discussed in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059516 | |||||
