Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

[RPMP] Integration with RPMP #72

Open
wants to merge 15 commits into
base: wip_rpmp
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
Next Next commit
[CPP] Fix some small bug for running Benchmarks
Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
  • Loading branch information
xuechendi committed May 19, 2020
commit ab0f21fb95ac1648f497e516151bd7b652fab4d1
1 change: 1 addition & 0 deletions rpmp/pmpool/AllocatorProxy.h
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ class AllocatorProxy {
addr = allocators_[index % diskInfos_.size()]->allocate_and_write(
size, content);
}
return addr;
}

int write(uint64_t address, const char *content, uint64_t size) {
1 change: 1 addition & 0 deletions rpmp/pmpool/PmemAllocator.h
Original file line number Diff line number Diff line change
@@ -374,6 +374,7 @@ class PmemObjAllocator : public Allocator {
int free_meta() {
std::lock_guard<std::mutex> l(mtx);
index_map.clear();
return 0;
}

private:
1 change: 1 addition & 0 deletions rpmp/pmpool/Protocol.cc
Original file line number Diff line number Diff line change
@@ -204,6 +204,7 @@ void Protocol::handle_recv_msg(Request *request) {
rrc.address = addr;
rrc.size = rc.size;
rrc.con = rc.con;
networkServer_->get_dram_buffer(&rrc);
RequestReply *requestReply = new RequestReply(rrc);
rrc.ck->ptr = requestReply;
enqueue_finalize_msg(requestReply);
1 change: 1 addition & 0 deletions rpmp/pmpool/client/NetworkClient.cc
Original file line number Diff line number Diff line change
@@ -212,6 +212,7 @@ int NetworkClient::init(RequestHandler *requestHandler) {
}

circularBuffer_ = make_shared<CircularBuffer>(1024 * 1024, 512, false, this);
return 0;
}

void NetworkClient::shutdown() { client_->shutdown(); }
2 changes: 1 addition & 1 deletion rpmp/pmpool/client/PmPoolClient.cc
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ PmPoolClient::PmPoolClient(const string &remote_address,

PmPoolClient::~PmPoolClient() {}

int PmPoolClient::init() { networkClient_->init(requestHandler_.get()); }
int PmPoolClient::init() { return networkClient_->init(requestHandler_.get()); }

void PmPoolClient::begin_tx() {
std::unique_lock<std::mutex> lk(tx_mtx);
1 change: 1 addition & 0 deletions rpmp/pmpool/client/native/com_intel_rpmp_PmPoolClient.cc
Original file line number Diff line number Diff line change
@@ -83,6 +83,7 @@ Java_com_intel_rpmp_PmPoolClient_alloc_1and_1write_1__Ljava_nio_ByteBuffer_2JJ(
client->begin_tx();
uint64_t address = client->write(raw_data, size);
client->end_tx();
return address;
}

JNIEXPORT jlong JNICALL