已合并
[motor]日志整改 #959
lichunyang创建于 7月15日
[motor]日志整改 #959
已合并
共 39 个文件变更+109-107
| @@ -57,8 +57,8 @@ Result AccTcpLinkComplexDefault::EnqueueAndModifyEpoll(const AccMsgHeader &h, co | |||
| 57 | } | 57 | } |
| 58 | auto result = queue_->EnqueueBack(h, d, cbCtx); | 58 | auto result = queue_->EnqueueBack(h, d, cbCtx); |
| 59 | if (UNLIKELY(result != ACC_OK)) { | 59 | if (UNLIKELY(result != ACC_OK)) { |
| 60 | - LOG_WARN("Failed to enqueue message into link " << this->id_ << ", errorCode:" << result | 60 | + LOG_ERROR("Failed to enqueue message into link " << this->id_ << ", errorCode:" << result |
| 61 | - << ", queue size:" << queue_->GetSize()); | 61 | + << ", queue size:" << queue_->GetSize()); |
| 62 | return result; | 62 | return result; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| @@ -367,7 +367,7 @@ inline Result AccTcpLinkComplexDefault::HandlePollIn() noexcept | |||
| 367 | /* if errno is eagain is normal, need to continue to receive */ | 367 | /* if errno is eagain is normal, need to continue to receive */ |
| 368 | /* else meaning failed to read from socket, socket is error */ | 368 | /* else meaning failed to read from socket, socket is error */ |
| 369 | if (errorNumber != EAGAIN) { | 369 | if (errorNumber != EAGAIN) { |
| 370 | - LOG_WARN("Link " << id_ << " receive header failed, errno " << errorNumber); | 370 | + LOG_WARN("Link " << id_ << " receive header not successful, reason " << errorNumber); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | return (errorNumber == EAGAIN ? ACC_LINK_EAGAIN : ACC_LINK_ERROR); | 373 | return (errorNumber == EAGAIN ? ACC_LINK_EAGAIN : ACC_LINK_ERROR); |
| @@ -390,13 +390,13 @@ inline Result AccTcpLinkComplexDefault::HandlePollIn() noexcept | |||
| 390 | } else { /* ECONNRESET is broken during io, SUCCESS is broken during idle time. */ | 390 | } else { /* ECONNRESET is broken during io, SUCCESS is broken during idle time. */ |
| 391 | const auto errorNumber = errno; // avoid errno writed by log | 391 | const auto errorNumber = errno; // avoid errno writed by log |
| 392 | if (errorNumber == ECONNRESET || errorNumber == 0) { | 392 | if (errorNumber == ECONNRESET || errorNumber == 0) { |
| 393 | - LOG_INFO("Link " << id_ << " receive body failed, reset by peer, errno " << errorNumber); | 393 | + LOG_DEBUG("Link " << id_ << " receive body failed, reset by peer, errno " << errorNumber); |
| 394 | return ACC_LINK_ERROR; /* socket is closed by peer, socket is error */ | 394 | return ACC_LINK_ERROR; /* socket is closed by peer, socket is error */ |
| 395 | } | 395 | } |
| 396 | /* if errno is eagain is normal, need to continue to receive */ | 396 | /* if errno is eagain is normal, need to continue to receive */ |
| 397 | /* else meaning failed to read from socket,socket is error */ | 397 | /* else meaning failed to read from socket,socket is error */ |
| 398 | if (errorNumber != EAGAIN) { | 398 | if (errorNumber != EAGAIN) { |
| 399 | - LOG_ERROR("Link " << id_ << " receive body failed, errno " << errorNumber); | 399 | + LOG_WARN("Link " << id_ << " receive body not successful, reason " << errorNumber); |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | return (errorNumber == EAGAIN ? ACC_LINK_EAGAIN : ACC_LINK_ERROR); | 402 | return (errorNumber == EAGAIN ? ACC_LINK_EAGAIN : ACC_LINK_ERROR); |
| @@ -113,7 +113,7 @@ public: | |||
| 113 | if (errorNumber == EINTR) { /* interrupted */ | 113 | if (errorNumber == EINTR) { /* interrupted */ |
| 114 | continue; | 114 | continue; |
| 115 | } | 115 | } |
| 116 | - LOG_WARN("Failed to send data to " << ipPort_ << ", errno " << errorNumber); | 116 | + LOG_WARN("Unable to send data to " << ipPort_ << ", reason " << errorNumber); |
| 117 | if (g_errnoToReconn.count(errorNumber) > 0) { | 117 | if (g_errnoToReconn.count(errorNumber) > 0) { |
| 118 | return ACC_LINK_NEED_RECONN; | 118 | return ACC_LINK_NEED_RECONN; |
| 119 | } | 119 | } |
| @@ -163,7 +163,7 @@ public: | |||
| 163 | return ACC_OK; | 163 | return ACC_OK; |
| 164 | } | 164 | } |
| 165 | auto errorNumber = errno; | 165 | auto errorNumber = errno; |
| 166 | - LOG_WARN("Failed to send data to " << ipPort_ << ", errno " << errorNumber); | 166 | + src LOG_WARN("Unable to send data to " << ipPort_ << ", reason " << errorNumber); |
| 167 | return -errorNumber; | 167 | return -errorNumber; |
| 168 | } else { | 168 | } else { |
| 169 | for (int32_t i = 0; i < len; i++) { | 169 | for (int32_t i = 0; i < len; i++) { |
| @@ -194,7 +194,7 @@ public: | |||
| 194 | if (errorNumber == EINTR) { /* interrupted */ | 194 | if (errorNumber == EINTR) { /* interrupted */ |
| 195 | continue; | 195 | continue; |
| 196 | } | 196 | } |
| 197 | - LOG_WARN("Failed to read data from " << ipPort_ << ", errno " << errorNumber); | 197 | + LOG_WARN("Unable to read data from " << ipPort_ << ", reason " << errorNumber); |
| 198 | if (g_errnoToReconn.count(errorNumber) > 0) { | 198 | if (g_errnoToReconn.count(errorNumber) > 0) { |
| 199 | return ACC_LINK_NEED_RECONN; | 199 | return ACC_LINK_NEED_RECONN; |
| 200 | } | 200 | } |
| @@ -248,7 +248,7 @@ public: | |||
| 248 | return ACC_OK; | 248 | return ACC_OK; |
| 249 | } | 249 | } |
| 250 | auto errorNumber = errno; | 250 | auto errorNumber = errno; |
| 251 | - LOG_WARN("Failed to receive data from " << ipPort_ << ", errno " << errorNumber); | 251 | + LOG_WARN("Unable to receive data from " << ipPort_ << ", reason " << errorNumber); |
| 252 | return -errorNumber; | 252 | return -errorNumber; |
| 253 | } else { | 253 | } else { |
| 254 | for (int32_t i = 0; i < len; i++) { | 254 | for (int32_t i = 0; i < len; i++) { |
| @@ -158,7 +158,7 @@ void AccTcpListener::RunInThread() noexcept | |||
| 158 | socklen_t len = sizeof(addressIn); | 158 | socklen_t len = sizeof(addressIn); |
| 159 | auto fd = ::accept(listenFd_, reinterpret_cast<struct sockaddr *>(&addressIn), &len); | 159 | auto fd = ::accept(listenFd_, reinterpret_cast<struct sockaddr *>(&addressIn), &len); |
| 160 | if (fd < 0) { | 160 | if (fd < 0) { |
| 161 | - LOG_WARN("Failed to accept on new socket with " << strerror(errno) << ", ignore and continue"); | 161 | + LOG_WARN("Unable to accept on new socket with " << strerror(errno) << ", ignore and continue"); |
| 162 | continue; | 162 | continue; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| @@ -231,7 +231,7 @@ void AccTcpListener::ProcessNewConnection(int fd, struct sockaddr_in addressIn) | |||
| 231 | // newLink作为智能指针 异常分支返回时会自动析构释放资源 | 231 | // newLink作为智能指针 异常分支返回时会自动析构释放资源 |
| 232 | auto result = connHandler_(req, newLink.Get()); | 232 | auto result = connHandler_(req, newLink.Get()); |
| 233 | if (result != ACC_OK) { | 233 | if (result != ACC_OK) { |
| 234 | - LOG_INFO("ProcessNewConnection: connHandler_ non-ok, send error resp result=" << result); | 234 | + LOG_WARN("ProcessNewConnection: connHandler_ non-ok, send error resp result=" << result); |
| 235 | AccConnResp resp; | 235 | AccConnResp resp; |
| 236 | resp.result = static_cast<int16_t>(result); | 236 | resp.result = static_cast<int16_t>(result); |
| 237 | (void)::send(fd, &resp, sizeof(resp), 0); | 237 | (void)::send(fd, &resp, sizeof(resp), 0); |
| @@ -242,7 +242,7 @@ void AccTcpListener::ProcessNewConnection(int fd, struct sockaddr_in addressIn) | |||
| 242 | resp.result = 0; | 242 | resp.result = 0; |
| 243 | auto sent = newLink->BlockSend(reinterpret_cast<void *>(&resp), sizeof(resp)); | 243 | auto sent = newLink->BlockSend(reinterpret_cast<void *>(&resp), sizeof(resp)); |
| 244 | if (sent != ACC_OK) { | 244 | if (sent != ACC_OK) { |
| 245 | - LOG_WARN("Failed to connect response to " << ipPort); | 245 | + LOG_WARN("Unable to connect response to " << ipPort); |
| 246 | } | 246 | } |
| 247 | } | 247 | } |
| 248 | } // namespace acc | 248 | } // namespace acc |
| @@ -133,7 +133,7 @@ void AccTcpWorker::SetPropertiesForThread() | |||
| 133 | CPU_ZERO(&(cpuSet)); | 133 | CPU_ZERO(&(cpuSet)); |
| 134 | CPU_SET(options_.cpuId, &(cpuSet)); | 134 | CPU_SET(options_.cpuId, &(cpuSet)); |
| 135 | if (pthread_setaffinity_np(pthread_self(), sizeof(cpuSet), &(cpuSet)) != 0) { | 135 | if (pthread_setaffinity_np(pthread_self(), sizeof(cpuSet), &(cpuSet)) != 0) { |
| 136 | - LOG_WARN("Failed to bind worker " << options_.Name() << " to cpu " << options_.cpuId); | 136 | + LOG_WARN("Unable to bind worker " << options_.Name() << " to cpu " << options_.cpuId); |
| 137 | } | 137 | } |
| 138 | } | 138 | } |
| 139 | 139 | ||
| @@ -142,7 +142,7 @@ void AccTcpWorker::SetPropertiesForThread() | |||
| 142 | 142 | ||
| 143 | if (options_.threadPriority != 0) { | 143 | if (options_.threadPriority != 0) { |
| 144 | if (setpriority(PRIO_PROCESS, 0, options_.threadPriority) != 0) { | 144 | if (setpriority(PRIO_PROCESS, 0, options_.threadPriority) != 0) { |
| 145 | - LOG_WARN("Failed to set thread priority of worker " << options_.Name() << ", errno:" << errno); | 145 | + LOG_WARN("Unable to set thread priority of worker " << options_.Name() << ":" << errno); |
| 146 | } | 146 | } |
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| @@ -412,9 +412,9 @@ int AccTcpSslHelper::ProcessCrlAndVerifyCert(std::vector<std::string> paths, X50 | |||
| 412 | 412 | ||
| 413 | auto verifyResult = OpenSslApiWrapper::X509VerifyCert(x509ctx); | 413 | auto verifyResult = OpenSslApiWrapper::X509VerifyCert(x509ctx); |
| 414 | if (verifyResult != 1U) { | 414 | if (verifyResult != 1U) { |
| 415 | - LOG_INFO("Verify failed in callback" | 415 | + LOG_ERROR("Verify failed in callback" |
| 416 | - << " error: " | 416 | + << " error: " |
| 417 | - << OpenSslApiWrapper::X509VerifyCertErrorString(OpenSslApiWrapper::X509StoreCtxGetError(x509ctx))); | 417 | + << OpenSslApiWrapper::X509VerifyCertErrorString(OpenSslApiWrapper::X509StoreCtxGetError(x509ctx))); |
| 418 | return checkFailed; | 418 | return checkFailed; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| @@ -457,7 +457,7 @@ AccResult AccTcpSslHelper::CertVerify(X509 *cert) const | |||
| 457 | for (const auto &crlPath : tlsCrlPaths) { | 457 | for (const auto &crlPath : tlsCrlPaths) { |
| 458 | X509_CRL *crl = LoadCertRevokeListFile(crlPath.c_str()); | 458 | X509_CRL *crl = LoadCertRevokeListFile(crlPath.c_str()); |
| 459 | if (crl == nullptr) { | 459 | if (crl == nullptr) { |
| 460 | - LOG_WARN("Failed to load cert revocation list: " << crlPath); | 460 | + LOG_WARN("Unable to load cert revocation list: " << crlPath); |
| 461 | continue; | 461 | continue; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| @@ -516,7 +516,7 @@ AccResult AccTcpSslHelper::CheckCertExpiredTask() | |||
| 516 | 516 | ||
| 517 | auto ret = HandleCertExpiredCheck(); | 517 | auto ret = HandleCertExpiredCheck(); |
| 518 | if (ret != ACC_OK) { | 518 | if (ret != ACC_OK) { |
| 519 | - LOG_WARN("Failed to handle cert expired check"); | 519 | + LOG_WARN("Unable to handle cert expired check"); |
| 520 | } | 520 | } |
| 521 | } | 521 | } |
| 522 | } | 522 | } |
| @@ -158,12 +158,12 @@ typedef struct { | |||
| 158 | } \ | 158 | } \ |
| 159 | } while (0) | 159 | } while (0) |
| 160 | 160 | ||
| 161 | -#define DL_LOAD_SYM_OPTIONAL(TARGET_FUNC_VAR, TARGET_FUNC_TYPE, FILE_HANDLE, SYMBOL_NAME) \ | 161 | +#define DL_LOAD_SYM_OPTIONAL(TARGET_FUNC_VAR, TARGET_FUNC_TYPE, FILE_HANDLE, SYMBOL_NAME) \ |
| 162 | - do { \ | 162 | + do { \ |
| 163 | - TARGET_FUNC_VAR = (TARGET_FUNC_TYPE)dlsym(FILE_HANDLE, SYMBOL_NAME); \ | 163 | + TARGET_FUNC_VAR = (TARGET_FUNC_TYPE)dlsym(FILE_HANDLE, SYMBOL_NAME); \ |
| 164 | - if ((TARGET_FUNC_VAR) == nullptr) { \ | 164 | + if ((TARGET_FUNC_VAR) == nullptr) { \ |
| 165 | - BM_LOG_WARN("Failed to call dlsym to load " << (SYMBOL_NAME) << ", error: " << dlerror()); \ | 165 | + BM_LOG_WARN("Unable to call dlsym to load " << (SYMBOL_NAME) << ", reason: " << dlerror()); \ |
| 166 | - } \ | 166 | + } \ |
| 167 | } while (0) | 167 | } while (0) |
| 168 | 168 | ||
| 169 | #define DL_LOAD_SYM_ALT(TARGET_FUNC_VAR, TARGET_FUNC_TYPE, FILE_HANDLE, SYMBOL_NAME, SYMBOL_NAME_ALT) \ | 169 | #define DL_LOAD_SYM_ALT(TARGET_FUNC_VAR, TARGET_FUNC_TYPE, FILE_HANDLE, SYMBOL_NAME, SYMBOL_NAME_ALT) \ |
| @@ -46,7 +46,7 @@ Result HostDataOpRDMA::Initialize() noexcept | |||
| 46 | rdmaSwapBaseAddr_ = | 46 | rdmaSwapBaseAddr_ = |
| 47 | mmap(nullptr, rdmaSwapSpaceSize_, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1, 0); | 47 | mmap(nullptr, rdmaSwapSpaceSize_, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1, 0); |
| 48 | if (rdmaSwapBaseAddr_ == MAP_FAILED) { | 48 | if (rdmaSwapBaseAddr_ == MAP_FAILED) { |
| 49 | - BM_LOG_WARN("Failed to alloc with huge page, size:" << rdmaSwapSpaceSize_ << " error:" << errno << ", " | 49 | + BM_LOG_WARN("Unable to alloc with huge page, size:" << rdmaSwapSpaceSize_ << " error:" << errno << ", " |
| 50 | << SafeStrError(errno) | 50 | << SafeStrError(errno) |
| 51 | << ". fallback to mmap with regular pagesize"); | 51 | << ". fallback to mmap with regular pagesize"); |
| 52 | rdmaSwapBaseAddr_ = | 52 | rdmaSwapBaseAddr_ = |
| @@ -146,7 +146,7 @@ void HostDataOpRDMA::PreRegisterLocalMr(hybm_copy_params ¶ms, hybm_data_copy | |||
| 146 | 146 | ||
| 147 | auto ret = transportManager_->RegisterMemoryRegion(mr); | 147 | auto ret = transportManager_->RegisterMemoryRegion(mr); |
| 148 | if (ret != BM_OK) { | 148 | if (ret != BM_OK) { |
| 149 | - BM_LOG_WARN("Failed to pre register host rdma mr, addr:" << (void *)mr.addr << " size: " << mr.size); | 149 | + BM_LOG_WARN("Unable to pre register host rdma mr, addr:" << (void *)mr.addr << " size: " << mr.size); |
| 150 | } | 150 | } |
| 151 | } | 151 | } |
| 152 | 152 | ||
| @@ -147,7 +147,7 @@ static bool TryUpdateGvaHeap(uint64_t va, size_t len) | |||
| 147 | static int32_t RemoveInGvaHeap(uint64_t va) | 147 | static int32_t RemoveInGvaHeap(uint64_t va) |
| 148 | { | 148 | { |
| 149 | if (!g_gvaHeapMgr.inited) { | 149 | if (!g_gvaHeapMgr.inited) { |
| 150 | - BM_LOG_WARN("remove record in gva heap failed, gva heap not init."); | 150 | + BM_LOG_WARN("unable to remove record in gva heap, gva heap not init."); |
| 151 | return -1; | 151 | return -1; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| @@ -747,7 +747,7 @@ int32_t MemEntityDefault::RemoveImported(const std::vector<uint32_t> &ranks) noe | |||
| 747 | if (transportManager_ != nullptr) { | 747 | if (transportManager_ != nullptr) { |
| 748 | auto ret = transportManager_->RemoveRanks(ranks); | 748 | auto ret = transportManager_->RemoveRanks(ranks); |
| 749 | if (ret != BM_OK) { | 749 | if (ret != BM_OK) { |
| 750 | - BM_LOG_WARN("transport remove ranks failed: " << ret); | 750 | + BM_LOG_WARN("unable to transport remove ranks : " << ret); |
| 751 | } | 751 | } |
| 752 | } | 752 | } |
| 753 | 753 | ||
| @@ -99,7 +99,7 @@ HYBM_API int32_t hybm_init(uint16_t deviceId, uint64_t flags) | |||
| 99 | ptracer_config_t config{.tracerType = 1, .dumpFilePath = "/var/log/memfabric_hybrid"}; | 99 | ptracer_config_t config{.tracerType = 1, .dumpFilePath = "/var/log/memfabric_hybrid"}; |
| 100 | auto ret = ptracer_init(&config); | 100 | auto ret = ptracer_init(&config); |
| 101 | if (ret != BM_OK) { | 101 | if (ret != BM_OK) { |
| 102 | - BM_LOG_WARN("init ptracer module failed, result: " << ret << ", error msg: " << ptracer_get_last_err_msg()); | 102 | + BM_LOG_WARN("init ptracer module not successful, result: " << ret << ", msg: " << ptracer_get_last_err_msg()); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | ret = hybm_init_hbm_gva(deviceId, flags, g_baseAddr, DlAclApi::GetAscendSocType(), &g_allocHandle); | 105 | ret = hybm_init_hbm_gva(deviceId, flags, g_baseAddr, DlAclApi::GetAscendSocType(), &g_allocHandle); |
| @@ -437,14 +437,14 @@ void *HybmConnBasedSegment::AllocMemory(void *sliceAddr, uint64_t lvOffset, uint | |||
| 437 | allocMethod = MemAllocMethod::MMAP; | 437 | allocMethod = MemAllocMethod::MMAP; |
| 438 | return mapped; | 438 | return mapped; |
| 439 | } | 439 | } |
| 440 | - BM_LOG_WARN("Failed to alloc size:" << size << " with hugepage via mmap, error: " << errno << ", " | 440 | + BM_LOG_WARN("Unable to alloc size:" << size << " with hugepage via mmap, error: " << errno << ", " |
| 441 | << SafeStrError(errno) | 441 | << SafeStrError(errno) |
| 442 | << ". Use 'grep -i huge /proc/meminfo' to check hugepages, " | 442 | << ". Use 'grep -i huge /proc/meminfo' to check hugepages, " |
| 443 | "and use 'echo <page_num> > /proc/sys/vm/nr_hugepages' to set hugepages."); | 443 | "and use 'echo <page_num> > /proc/sys/vm/nr_hugepages' to set hugepages."); |
| 444 | 444 | ||
| 445 | // 2. try to alloc DRAM with hugepage via halMemAlloc | 445 | // 2. try to alloc DRAM with hugepage via halMemAlloc |
| 446 | if (options_.enable56BitsGva && options_.shmFd < 0) { | 446 | if (options_.enable56BitsGva && options_.shmFd < 0) { |
| 447 | - BM_LOG_WARN("Trying halMemAlloc for DRAM hugepage allocation. " << "size:" << size); | 447 | + BM_LOG_WARN("Trying halMemAlloc for DRAM hugepage allocation. size:" << size); |
| 448 | 448 | ||
| 449 | // Use halMemAlloc to allocate DRAM huge page memory on host | 449 | // Use halMemAlloc to allocate DRAM huge page memory on host |
| 450 | // Flag: MEM_HOST (host memory) | MEM_TYPE_DDR (DDR/DRAM) | MEM_PAGE_HUGE (2MB huge page) | 450 | // Flag: MEM_HOST (host memory) | MEM_TYPE_DDR (DDR/DRAM) | MEM_PAGE_HUGE (2MB huge page) |
| @@ -457,8 +457,8 @@ void *HybmConnBasedSegment::AllocMemory(void *sliceAddr, uint64_t lvOffset, uint | |||
| 457 | 457 | ||
| 458 | int ret = DlHalApi::HalMemAlloc(&halAllocPtr, size, allocFlag); | 458 | int ret = DlHalApi::HalMemAlloc(&halAllocPtr, size, allocFlag); |
| 459 | if (ret != 0 || halAllocPtr == nullptr) { | 459 | if (ret != 0 || halAllocPtr == nullptr) { |
| 460 | - BM_LOG_WARN("halMemAlloc failed, ret:" << ret << " ptr:" << halAllocPtr << ". Cannot allocate " << size | 460 | + BM_LOG_WARN("halMemAlloc not successful, ret:" << ret << " ptr:" << halAllocPtr << ". Cannot allocate " |
| 461 | - << " bytes DRAM huge page memory"); | 461 | + << size << " bytes DRAM huge page memory"); |
| 462 | } else { | 462 | } else { |
| 463 | allocMethod = MemAllocMethod::HAL_MEM_ALLOC; | 463 | allocMethod = MemAllocMethod::HAL_MEM_ALLOC; |
| 464 | BM_LOG_INFO("Successfully allocated DRAM hugepage via halMemAlloc. " | 464 | BM_LOG_INFO("Successfully allocated DRAM hugepage via halMemAlloc. " |
| @@ -295,7 +295,7 @@ void HybmDevUserLegacySegment::RemoveSliceInfo(const uint32_t rankId) noexcept | |||
| 295 | << ", sliceInfo.rankId=" << sliceInfo.rankId); | 295 | << ", sliceInfo.rankId=" << sliceInfo.rankId); |
| 296 | auto ret = DlAclApi::RtIpcCloseMemory(address); | 296 | auto ret = DlAclApi::RtIpcCloseMemory(address); |
| 297 | if (ret != 0) { | 297 | if (ret != 0) { |
| 298 | - BM_LOG_WARN("Failed to close memory, address=" | 298 | + BM_LOG_WARN("Unable to close memory, address=" |
| 299 | << address << ", vAddress_" | 299 | << address << ", vAddress_" |
| 300 | << reinterpret_cast<void *>(static_cast<ptrdiff_t>(remoteSlice->vAddress_)) | 300 | << reinterpret_cast<void *>(static_cast<ptrdiff_t>(remoteSlice->vAddress_)) |
| 301 | << ", deviceId=" << devicePhyId_ << ", sliceInfo.devicePhyId=" << sliceInfo.devicePhyId | 301 | << ", deviceId=" << devicePhyId_ << ", sliceInfo.devicePhyId=" << sliceInfo.devicePhyId |
| @@ -452,7 +452,7 @@ void HybmDevUserLegacySegment::CloseMemory() noexcept | |||
| 452 | { | 452 | { |
| 453 | for (auto &addr : registerAddrs_) { | 453 | for (auto &addr : registerAddrs_) { |
| 454 | if (DlAclApi::RtIpcCloseMemory(addr) != 0) { | 454 | if (DlAclApi::RtIpcCloseMemory(addr) != 0) { |
| 455 | - BM_LOG_WARN("Failed to close memory. This may affect future memory registration."); | 455 | + BM_LOG_WARN("Unable to close memory. This may affect future memory registration."); |
| 456 | } | 456 | } |
| 457 | } | 457 | } |
| 458 | for (auto &it : registerSlices_) { | 458 | for (auto &it : registerSlices_) { |
| @@ -43,7 +43,7 @@ bool IsHugetlbfsMounted() noexcept | |||
| 43 | { | 43 | { |
| 44 | struct statfs fsInfo {}; | 44 | struct statfs fsInfo {}; |
| 45 | if (statfs(HOST_SHM_HUGEPAGE_DIR, &fsInfo) != 0) { | 45 | if (statfs(HOST_SHM_HUGEPAGE_DIR, &fsInfo) != 0) { |
| 46 | - BM_LOG_WARN("Failed to access hugepage dir " << HOST_SHM_HUGEPAGE_DIR << " error:" << errno << ", " | 46 | + BM_LOG_WARN("Unable to access hugepage dir " << HOST_SHM_HUGEPAGE_DIR << " reason:" << errno << ", " |
| 47 | << SafeStrError(errno) << ", will fallback to /dev/shm"); | 47 | << SafeStrError(errno) << ", will fallback to /dev/shm"); |
| 48 | return false; | 48 | return false; |
| 49 | } | 49 | } |
| @@ -59,7 +59,7 @@ bool HasAvailableHugePages() noexcept | |||
| 59 | { | 59 | { |
| 60 | std::ifstream memInfoFile("/proc/meminfo"); | 60 | std::ifstream memInfoFile("/proc/meminfo"); |
| 61 | if (!memInfoFile.is_open()) { | 61 | if (!memInfoFile.is_open()) { |
| 62 | - BM_LOG_WARN("Failed to open /proc/meminfo, will fallback to /dev/shm"); | 62 | + BM_LOG_WARN("Unable to open /proc/meminfo, will fallback to /dev/shm"); |
| 63 | return false; | 63 | return false; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -84,7 +84,7 @@ bool HasAvailableHugePages() noexcept | |||
| 84 | return true; | 84 | return true; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | - BM_LOG_WARN("Failed to parse HugePages_Free from /proc/meminfo, will fallback to /dev/shm"); | 87 | + BM_LOG_WARN("Unable to parse HugePages_Free from /proc/meminfo, will fallback to /dev/shm"); |
| 88 | return false; | 88 | return false; |
| 89 | } | 89 | } |
| 90 | } // namespace | 90 | } // namespace |
| @@ -123,7 +123,7 @@ void HybmVaManager::RemoveOneVaInfo(uint64_t va, uint32_t type) | |||
| 123 | std::unique_lock<std::shared_mutex> lock(mutex_); | 123 | std::unique_lock<std::shared_mutex> lock(mutex_); |
| 124 | auto it = allocatedMap_[type].find(va); | 124 | auto it = allocatedMap_[type].find(va); |
| 125 | if (it == allocatedMap_[type].end()) { | 125 | if (it == allocatedMap_[type].end()) { |
| 126 | - BM_LOG_WARN("RemoveOneVaInfo failed: address not found. va=" << VaToStr(va) << " type=" << type); | 126 | + BM_LOG_WARN("Unable to RemoveOneVaInfo: address not found. va=" << VaToStr(va) << " type=" << type); |
| 127 | return; | 127 | return; |
| 128 | } | 128 | } |
| 129 | const AllocatedGvaInfo &info = it->second; | 129 | const AllocatedGvaInfo &info = it->second; |
| @@ -434,13 +434,13 @@ uint64_t HybmVaManager::AllocReserveLvaInner(uint32_t localRankId, uint64_t size | |||
| 434 | void HybmVaManager::FreeReserveGva(uint64_t addr) | 434 | void HybmVaManager::FreeReserveGva(uint64_t addr) |
| 435 | { | 435 | { |
| 436 | if (addr == 0) { | 436 | if (addr == 0) { |
| 437 | - BM_LOG_WARN("FreeReserveGva failed: invalid addr=0"); | 437 | + BM_LOG_WARN("Unable to FreeReserveGva: invalid addr=0"); |
| 438 | return; | 438 | return; |
| 439 | } | 439 | } |
| 440 | std::unique_lock<std::shared_mutex> lock(mutex_); | 440 | std::unique_lock<std::shared_mutex> lock(mutex_); |
| 441 | auto it = reservedMap_[HVM_GVA].find(addr); | 441 | auto it = reservedMap_[HVM_GVA].find(addr); |
| 442 | if (it == reservedMap_[HVM_GVA].end()) { | 442 | if (it == reservedMap_[HVM_GVA].end()) { |
| 443 | - BM_LOG_WARN("FreeReserveGva failed: reserved space not found at addr=" << VaToStr(addr)); | 443 | + BM_LOG_WARN("Unable to FreeReserveGva: reserved space not found at addr=" << VaToStr(addr)); |
| 444 | return; | 444 | return; |
| 445 | } | 445 | } |
| 446 | const ReservedGvaInfo &info = it->second; | 446 | const ReservedGvaInfo &info = it->second; |
| @@ -454,7 +454,7 @@ void HybmVaManager::FreeReserveGva(uint64_t addr) | |||
| 454 | void HybmVaManager::FreeReserveLva(uint64_t addr, uint32_t type) | 454 | void HybmVaManager::FreeReserveLva(uint64_t addr, uint32_t type) |
| 455 | { | 455 | { |
| 456 | if (addr == 0 || (type != HVM_DVA && type != HVM_HVA)) { | 456 | if (addr == 0 || (type != HVM_DVA && type != HVM_HVA)) { |
| 457 | - BM_LOG_WARN("FreeReserveLva failed: invalid addr:" << addr << ", type:" << type); | 457 | + BM_LOG_WARN("Unable to FreeReserveLva: invalid addr:" << addr << ", type:" << type); |
| 458 | return; | 458 | return; |
| 459 | } | 459 | } |
| 460 | std::unique_lock<std::shared_mutex> lock(mutex_); | 460 | std::unique_lock<std::shared_mutex> lock(mutex_); |
| @@ -29,9 +29,9 @@ HybmVmmBasedSegment::~HybmVmmBasedSegment() | |||
| 29 | 29 | ||
| 30 | auto ret = UnReserveMemorySpace(); | 30 | auto ret = UnReserveMemorySpace(); |
| 31 | if (ret != BM_OK) { | 31 | if (ret != BM_OK) { |
| 32 | - BM_LOG_WARN("Destructor cleanup failed, ret:" << ret | 32 | + BM_LOG_WARN("Destructor unable to cleanup, ret:" << ret |
| 33 | - << " gva:" << reinterpret_cast<void *>(globalVirtualAddress_) | 33 | + << " gva:" << reinterpret_cast<void *>(globalVirtualAddress_) |
| 34 | - << " va:" << reinterpret_cast<void *>(localVirtualAddress_)); | 34 | + << " va:" << reinterpret_cast<void *>(localVirtualAddress_)); |
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| 37 | 37 | ||
| @@ -110,7 +110,7 @@ Result HybmVmmBasedSegment::UnReserveMemorySpace() noexcept | |||
| 110 | auto slice = slices_.begin()->second.slice; | 110 | auto slice = slices_.begin()->second.slice; |
| 111 | auto ret = ReleaseSliceMemory(slice); | 111 | auto ret = ReleaseSliceMemory(slice); |
| 112 | if (ret != BM_OK) { | 112 | if (ret != BM_OK) { |
| 113 | - BM_LOG_WARN("ReleaseSliceMemory failed during unreserve, ret:" << ret << " slice:" << slice); | 113 | + BM_LOG_WARN("Unable to ReleaseSliceMemory during unreserve, ret:" << ret << " slice:" << slice); |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | while (!registerSlices_.empty()) { | 116 | while (!registerSlices_.empty()) { |
| @@ -123,7 +123,7 @@ Result HybmVmmBasedSegment::UnReserveMemorySpace() noexcept | |||
| 123 | auto ret = DlHalApi::HalMemAddressFree(lva); | 123 | auto ret = DlHalApi::HalMemAddressFree(lva); |
| 124 | BM_LOG_INFO("free reserved address va:" << lva << " return:" << ret); | 124 | BM_LOG_INFO("free reserved address va:" << lva << " return:" << ret); |
| 125 | if (ret != BM_OK) { | 125 | if (ret != BM_OK) { |
| 126 | - BM_LOG_WARN("HalMemAddressFree failed, keep reserved VA state. ret:" | 126 | + BM_LOG_WARN("Unable to HalMemAddressFree, keep reserved VA state. ret:" |
| 127 | << ret << " gva:" << reinterpret_cast<void *>(globalVirtualAddress_) << " va:" << lva); | 127 | << ret << " gva:" << reinterpret_cast<void *>(globalVirtualAddress_) << " va:" << lva); |
| 128 | } | 128 | } |
| 129 | } | 129 | } |
| @@ -187,7 +187,7 @@ Result HybmVmmBasedSegment::MallocFromHost(size_t size, uint32_t devId, drv_mem_ | |||
| 187 | } | 187 | } |
| 188 | int32_t ret = HalMemCreateAdapterFromHost(size, handle, prop); | 188 | int32_t ret = HalMemCreateAdapterFromHost(size, handle, prop); |
| 189 | if (ret == HAL_OUT_OF_MEMORY_ERROR && prop.pg_type == MEM_GIANT_PAGE_TYPE) { | 189 | if (ret == HAL_OUT_OF_MEMORY_ERROR && prop.pg_type == MEM_GIANT_PAGE_TYPE) { |
| 190 | - BM_LOG_INFO("Try HalMemCreate use 1GB page failed, ret:" << ret << ", than try 2MB page"); | 190 | + BM_LOG_WARN("Try HalMemCreate use 1GB page not successful, ret:" << ret << ", than try 2MB page"); |
| 191 | prop.pg_type = MEM_HUGE_PAGE_TYPE; | 191 | prop.pg_type = MEM_HUGE_PAGE_TYPE; |
| 192 | ret = HalMemCreateAdapterFromHost(size, handle, prop); | 192 | ret = HalMemCreateAdapterFromHost(size, handle, prop); |
| 193 | } | 193 | } |
| @@ -221,7 +221,7 @@ Result ComposeTransportManager::QueryMemoryKey(uint64_t addr, TransportMemoryKey | |||
| 221 | TransportMemoryKey tmp{}; | 221 | TransportMemoryKey tmp{}; |
| 222 | auto ret = hostTransportManager_->QueryMemoryKey(addr, tmp); | 222 | auto ret = hostTransportManager_->QueryMemoryKey(addr, tmp); |
| 223 | if (ret != BM_OK) { | 223 | if (ret != BM_OK) { |
| 224 | - BM_LOG_WARN("Failed to query host transport memKey addr:" << std::hex << addr); | 224 | + BM_LOG_WARN("Unable to query host transport memKey addr:" << std::hex << addr); |
| 225 | // HCOM 无法处理HBM池,这里直接返回,兼容即开启HBM池又要走HCOM通信的场景 | 225 | // HCOM 无法处理HBM池,这里直接返回,兼容即开启HBM池又要走HCOM通信的场景 |
| 226 | } | 226 | } |
| 227 | WriteHcomMemoryKey(tmp, key); | 227 | WriteHcomMemoryKey(tmp, key); |
| @@ -1121,9 +1121,9 @@ int RdmaIndirectTransportManager::ConnectToRemote(const std::string &nic, uint32 | |||
| 1121 | ret = connect(sockfd, serverAddr, addrLen); | 1121 | ret = connect(sockfd, serverAddr, addrLen); |
| 1122 | if (ret < 0) { | 1122 | if (ret < 0) { |
| 1123 | if (i < MAX_RETRIES - 1) { | 1123 | if (i < MAX_RETRIES - 1) { |
| 1124 | - BM_LOG_WARN("connect attempt " << (i + 1) << " failed, localRankId: " << localRankId | 1124 | + BM_LOG_WARN("unable to connect attempt " << (i + 1) << " , localRankId: " << localRankId |
| 1125 | - << ", remoteRankId: " << remoteRankId << ", retrying in " | 1125 | + << ", remoteRankId: " << remoteRankId << ", retrying in " |
| 1126 | - << RETRY_DELAY_MS << "ms, nic:" << nic); | 1126 | + << RETRY_DELAY_MS << "ms, nic:" << nic); |
| 1127 | std::this_thread::sleep_for(std::chrono::milliseconds(RETRY_DELAY_MS)); | 1127 | std::this_thread::sleep_for(std::chrono::milliseconds(RETRY_DELAY_MS)); |
| 1128 | } | 1128 | } |
| 1129 | } | 1129 | } |
| @@ -606,7 +606,7 @@ bool RdmaTransportManager::RaInit(uint32_t deviceId) | |||
| 606 | std::this_thread::sleep_for(WAIT_TIME); // avoid hccl init conflict | 606 | std::this_thread::sleep_for(WAIT_TIME); // avoid hccl init conflict |
| 607 | auto ret = DlHccpApi::RaInit(initConfig); | 607 | auto ret = DlHccpApi::RaInit(initConfig); |
| 608 | if (ret != 0) { | 608 | if (ret != 0) { |
| 609 | - BM_LOG_WARN("Hccp Init RA failed: " << ret << " devid:" << deviceId); | 609 | + BM_LOG_ERROR("Hccp Init RA failed: " << ret << " devid:" << deviceId); |
| 610 | std::this_thread::sleep_for(WAIT_TIME); | 610 | std::this_thread::sleep_for(WAIT_TIME); |
| 611 | raInitialized = false; | 611 | raInitialized = false; |
| 612 | return false; | 612 | return false; |
| @@ -572,7 +572,7 @@ void FixedRanksQpManager::CloseConnections(std::unordered_map<uint32_t, AiCoreCo | |||
| 572 | if (it->second.qpHandle != nullptr) { | 572 | if (it->second.qpHandle != nullptr) { |
| 573 | auto ret = DlHccpApi::RaQpDestroy(it->second.qpHandle); | 573 | auto ret = DlHccpApi::RaQpDestroy(it->second.qpHandle); |
| 574 | if (ret != 0) { | 574 | if (ret != 0) { |
| 575 | - BM_LOG_WARN("destroy AI QP to server: " << it->first << " failed: " << ret); | 575 | + BM_LOG_WARN("unable to destroy AI QP to server: " << it->first << " ret: " << ret); |
| 576 | } | 576 | } |
| 577 | it->second.qpHandle = nullptr; | 577 | it->second.qpHandle = nullptr; |
| 578 | } | 578 | } |
| @@ -165,7 +165,7 @@ bool AsyncSocketQueue::Start() noexcept | |||
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | if (CreateEpollSocket() != BM_OK) { | 167 | if (CreateEpollSocket() != BM_OK) { |
| 168 | - BM_LOG_WARN("CreateEpollSocket failed."); | 168 | + BM_LOG_ERROR("CreateEpollSocket failed."); |
| 169 | return false; | 169 | return false; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| @@ -152,7 +152,7 @@ void JoinableRanksQpManager::PutQpHandle(UserQpInfo *qp) const noexcept | |||
| 152 | if (val == 1U) { // 返回减之前的值 | 152 | if (val == 1U) { // 返回减之前的值 |
| 153 | auto ret = DlHccpApi::RaQpDestroy(qp->qpHandle); | 153 | auto ret = DlHccpApi::RaQpDestroy(qp->qpHandle); |
| 154 | if (ret != 0) { | 154 | if (ret != 0) { |
| 155 | - BM_LOG_WARN("close qp from " << rankId_ << " failed, ret: " << ret); | 155 | + BM_LOG_WARN("unable to close qp from " << rankId_ << " , ret: " << ret); |
| 156 | } | 156 | } |
| 157 | delete qp; | 157 | delete qp; |
| 158 | } | 158 | } |
| @@ -592,7 +592,7 @@ void JoinableRanksQpManager::RemoveRanksProcess(const std::set<uint32_t> &ranks) | |||
| 592 | } | 592 | } |
| 593 | auto ret = DlHccpApi::RaSocketBatchClose(&closeInfo, 1U); | 593 | auto ret = DlHccpApi::RaSocketBatchClose(&closeInfo, 1U); |
| 594 | if (ret != 0) { | 594 | if (ret != 0) { |
| 595 | - BM_LOG_WARN("close socket from " << rankId_ << " to " << it->first << " failed: " << ret); | 595 | + BM_LOG_WARN("unable to close socket from " << rankId_ << " to " << it->first << " : " << ret); |
| 596 | } else { | 596 | } else { |
| 597 | BM_LOG_INFO("close socket from " << rankId_ << " to " << it->first << " successful: " << ret); | 597 | BM_LOG_INFO("close socket from " << rankId_ << " to " << it->first << " successful: " << ret); |
| 598 | } | 598 | } |
| @@ -1532,6 +1532,7 @@ Result DeviceUrmaTransportManager::AsyncConnect() | |||
| 1532 | 1532 | ||
| 1533 | Result DeviceUrmaTransportManager::WaitForConnected(int64_t timeoutNs) | 1533 | Result DeviceUrmaTransportManager::WaitForConnected(int64_t timeoutNs) |
| 1534 | { | 1534 | { |
| 1535 | + (void)timeoutNs; | ||
| 1535 | return BM_OK; | 1536 | return BM_OK; |
| 1536 | } | 1537 | } |
| 1537 | 1538 | ||
| @@ -198,7 +198,7 @@ Result HcomTransportManager::CloseDevice() | |||
| 198 | 198 | ||
| 199 | auto ret = DlHcomApi::ServiceDestroy(service, HCOM_RPC_SERVICE_NAME); | 199 | auto ret = DlHcomApi::ServiceDestroy(service, HCOM_RPC_SERVICE_NAME); |
| 200 | if (ret != 0) { | 200 | if (ret != 0) { |
| 201 | - BM_LOG_WARN("Failed to destroy hcom service, ret: " << ret); | 201 | + BM_LOG_WARN("Unable to destroy hcom service, ret: " << ret); |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | mf::MfTlsUtil::CloseTlsLib(); | 204 | mf::MfTlsUtil::CloseTlsLib(); |
| @@ -271,7 +271,7 @@ Result HcomTransportManager::RegisterMemoryRegion(const TransportMemoryRegion &m | |||
| 271 | BM_ASSERT_LOG_AND_RETURN(mr.addr != 0 && mr.size != 0, "mr.addr = " << mr.addr << ", " << "mr.size = " << mr.size, | 271 | BM_ASSERT_LOG_AND_RETURN(mr.addr != 0 && mr.size != 0, "mr.addr = " << mr.addr << ", " << "mr.size = " << mr.size, |
| 272 | BM_INVALID_PARAM); | 272 | BM_INVALID_PARAM); |
| 273 | if ((mr.flags & transport::REG_MR_FLAG_DRAM) == 0) { | 273 | if ((mr.flags & transport::REG_MR_FLAG_DRAM) == 0) { |
| 274 | - BM_LOG_WARN("Failed to register hcom mr, mem type flag should be dram."); | 274 | + BM_LOG_WARN("Unable to register hcom mr, mem type flag should be dram."); |
| 275 | return BM_OK; | 275 | return BM_OK; |
| 276 | } | 276 | } |
| 277 | 277 | ||
| @@ -529,7 +529,7 @@ Result HcomTransportManager::InnerReadRemote(uint32_t rankId, uint64_t lAddr, ui | |||
| 529 | "size = " << size << " > " << std::numeric_limits<uint32_t>::max(), BM_INVALID_PARAM); | 529 | "size = " << size << " > " << std::numeric_limits<uint32_t>::max(), BM_INVALID_PARAM); |
| 530 | Hcom_Channel channel = channels_[rankId]; | 530 | Hcom_Channel channel = channels_[rankId]; |
| 531 | if (channel == 0) { | 531 | if (channel == 0) { |
| 532 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 532 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 533 | return BM_NOT_CONNECTED; | 533 | return BM_NOT_CONNECTED; |
| 534 | } | 534 | } |
| 535 | Channel_OneSideRequest req; | 535 | Channel_OneSideRequest req; |
| @@ -569,7 +569,7 @@ Result HcomTransportManager::InnerWriteRemote(uint32_t rankId, uint64_t lAddr, u | |||
| 569 | "size = " << size << " > " << std::numeric_limits<uint32_t>::max(), BM_INVALID_PARAM); | 569 | "size = " << size << " > " << std::numeric_limits<uint32_t>::max(), BM_INVALID_PARAM); |
| 570 | Hcom_Channel channel = channels_[rankId]; | 570 | Hcom_Channel channel = channels_[rankId]; |
| 571 | if (channel == 0) { | 571 | if (channel == 0) { |
| 572 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 572 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 573 | return BM_NOT_CONNECTED; | 573 | return BM_NOT_CONNECTED; |
| 574 | } | 574 | } |
| 575 | Channel_OneSideRequest req; | 575 | Channel_OneSideRequest req; |
| @@ -620,7 +620,7 @@ Result HcomTransportManager::ReadRemoteAsync(uint32_t rankId, uint64_t lAddr, ui | |||
| 620 | BM_INVALID_PARAM); | 620 | BM_INVALID_PARAM); |
| 621 | Hcom_Channel channel = channels_[rankId]; | 621 | Hcom_Channel channel = channels_[rankId]; |
| 622 | if (channel == 0) { | 622 | if (channel == 0) { |
| 623 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 623 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 624 | return BM_NOT_CONNECTED; | 624 | return BM_NOT_CONNECTED; |
| 625 | } | 625 | } |
| 626 | Channel_OneSideRequest req; | 626 | Channel_OneSideRequest req; |
| @@ -689,7 +689,7 @@ Result HcomTransportManager::WriteRemoteAsync(uint32_t rankId, uint64_t lAddr, u | |||
| 689 | BM_INVALID_PARAM); | 689 | BM_INVALID_PARAM); |
| 690 | Hcom_Channel channel = channels_[rankId]; | 690 | Hcom_Channel channel = channels_[rankId]; |
| 691 | if (channel == 0) { | 691 | if (channel == 0) { |
| 692 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 692 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 693 | return BM_NOT_CONNECTED; | 693 | return BM_NOT_CONNECTED; |
| 694 | } | 694 | } |
| 695 | Channel_OneSideRequest req; | 695 | Channel_OneSideRequest req; |
| @@ -758,7 +758,7 @@ Result HcomTransportManager::WriteRemoteBatchAsync(uint32_t rankId, const CopyDe | |||
| 758 | BM_INVALID_PARAM); | 758 | BM_INVALID_PARAM); |
| 759 | Hcom_Channel channel = channels_[rankId]; | 759 | Hcom_Channel channel = channels_[rankId]; |
| 760 | if (channel == 0) { | 760 | if (channel == 0) { |
| 761 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 761 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 762 | return BM_NOT_CONNECTED; | 762 | return BM_NOT_CONNECTED; |
| 763 | } | 763 | } |
| 764 | 764 | ||
| @@ -999,7 +999,7 @@ Result HcomTransportManager::ReadRemoteBatchAsync(uint32_t rankId, const CopyDes | |||
| 999 | BM_INVALID_PARAM); | 999 | BM_INVALID_PARAM); |
| 1000 | Hcom_Channel channel = channels_[rankId]; | 1000 | Hcom_Channel channel = channels_[rankId]; |
| 1001 | if (channel == 0) { | 1001 | if (channel == 0) { |
| 1002 | - BM_LOG_INFO("Failed to write remote, rankId: " << rankId << " is not connect"); | 1002 | + BM_LOG_WARN("Unable to write remote, rankId: " << rankId << " is not connect"); |
| 1003 | return BM_NOT_CONNECTED; | 1003 | return BM_NOT_CONNECTED; |
| 1004 | } | 1004 | } |
| 1005 | uint32_t allBatch = descriptor.counts.size(); | 1005 | uint32_t allBatch = descriptor.counts.size(); |
| @@ -130,7 +130,7 @@ int32_t HybmStream::AllocSqcq(uint32_t ssid) | |||
| 130 | 130 | ||
| 131 | auto ret = DlHalApi::HalSqCqAllocate(deviceId_, &input, &output); | 131 | auto ret = DlHalApi::HalSqCqAllocate(deviceId_, &input, &output); |
| 132 | if (ret != 0) { | 132 | if (ret != 0) { |
| 133 | - BM_LOG_INFO("allocate sq_cq with ts_id:" << tsId_ << " failed: " << ret); | 133 | + BM_LOG_ERROR("allocate sq_cq failed, ts_id: " << tsId_ << ", deviceId: " << deviceId_ << ", ret: " << ret); |
| 134 | if (stackPtr_ != nullptr) { | 134 | if (stackPtr_ != nullptr) { |
| 135 | DlHalApi::HalMemFree(stackPtr_); | 135 | DlHalApi::HalMemFree(stackPtr_); |
| 136 | stackPtr_ = nullptr; | 136 | stackPtr_ = nullptr; |
| @@ -169,7 +169,7 @@ int32_t HybmStream::AllocLogicCq() | |||
| 169 | 169 | ||
| 170 | auto ret = DlHalApi::HalSqCqAllocate(deviceId_, &input, &output); | 170 | auto ret = DlHalApi::HalSqCqAllocate(deviceId_, &input, &output); |
| 171 | if (ret != 0) { | 171 | if (ret != 0) { |
| 172 | - BM_LOG_INFO("allocate logic cq with ts_id:" << tsId_ << " failed: " << ret); | 172 | + BM_LOG_ERROR("allocate logic cq failed, ts_id: " << tsId_ << ", deviceId: " << deviceId_ << ", ret: " << ret); |
| 173 | return ret; | 173 | return ret; |
| 174 | } | 174 | } |
| 175 | logicCq_ = output.cqId; | 175 | logicCq_ = output.cqId; |
| @@ -186,7 +186,7 @@ int32_t HybmStream::AllocLogicCq() | |||
| 186 | 186 | ||
| 187 | ret = DlHalApi::HalResourceConfig(deviceId_, &in, &configInfo); | 187 | ret = DlHalApi::HalResourceConfig(deviceId_, &in, &configInfo); |
| 188 | if (ret != 0) { | 188 | if (ret != 0) { |
| 189 | - BM_LOG_INFO("bind logic cq with ts_id:" << tsId_ << " failed: " << ret); | 189 | + BM_LOG_ERROR("bind logic cq with ts_id:" << tsId_ << " failed: " << ret); |
| 190 | halSqCqFreeInfo freeInfo{}; | 190 | halSqCqFreeInfo freeInfo{}; |
| 191 | freeInfo.type = DRV_LOGIC_TYPE; | 191 | freeInfo.type = DRV_LOGIC_TYPE; |
| 192 | freeInfo.tsId = tsId_; | 192 | freeInfo.tsId = tsId_; |
| @@ -213,7 +213,7 @@ void HybmStream::Destroy() | |||
| 213 | 213 | ||
| 214 | auto ret = DlHalApi::HalSqCqFree(deviceId_, &info); | 214 | auto ret = DlHalApi::HalSqCqFree(deviceId_, &info); |
| 215 | if (ret != 0) { | 215 | if (ret != 0) { |
| 216 | - BM_LOG_WARN("free sq_cq failed: " << ret); | 216 | + BM_LOG_ERROR("free sq_cq failed: " << ret); |
| 217 | return; | 217 | return; |
| 218 | } | 218 | } |
| 219 | 219 | ||
| @@ -81,7 +81,7 @@ Result DlHcomApi::LoadLibrary() | |||
| 81 | } | 81 | } |
| 82 | hcomHandle = dlopen(hcomLibName, RTLD_NOW | RTLD_NODELETE); | 82 | hcomHandle = dlopen(hcomLibName, RTLD_NOW | RTLD_NODELETE); |
| 83 | if (hcomHandle == nullptr) { | 83 | if (hcomHandle == nullptr) { |
| 84 | - BM_LOG_INFO("Failed to open library [" << hcomLibName << "], " << dlerror()); | 84 | + BM_LOG_WARN("Unable to open library [" << hcomLibName << "], " << dlerror()); |
| 85 | return BM_DL_FUNCTION_FAILED; | 85 | return BM_DL_FUNCTION_FAILED; |
| 86 | } | 86 | } |
| 87 | DL_LOAD_SYM(gServiceCreate, serviceCreateFunc, hcomHandle, "ubs_hcom_service_create"); | 87 | DL_LOAD_SYM(gServiceCreate, serviceCreateFunc, hcomHandle, "ubs_hcom_service_create"); |
| @@ -50,7 +50,7 @@ Result DlHybmExtendApi::TryLoadLibrary() | |||
| 50 | /* dlopen library */ | 50 | /* dlopen library */ |
| 51 | libHandle = dlopen(realPath.c_str(), RTLD_NOW | RTLD_NODELETE); | 51 | libHandle = dlopen(realPath.c_str(), RTLD_NOW | RTLD_NODELETE); |
| 52 | if (libHandle == nullptr) { | 52 | if (libHandle == nullptr) { |
| 53 | - BM_LOG_INFO("Failed to open library [" << realPath << "], " << dlerror()); | 53 | + BM_LOG_WARN("Unable to open library [" << realPath << "], " << dlerror()); |
| 54 | return BM_DL_FUNCTION_FAILED; | 54 | return BM_DL_FUNCTION_FAILED; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| @@ -148,8 +148,8 @@ public: | |||
| 148 | size_t rawLen = 0; | 148 | size_t rawLen = 0; |
| 149 | int32_t ret = EtcdApi::EtcdGet(cli, key.data(), &rawBuf, &rawLen); | 149 | int32_t ret = EtcdApi::EtcdGet(cli, key.data(), &rawBuf, &rawLen); |
| 150 | if (ret != 0) { | 150 | if (ret != 0) { |
| 151 | - SM_LOG_WARN("GetValue failed: EtcdGet returned " << ret << ", key: " << key | 151 | + SM_LOG_ERROR("GetValue failed: EtcdGet returned " << ret << ", key: " << key |
| 152 | - << ", error: " << smem::EtcdApi::EtcdGetLastError(cli)); | 152 | + << ", error: " << smem::EtcdApi::EtcdGetLastError(cli)); |
| 153 | return -1; | 153 | return -1; |
| 154 | } | 154 | } |
| 155 | // Handle empty value case (valid scenario in etcd) | 155 | // Handle empty value case (valid scenario in etcd) |
| @@ -175,9 +175,9 @@ public: | |||
| 175 | } | 175 | } |
| 176 | int32_t ret = EtcdApi::EtcdPrefixGet(cli, ctx, flags); | 176 | int32_t ret = EtcdApi::EtcdPrefixGet(cli, ctx, flags); |
| 177 | if (ret != 0) { | 177 | if (ret != 0) { |
| 178 | - SM_LOG_WARN("PrefixGet failed: EtcdGet returned " << ret << ", prefix: " << ctx->prefix | 178 | + SM_LOG_ERROR("PrefixGet failed: EtcdGet returned " << ret << ", prefix: " << ctx->prefix |
| 179 | - << ", marker:" << ctx->marker | 179 | + << ", marker:" << ctx->marker |
| 180 | - << ", error: " << smem::EtcdApi::EtcdGetLastError(cli)); | 180 | + << ", error: " << smem::EtcdApi::EtcdGetLastError(cli)); |
| 181 | return -1; | 181 | return -1; |
| 182 | } | 182 | } |
| 183 | return 0; | 183 | return 0; |
| @@ -168,8 +168,8 @@ StoreErrorCode SmemEtcdStoreBackend::Get(const std::string &key, std::vector<uin | |||
| 168 | std::string valueStr; | 168 | std::string valueStr; |
| 169 | int32_t ret = EtcdClientV3::GetInstance().GetValue(qualifiedKey, valueStr); | 169 | int32_t ret = EtcdClientV3::GetInstance().GetValue(qualifiedKey, valueStr); |
| 170 | if (ret != 0) { | 170 | if (ret != 0) { |
| 171 | - STORE_LOG_WARN("[ETCD] Get key failed: " << qualifiedKey | 171 | + STORE_LOG_ERROR("[ETCD] Get key failed: " << qualifiedKey |
| 172 | - << ", msg: " << EtcdClientV3::GetInstance().GetLastError()); | 172 | + << ", msg: " << EtcdClientV3::GetInstance().GetLastError()); |
| 173 | return StoreErrorCode::NOT_EXIST; | 173 | return StoreErrorCode::NOT_EXIST; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| @@ -210,8 +210,8 @@ StoreErrorCode SmemEtcdStoreBackend::Delete(const std::string &key) noexcept | |||
| 210 | const std::string qualifiedKey = BuildClusterQualifiedName(clusterRoot_, key); | 210 | const std::string qualifiedKey = BuildClusterQualifiedName(clusterRoot_, key); |
| 211 | int32_t ret = EtcdClientV3::GetInstance().DeleteKey(qualifiedKey); | 211 | int32_t ret = EtcdClientV3::GetInstance().DeleteKey(qualifiedKey); |
| 212 | if (ret != 0) { | 212 | if (ret != 0) { |
| 213 | - STORE_LOG_WARN("[ETCD] Delete key failed: " << qualifiedKey | 213 | + STORE_LOG_ERROR("[ETCD] Delete key failed: " << qualifiedKey |
| 214 | - << ", error=" << EtcdClientV3::GetInstance().GetLastError()); | 214 | + << ", error=" << EtcdClientV3::GetInstance().GetLastError()); |
| 215 | return StoreErrorCode::ERROR; | 215 | return StoreErrorCode::ERROR; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| @@ -156,7 +156,7 @@ bool HaConfigStore::IsLeaderAlive(std::string &leaderAddr) noexcept | |||
| 156 | { | 156 | { |
| 157 | int backendRet = backend_->Get(KEY_LEADER, leaderAddr); | 157 | int backendRet = backend_->Get(KEY_LEADER, leaderAddr); |
| 158 | if (backendRet != SUCCESS) { | 158 | if (backendRet != SUCCESS) { |
| 159 | - SM_LOG_WARN("Backend Get failed, key: " << KEY_LEADER << ", ret: " << backendRet); | 159 | + SM_LOG_ERROR("Backend Get failed, key: " << KEY_LEADER << ", ret: " << backendRet); |
| 160 | return false; | 160 | return false; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| @@ -327,7 +327,7 @@ void HaConfigStore::StartServer() noexcept | |||
| 327 | recovered = true; | 327 | recovered = true; |
| 328 | } | 328 | } |
| 329 | } else { | 329 | } else { |
| 330 | - SM_LOG_WARN("Failed to parse worldSize: " << worldSizeStr); | 330 | + SM_LOG_WARN("Unable to parse worldSize: " << worldSizeStr); |
| 331 | } | 331 | } |
| 332 | } | 332 | } |
| 333 | if (!recovered) { | 333 | if (!recovered) { |
| @@ -1175,8 +1175,8 @@ bool AccStoreServer::GetStatus() noexcept | |||
| 1175 | std::string status; | 1175 | std::string status; |
| 1176 | auto ret = backend_->Get(KEY_LEADER_STATUS, status); | 1176 | auto ret = backend_->Get(KEY_LEADER_STATUS, status); |
| 1177 | if (ret != 0) { | 1177 | if (ret != 0) { |
| 1178 | - STORE_LOG_WARN("Failed to get leader status from backend, error code: " | 1178 | + STORE_LOG_WARN("Unable to get leader status from backend, ret: " << ret << ", attempt: " << (attempt + 1) |
| 1179 | - << ret << ", attempt: " << (attempt + 1) << "/" << (retries + 1)); | 1179 | + << "/" << (retries + 1)); |
| 1180 | } else if (status == "true") { | 1180 | } else if (status == "true") { |
| 1181 | STORE_LOG_DEBUG("Leader status: active"); | 1181 | STORE_LOG_DEBUG("Leader status: active"); |
| 1182 | return true; | 1182 | return true; |
| @@ -1187,7 +1187,7 @@ bool AccStoreServer::GetStatus() noexcept | |||
| 1187 | std::this_thread::sleep_for(std::chrono::seconds(retryIntervalSec)); | 1187 | std::this_thread::sleep_for(std::chrono::seconds(retryIntervalSec)); |
| 1188 | } | 1188 | } |
| 1189 | } | 1189 | } |
| 1190 | - STORE_LOG_WARN("Leader status check failed after " << (retries + 1) << " attempts"); | 1190 | + STORE_LOG_ERROR("Leader status check failed after " << (retries + 1) << " attempts"); |
| 1191 | return false; | 1191 | return false; |
| 1192 | } | 1192 | } |
| 1193 | 1193 | ||
| @@ -1280,7 +1280,7 @@ StoreErrorCode AccStoreServer::RecoverAliveRankIds(std::unordered_set<uint32_t> | |||
| 1280 | std::string rankStr; | 1280 | std::string rankStr; |
| 1281 | auto ret = backend_->Get(KEY_ALIVE_RANK_LIST, rankStr); | 1281 | auto ret = backend_->Get(KEY_ALIVE_RANK_LIST, rankStr); |
| 1282 | if (ret != 0) { | 1282 | if (ret != 0) { |
| 1283 | - STORE_LOG_WARN("Failed to get alive ranks from backend, error code: " << ret); | 1283 | + STORE_LOG_WARN("Unable to get alive ranks from backend, ret: " << ret); |
| 1284 | return SUCCESS; | 1284 | return SUCCESS; |
| 1285 | } | 1285 | } |
| 1286 | if (rankStr.empty()) { | 1286 | if (rankStr.empty()) { |
| @@ -392,7 +392,7 @@ Result SmemNetGroupEngine::RegisterExit(const std::function<void(int)> &exit) | |||
| 392 | { | 392 | { |
| 393 | SM_ASSERT_RETURN(!option_.dynamic, SM_ERROR); | 393 | SM_ASSERT_RETURN(!option_.dynamic, SM_ERROR); |
| 394 | if (globalExitHandler_ != nullptr) { | 394 | if (globalExitHandler_ != nullptr) { |
| 395 | - SM_LOG_WARN("the exit function is not null"); | 395 | + SM_LOG_ERROR("the exit function is not null"); |
| 396 | return SM_INVALID_PARAM; | 396 | return SM_INVALID_PARAM; |
| 397 | } | 397 | } |
| 398 | SM_ASSERT_RETURN(exit != nullptr, SM_INVALID_PARAM); | 398 | SM_ASSERT_RETURN(exit != nullptr, SM_INVALID_PARAM); |
| @@ -404,7 +404,7 @@ Result SmemNetGroupEngine::RegisterExit(const std::function<void(int)> &exit) | |||
| 404 | std::placeholders::_2, std::placeholders::_3), | 404 | std::placeholders::_2, std::placeholders::_3), |
| 405 | wid); | 405 | wid); |
| 406 | if (ret != SM_OK) { | 406 | if (ret != SM_OK) { |
| 407 | - SM_LOG_WARN("group watch failed, maybe link down, ret: " << ret); | 407 | + SM_LOG_ERROR("group watch failed, maybe link down, ret: " << ret); |
| 408 | globalExitHandler_ = nullptr; | 408 | globalExitHandler_ = nullptr; |
| 409 | return ret; | 409 | return ret; |
| 410 | } | 410 | } |
| @@ -422,17 +422,17 @@ void SmemNetGroupEngine::RankExit(int result, const std::string &key, const std: | |||
| 422 | try { | 422 | try { |
| 423 | long tempVal = std::stol(value); | 423 | long tempVal = std::stol(value); |
| 424 | if (tempVal < std::numeric_limits<int>::min() || tempVal > std::numeric_limits<int>::max()) { | 424 | if (tempVal < std::numeric_limits<int>::min() || tempVal > std::numeric_limits<int>::max()) { |
| 425 | - SM_LOG_WARN("value out of int range: " << tempVal << " (value='" << value << "')"); | 425 | + SM_LOG_ERROR("value out of int range: " << tempVal << " (value='" << value << "')"); |
| 426 | return; | 426 | return; |
| 427 | } | 427 | } |
| 428 | val = static_cast<int>(tempVal); | 428 | val = static_cast<int>(tempVal); |
| 429 | } catch (...) { | 429 | } catch (...) { |
| 430 | - SM_LOG_WARN("convert string to int failed"); | 430 | + SM_LOG_ERROR("convert string to int failed"); |
| 431 | return; | 431 | return; |
| 432 | } | 432 | } |
| 433 | globalExitHandler_(val); | 433 | globalExitHandler_(val); |
| 434 | } else { | 434 | } else { |
| 435 | - SM_LOG_WARN("global exit failed"); | 435 | + SM_LOG_ERROR("global exit failed"); |
| 436 | } | 436 | } |
| 437 | } | 437 | } |
| 438 | 438 | ||
| @@ -655,7 +655,7 @@ int32_t SmemNetGroupEngine::AllocNumber() | |||
| 655 | Result SmemNetGroupEngine::ReleaseNumber(int32_t val) | 655 | Result SmemNetGroupEngine::ReleaseNumber(int32_t val) |
| 656 | { | 656 | { |
| 657 | if (allocedSet_.count(val) == 0) { | 657 | if (allocedSet_.count(val) == 0) { |
| 658 | - SM_LOG_WARN("key(" << val << ") is not exist!"); | 658 | + SM_LOG_ERROR("key(" << val << ") is not exist!"); |
| 659 | return SM_OBJECT_NOT_EXISTS; | 659 | return SM_OBJECT_NOT_EXISTS; |
| 660 | } | 660 | } |
| 661 | allocedSet_.erase(val); | 661 | allocedSet_.erase(val); |
| @@ -694,8 +694,8 @@ Result SmemNetGroupEngine::TryRemovePrefixKey(uint32_t rank) | |||
| 694 | prefixKey_.clear(); | 694 | prefixKey_.clear(); |
| 695 | } | 695 | } |
| 696 | } else { | 696 | } else { |
| 697 | - SM_LOG_INFO("remove key failed, src_rank:" << option_.rank << " key:" << store_->GetCompleteKey(key) | 697 | + SM_LOG_WARN("remove key not successful, src_rank:" << option_.rank << " key:" << store_->GetCompleteKey(key) |
| 698 | - << " ret:" << ret); | 698 | + << " ret:" << ret); |
| 699 | } | 699 | } |
| 700 | return ret; | 700 | return ret; |
| 701 | } | 701 | } |
| @@ -837,7 +837,7 @@ Result SmemNetGroupEngine::GroupGatherPrefixKey(uint32_t dstRank, std::string &u | |||
| 837 | std::string ownKey = SMEM_EXCHANGE_INFO_KEY + std::to_string(ownRank); | 837 | std::string ownKey = SMEM_EXCHANGE_INFO_KEY + std::to_string(ownRank); |
| 838 | auto writeRet = store_->Set(ownKey, update); | 838 | auto writeRet = store_->Set(ownKey, update); |
| 839 | if (writeRet != SM_OK) { | 839 | if (writeRet != SM_OK) { |
| 840 | - SM_LOG_WARN("set own prefix_key: " << store_->GetCompleteKey(ownKey) << " failed, ret:" << writeRet); | 840 | + SM_LOG_ERROR("set own prefix_key: " << store_->GetCompleteKey(ownKey) << " failed, ret:" << writeRet); |
| 841 | } | 841 | } |
| 842 | } | 842 | } |
| 843 | std::string key = SMEM_EXCHANGE_INFO_KEY + std::to_string(dstRank); | 843 | std::string key = SMEM_EXCHANGE_INFO_KEY + std::to_string(dstRank); |
| @@ -885,7 +885,7 @@ uint32_t SmemNetGroupEngine::ReWatchEvent() | |||
| 885 | std::placeholders::_2, std::placeholders::_3), | 885 | std::placeholders::_2, std::placeholders::_3), |
| 886 | wid); | 886 | wid); |
| 887 | if (ret != SM_OK || wid == UINT32_MAX) { | 887 | if (ret != SM_OK || wid == UINT32_MAX) { |
| 888 | - SM_LOG_WARN_LIMIT("group watch failed, ret: " << ret << ", wid: " << wid); | 888 | + SM_LOG_ERROR("group watch failed, ret: " << ret << ", wid: " << wid); |
| 889 | usleep(SMEM_GROUP_SLEEP_TIMEOUT); | 889 | usleep(SMEM_GROUP_SLEEP_TIMEOUT); |
| 890 | return UINT32_MAX; | 890 | return UINT32_MAX; |
| 891 | } | 891 | } |
| @@ -900,7 +900,7 @@ uint32_t SmemNetGroupEngine::ReWatchLinkDown() | |||
| 900 | WatchRankType::WATCH_RANK_LINK_DOWN, | 900 | WatchRankType::WATCH_RANK_LINK_DOWN, |
| 901 | [this](WatchRankType type, uint32_t downRankId) { RemoteRankLinkDownCb(downRankId); }, wid); | 901 | [this](WatchRankType type, uint32_t downRankId) { RemoteRankLinkDownCb(downRankId); }, wid); |
| 902 | if (ret != SM_OK || wid == UINT32_MAX) { | 902 | if (ret != SM_OK || wid == UINT32_MAX) { |
| 903 | - SM_LOG_WARN_LIMIT("group watch failed, ret: " << ret); | 903 | + SM_LOG_ERROR("group watch failed, ret: " << ret); |
| 904 | usleep(SMEM_GROUP_SLEEP_TIMEOUT); | 904 | usleep(SMEM_GROUP_SLEEP_TIMEOUT); |
| 905 | return UINT32_MAX; | 905 | return UINT32_MAX; |
| 906 | } | 906 | } |
| @@ -1204,7 +1204,7 @@ void SmemNetGroupEngine::GroupWatchCb(int result, const std::string &key, const | |||
| 1204 | } | 1204 | } |
| 1205 | 1205 | ||
| 1206 | if (value.length() != SMEM_GROUP_INFO_SIZE) { | 1206 | if (value.length() != SMEM_GROUP_INFO_SIZE) { |
| 1207 | - SM_LOG_WARN("receive group info size is error!"); | 1207 | + SM_LOG_WARN("received group info size is incorrect."); |
| 1208 | ctxRet = SM_ERROR; | 1208 | ctxRet = SM_ERROR; |
| 1209 | } | 1209 | } |
| 1210 | 1210 | ||
| @@ -86,7 +86,8 @@ SMEM_API int32_t smem_bm_init(const char *storeURL, uint32_t worldSize, uint16_t | |||
| 86 | 86 | ||
| 87 | auto faultInjectionPointStatus = ::ock::mf::FaultInjectionPointRegistry::Register(); | 87 | auto faultInjectionPointStatus = ::ock::mf::FaultInjectionPointRegistry::Register(); |
| 88 | if (faultInjectionPointStatus != ::ock::mf::FaultInjectionPointStatus::OK) { | 88 | if (faultInjectionPointStatus != ::ock::mf::FaultInjectionPointStatus::OK) { |
| 89 | - SM_LOG_WARN("register fault injection points failed, status: " << static_cast<int>(faultInjectionPointStatus)); | 89 | + SM_LOG_WARN( |
| 90 | + "unable to register fault injection points, status: " << static_cast<int>(faultInjectionPointStatus)); | ||
| 90 | } | 91 | } |
| 91 | 92 | ||
| 92 | int32_t ret = SmemBmEntryManager::Instance().Initialize(storeURL, worldSize, deviceId, *config); | 93 | int32_t ret = SmemBmEntryManager::Instance().Initialize(storeURL, worldSize, deviceId, *config); |
| @@ -224,7 +224,7 @@ void SmemBmEntry::UnInitalize() | |||
| 224 | if (globalGroup_ != nullptr && globalGroup_->IsJoined()) { | 224 | if (globalGroup_ != nullptr && globalGroup_->IsJoined()) { |
| 225 | auto ret = globalGroup_->GroupLeave(); | 225 | auto ret = globalGroup_->GroupLeave(); |
| 226 | if (ret != SM_OK) { | 226 | if (ret != SM_OK) { |
| 227 | - SM_LOG_WARN("group leave failed during uninitialize, ret: " << ret); | 227 | + SM_LOG_WARN("unable to group leave during uninitialize, ret: " << ret); |
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| 230 | // Stop the group engine listen thread before releasing the entity. | 230 | // Stop the group engine listen thread before releasing the entity. |
| @@ -173,7 +173,7 @@ Result SmemBmEntryManager::CreateEntryById(uint32_t id, SmemBmEntryPtr &entry /* | |||
| 173 | SM_ASSERT_RETURN(inited_, SM_NOT_STARTED); | 173 | SM_ASSERT_RETURN(inited_, SM_NOT_STARTED); |
| 174 | auto iter = entryIdMap_.find(id); | 174 | auto iter = entryIdMap_.find(id); |
| 175 | if (iter != entryIdMap_.end()) { | 175 | if (iter != entryIdMap_.end()) { |
| 176 | - SM_LOG_WARN("create bm entry failed as already exists, id: " << id); | 176 | + SM_LOG_WARN("unable to create bm entry as already exists, id: " << id); |
| 177 | return SM_DUPLICATED_OBJECT; | 177 | return SM_DUPLICATED_OBJECT; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| @@ -183,7 +183,7 @@ void SmemShmEntry::InitStepUnreserveMemory() | |||
| 183 | { | 183 | { |
| 184 | auto ret = hybm_unreserve_mem_space(entity_, 0); | 184 | auto ret = hybm_unreserve_mem_space(entity_, 0); |
| 185 | if (ret != 0) { | 185 | if (ret != 0) { |
| 186 | - SM_LOG_WARN("unreserve mem space failed: " << ret); | 186 | + SM_LOG_WARN("unable to unreserve mem space: " << ret); |
| 187 | } | 187 | } |
| 188 | gva_ = nullptr; | 188 | gva_ = nullptr; |
| 189 | } | 189 | } |
| @@ -205,7 +205,7 @@ void SmemShmEntry::InitStepFreeSlice() | |||
| 205 | auto slice = slice_; | 205 | auto slice = slice_; |
| 206 | auto ret = hybm_free_local_memory(entity_, slice, 0, 0); | 206 | auto ret = hybm_free_local_memory(entity_, slice, 0, 0); |
| 207 | if (ret != 0) { | 207 | if (ret != 0) { |
| 208 | - SM_LOG_WARN("free mem slice failed: " << ret); | 208 | + SM_LOG_WARN("unable to free mem slice: " << ret); |
| 209 | } | 209 | } |
| 210 | slice_ = nullptr; | 210 | slice_ = nullptr; |
| 211 | } | 211 | } |
| @@ -63,7 +63,7 @@ Result SmemShmEntryManager::CreateEntryById(uint32_t id, SmemShmEntryPtr &entry | |||
| 63 | SM_ASSERT_RETURN(inited_, SM_NOT_STARTED); | 63 | SM_ASSERT_RETURN(inited_, SM_NOT_STARTED); |
| 64 | auto iter = entryIdMap_.find(id); | 64 | auto iter = entryIdMap_.find(id); |
| 65 | if (iter != entryIdMap_.end()) { | 65 | if (iter != entryIdMap_.end()) { |
| 66 | - SM_LOG_WARN("create shm entry failed as already exists, id: " << id); | 66 | + SM_LOG_WARN("unable to create shm entry as already exists, id: " << id); |
| 67 | return SM_DUPLICATED_OBJECT; | 67 | return SM_DUPLICATED_OBJECT; |
| 68 | } | 68 | } |
| 69 | 69 | ||