Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
480e5a7
Run centos and debian workflows on push and PR
igchor Nov 2, 2021
c4c7f0b
Introduce FileShmSegment for file-backed shared memory
igchor Oct 20, 2021
bea2653
Adjust and enable tests for ShmFileSegment
igchor Oct 16, 2021
c3c55ce
Add support for shm opts serialization
guptask Oct 27, 2021
751ad14
Initial version of config API extension to support multiple memory tiers
victoria-mcgrath Oct 28, 2021
ece528c
Integrate Memory Tier config API with CacheAllocator.
igchor Oct 30, 2021
808677a
Add MemoryTierCacheConfig::fromShm()
igchor Nov 6, 2021
d0aa09b
Fix test_shm_manager.cpp test
igchor Nov 9, 2021
5ff6576
Run tests on CI
igchor Nov 5, 2021
29760ed
Run long tests (navy/bench) every day on CI
igchor Nov 16, 2021
75858d3
Moved common segment code for posix and file shm segments into ShmCommon
guptask Nov 7, 2021
eea5738
Enabled memory tier config API for cachebench.
victoria-mcgrath Nov 18, 2021
85cd702
Enabled shared memory tier in cachebench.
victoria-mcgrath Nov 23, 2021
f367a77
Converted nvmCacheState_ to std::optional to simplify NVM cache state…
victoria-mcgrath Nov 29, 2021
a825a6d
Run CI on prebuild docker image
igchor Dec 15, 2021
2cfd281
Run only centos build on CI
igchor Dec 15, 2021
cbbc763
Initial multi-tier support implementation
igchor Sep 28, 2021
1d258ba
Extend CompressedPtr to work with multiple tiers
igchor Dec 11, 2021
3258786
Implemented async Item movement between tiers
vinser52 Dec 18, 2021
deaa2b2
Adding example for multitiered cache
vinser52 Dec 9, 2021
dc67a35
Enable workarounds in tests
igchor Dec 24, 2021
c138cbc
Add basic multi-tier test
igchor Dec 30, 2021
feea63f
Set correct size for each memory tier
igchor Dec 30, 2021
873a474
Extend cachbench with value validation
igchor Jan 19, 2022
f11c60c
Aadding new configs to hit_ratio/graph_cache_leader_fobj
vinser52 Jan 27, 2022
08d7659
Move validateValue call to make sure it is measured by latency tracker
igchor Jan 28, 2022
ef50769
Fix eviction flow and removeCb calls
vinser52 Feb 3, 2022
2f10f68
Remove failing build-cachelib workflow (#42)
igchor Feb 7, 2022
83a5de7
Disabled test suite allocator-test-AllocatorTypeTest (#41)
victoria-mcgrath Feb 7, 2022
414ab78
Do not compensate for rounding error when calculating tier sizes (#43)
igchor Feb 8, 2022
cc66f6c
Fixed total cache size in CacheMemoryStats (#38)
victoria-mcgrath Feb 8, 2022
d852b2f
Fix tests and benchmarks compilation
igchor Feb 9, 2022
00dbaea
Update docker file used in CI
igchor Feb 14, 2022
1b217a8
Disable failing clang-format-check
igchor Feb 14, 2022
9b2dd31
Add one more navy test to BLACKLIST
igchor Feb 15, 2022
6989ddf
Fix issue with "Destorying an unresolved handle"
vinser52 Feb 17, 2022
bfeae34
Add extra param to build-package.sh
igchor Apr 8, 2022
852d084
Add scripts for rebuilding/pushing docker images
igchor Apr 8, 2022
f93dc81
Extend CI to rebuild docker automatically
igchor Apr 8, 2022
9e189aa
Update build-cachelib-docker.yml
igchor Apr 27, 2022
cb12145
Added required packages to install Intel ittapi
mcengija Apr 26, 2022
be1deb1
Fix slab release code
igchor Jun 10, 2022
ef6f72e
Shorten critical section in findEviction
igchor Apr 12, 2022
fbd3a4a
critical section inside combined_lock
igchor Jun 13, 2022
1a0fbe6
Extend cachbench with touch value
igchor May 4, 2022
b6c5044
Enable touchValue by default
igchor Jun 15, 2022
e50a45c
Issue75 rebased (#88)
igchor Jul 5, 2022
8ddbe92
Add memory usage statistics for slabs and allocation classes
igchor Jul 6, 2022
370edda
Add option to print memory stats in bytes only
igchor Jul 12, 2022
8f97b48
added per tier pool class rolling average latency
guptask Jul 21, 2022
c9fd02b
fixes for rebase
guptask Aug 11, 2022
0099dc2
fixed the build routines
guptask Aug 23, 2022
9770e45
fixes for test build
guptask Aug 23, 2022
5495ce5
revert 2cacc997b955dd6c448075e6d0ec94d254ad4fbe
guptask Sep 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: build-cachelib-centos-latest
on:
schedule:
- cron: '30 5 * * 1,4'
- cron: '0 7 * * *'

jobs:
build-cachelib-centos8-latest:
name: "CentOS/latest - Build CacheLib with all dependencies"
Expand Down Expand Up @@ -33,3 +34,6 @@ jobs:
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh long
6 changes: 5 additions & 1 deletion .github/workflows/build-cachelib-debian.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: build-cachelib-debian-10
on:
schedule:
- cron: '30 5 * * 2,6'
- cron: '30 5 * * 0,3'

jobs:
build-cachelib-debian-10:
name: "Debian/Buster - Build CacheLib with all dependencies"
Expand Down Expand Up @@ -37,3 +38,6 @@ jobs:
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh
49 changes: 49 additions & 0 deletions .github/workflows/build-cachelib-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build-cachelib-docker
on:
push:
pull_request:

jobs:
build-cachelib-docker:
name: "CentOS/latest - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
env:
REPO: cachelib
GITHUB_REPO: pmem/CacheLib
CONTAINER_REG: ghcr.io/pmem/cachelib
CONTAINER_REG_USER: ${{ secrets.GH_CR_USER }}
CONTAINER_REG_PASS: ${{ secrets.GH_CR_PAT }}
FORCE_IMAGE_ACTION: ${{ secrets.FORCE_IMAGE_ACTION }}
HOST_WORKDIR: ${{ github.workspace }}
WORKDIR: docker
IMG_VER: devel
strategy:
matrix:
CONFIG: ["OS=centos OS_VER=8streams PUSH_IMAGE=1"]
steps:
- name: "System Information"
run: |
echo === uname ===
uname -a
echo === /etc/os-release ===
cat /etc/os-release
echo === df -hl ===
df -hl
echo === free -h ===
free -h
echo === top ===
top -b -n1 -1 -Eg || timeout 1 top -b -n1
echo === env ===
env
echo === gcc -v ===
gcc -v
- name: "checkout sources"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Pull the image or rebuild and push it
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh $FORCE_IMAGE_ACTION

- name: Run the build
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
147 changes: 0 additions & 147 deletions .github/workflows/build-cachelib.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# From: https://github.com/marketplace/actions/clang-format-check#multiple-paths
name: clang-format Check
on: [pull_request]
on: []
jobs:
formatting-check:
name: Formatting Check
Expand Down
2 changes: 2 additions & 0 deletions cachelib/allocator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ if (BUILD_TESTS)
add_test (tests/ChainedHashTest.cpp)
add_test (tests/AllocatorResizeTypeTest.cpp)
add_test (tests/AllocatorHitStatsTypeTest.cpp)
add_test (tests/AllocatorMemoryTiersTest.cpp)
add_test (tests/MemoryTiersTest.cpp)
add_test (tests/MultiAllocatorTest.cpp)
add_test (tests/NvmAdmissionPolicyTest.cpp)
add_test (tests/CacheAllocatorConfigTest.cpp)
Expand Down
6 changes: 6 additions & 0 deletions cachelib/allocator/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
namespace facebook {
namespace cachelib {

CacheBase::CacheBase(unsigned numTiers): numTiers_(numTiers) {}

unsigned CacheBase::getNumTiers() const {
return numTiers_;
}

void CacheBase::setRebalanceStrategy(
PoolId pid, std::shared_ptr<RebalanceStrategy> strategy) {
std::unique_lock<std::mutex> l(lock_);
Expand Down
12 changes: 11 additions & 1 deletion cachelib/allocator/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ enum class DestructorContext {
// A base class of cache exposing members and status agnostic of template type.
class CacheBase {
public:
CacheBase() = default;
CacheBase(unsigned numTiers = 1);
virtual ~CacheBase() = default;

// Movable but not copyable
Expand All @@ -83,6 +83,9 @@ class CacheBase {
CacheBase(CacheBase&&) = default;
CacheBase& operator=(CacheBase&&) = default;

// TODO: come up with some reasonable number
static constexpr unsigned kMaxTiers = 2;

// Get a string referring to the cache name for this cache
virtual const std::string getCacheName() const = 0;

Expand All @@ -100,6 +103,9 @@ class CacheBase {
// @param poolId the pool id
virtual PoolStats getPoolStats(PoolId poolId) const = 0;

virtual AllocationClassBaseStat getAllocationClassStats(
TierId, PoolId pid, ClassId cid) const = 0;

// @param poolId the pool id
virtual AllSlabReleaseEvents getAllSlabReleaseEvents(PoolId poolId) const = 0;

Expand Down Expand Up @@ -278,6 +284,10 @@ class CacheBase {
// @return The number of slabs that were actually reclaimed (<= numSlabs)
virtual unsigned int reclaimSlabs(PoolId id, size_t numSlabs) = 0;

unsigned getNumTiers() const;

unsigned numTiers_ = 1;

// Protect 'poolRebalanceStragtegies_' and `poolResizeStrategies_`
// and `poolOptimizeStrategy_`
mutable std::mutex lock_;
Expand Down
Loading