Jeff Washington (jwash)
e6ca734ac4
disk index: include T on a few structs ( #30983 )
2023-03-30 07:44:50 -07:00
Jeff Washington (jwash)
38e054f4a6
disk bucket: get mut right on get_mut_cell_slice ( #30972 )
2023-03-30 05:19:29 -07:00
Jeff Washington (jwash)
4b7cfa23c1
disk index: introduce IndexEntryPlaceInBucket ( #30944 )
...
* refactor: move data_bucket_from_num_slots
* disk index: introduce IndexEntryPlaceInBucket
* remove <T> from IndexEntryPlaceInBucket
* fix and comment index_bucket_for_testing
2023-03-29 13:41:10 -07:00
Jeff Washington (jwash)
6285aaee89
store data and index occupy in bitvec ( #30899 )
2023-03-28 12:17:28 -07:00
Jeff Washington (jwash)
89bc86f11a
use trait for disk bucket header ( #30875 )
...
* use trait for disk bucket header
* pr feedback
* remove debug and default
* as_mut_ptr
* add comments
* verify slice is large enough
2023-03-27 11:07:02 -07:00
Jeff Washington (jwash)
9f3381c771
disk bucket allocated bit can be not in header ( #30834 )
2023-03-22 15:11:35 -07:00
Jeff Washington (jwash)
4285cb2b84
remove uid concept from disk buckets ( #30836 )
...
* remove uid concept from disk buckets
* remove uid parameter from try_lock
2023-03-22 06:30:44 -07:00
Jeff Washington (jwash)
df2c95119c
add buckets stats for # files and total file size ( #30780 )
...
* add buckets stats for # files and total file size
* change metrics to bytes
* get index file size correct
2023-03-20 08:22:31 -07:00
Jeff Washington (jwash)
d66d1f7a46
disk index handles empty slot list more correctly ( #30752 )
2023-03-16 12:34:45 -07:00
HaoranYi
aa3aa5cc9c
extract max_size stat update for disk buckets ( #29487 )
2023-01-07 09:25:04 -06:00
behzad nouri
5c9beef498
fixes errors from clippy::useless_conversion ( #29534 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
HaoranYi
33b15240ac
Revert #28945 ( #29127 )
...
revert #28945
2022-12-06 17:08:56 -06:00
behzad nouri
401f66c830
patches errors from clippy::seek_to_start_instead_of_rewind
...
https://rust-lang.github.io/rust-clippy/master/index.html#seek_to_start_instead_of_rewind
2022-12-06 19:32:15 +00:00
Haoran Yi
bbd49acb2f
fix merge error
2022-12-06 13:31:50 -06:00
haoran
7a512d7f27
report number of open files
2022-12-06 13:31:50 -06:00
haoran
f716cad4af
don't use procfs as it is not supported on mac and windows.
...
make open_fd stats only on linux platform
2022-12-06 13:31:50 -06:00
haoran
2e078bb42c
alternative impl
2022-12-06 13:31:50 -06:00
haoran
fc97d818b6
share code
2022-12-06 13:31:50 -06:00
haoran
5aadaa4172
clippy
2022-12-06 13:31:50 -06:00
haoran
36dc3a457f
get mmap with wc-l
2022-12-06 13:31:50 -06:00
haoran
75fc87f330
review feedbacks
2022-12-06 13:31:50 -06:00
Haoran Yi
37306f1762
log mmap count
2022-12-06 13:31:50 -06:00
Haoran Yi
703511c3e8
log number of open files when panic
2022-12-06 13:31:50 -06:00
apfitzge
42cc76e33d
use a tempdir in test_bucket_storage ( #28819 )
2022-11-15 14:26:19 -06:00
Jeff Washington (jwash)
4d15e774ee
insert perf improvement on bucket map ( #26754 )
...
perf on bucket map
2022-07-29 13:58:05 -05:00
Jeff Washington (jwash)
2be139ca61
Disk Buckets: cleanup api (is_free) ( #22068 )
2021-12-22 15:12:34 -06:00
Jeff Washington (jwash)
5b464a32f5
Disk Buckets: unlock verifies expected ( #22052 )
2021-12-21 16:35:59 -06:00
Jeff Washington (jwash)
1c0cd2cbb4
DiskBuckets: remove unnecessary atomic on uid ( #22039 )
2021-12-21 15:50:39 -06:00
Jeff Washington (jwash)
b36f7151fc
Disk buckets: abstract UID_UNLOCKED ( #22051 )
2021-12-21 14:51:38 -06:00
Jeff Washington (jwash)
84eaaae062
disk_buckets: factor out unsafe code ( #22028 )
2021-12-21 13:50:04 -06:00
Jeff Washington (jwash)
6374995522
AcctIdx: share bucket map size for perf ( #21935 )
2021-12-16 21:25:54 -06:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Brooks Prumo
839edd35a4
Correctly constrain BucketStorage Header's memory ordering ( #20507 )
2021-10-07 13:32:40 -05:00
Michael Vines
7027d56064
Resolve nightly-2021-10-05 clippy complaints
2021-10-06 10:37:58 -07:00
Jeff Washington (jwash)
18e47ab9f9
AcctIdx: remove duplicate mmap creation ( #20453 )
2021-10-06 00:58:25 +00:00
Jeff Washington (jwash)
6ea96b3274
AcctIdx: grow data buckets to default size on creation ( #20454 )
2021-10-05 19:16:02 -05:00
Jeff Washington (jwash)
d03bf2bbfe
AcctIdx: metrics fixes ( #20449 )
2021-10-05 22:26:29 +00:00
Jeff Washington (jwash)
dc47a56c22
AcctIdx: bucket map grows with read lock ( #20397 )
2021-10-05 09:59:17 -05:00
Jeff Washington (jwash)
cbf427228c
AcctIdx: misc cleanup ( #20398 )
2021-10-04 11:49:20 -05:00
Brooks Prumo
72f5bfbae2
bucket_map: rename num_cells() to capacity() ( #20150 )
2021-09-24 01:08:06 +00:00
Jeff Washington (jwash)
476124de50
AcctIdx: report disk bucket stats ( #20120 )
2021-09-22 18:17:20 -05:00
Brooks Prumo
52de97e280
Add type alias for Uid ( #20075 )
2021-09-21 20:09:04 +00:00
Brooks Prumo
0b6e9d861e
Remove unnecessary cfgs in bucket map ( #20068 )
2021-09-21 19:45:34 +00:00
Brooks Prumo
c88fb6952c
Use a constant for unlocked header uid ( #20048 )
...
Instead of just a literal `0` for UID when the header is unlocked, make a constant to give additional context.
2021-09-21 08:53:26 -05:00
Brooks Prumo
afa04f7abd
Fixup atomic ordering on BucketStorage Header ( #20005 )
...
Lock-type operations should be atomic::acquire, and unlock-type
operations should be atomic::release, so setting that here.
Additionally, change `unlock()` so it cannot fail.
2021-09-20 21:59:41 -05:00
Jeff Washington (jwash)
b2152be3b2
introduce bucket map ( #19848 )
...
* introduce bucket map
* rename BucketMap bits to num_buckets_pow2
* use u64::BITS
* Store the number of buckets in BucketMapConfig as a regular number
* remove redundant type aliases
* use Slot from sdk
* use Arc::clone() instead
* fixup erase drives
* rename num_buckets to max_buckets
* add doc to BucketMapConfig::new()
* add more documentation
* rename to DEFAULT_CAPACITY_POW2
* doc
* add more traits while we can
* rename capacity to capacity_pow2
* fix a naming for max_buckets_pow2
* remove unused/incorrect DataBucket::bytes
* rework benches a bit
* fixup bench docs
* rename create_bucket_capacity_pow2 to bucket_capacity_when_created_pow2
* rename BucketMapKeyValue to BucketItem
* rename to items_in_range
* remove values()
* remove addref and unref
* remove more addref and unref
* resurect addref and unref since tests use 'em for now
* rename to BucketStorage
* move stats in bucket_stats
* remove specializations (i don't think they are needed)
* move MaxSearch and RefCount into lib.rs
* move BucketItem to bucket_item.rs
* add doc
* keys no longer returns an option
* Revert "remove specializations (i don't think they are needed)"
This reverts commit b22f78e072cf0f7107851b08e58c2e3fead3f64d.
Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-09-17 15:11:27 -05:00