philo-he commented on code in PR #13605:
URL: https://github.com/apache/gluten/pull/13605#discussion_r4535929143


##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -397,9 +397,17 @@ void VeloxBackend::initCache() {
     uint64_t memCacheSize = backendConf_->get<uint64_t>(kVeloxMemCacheSize, 
kVeloxMemCacheSizeDefault);
     uint64_t ssdCacheSize = backendConf_->get<uint64_t>(kVeloxSsdCacheSize, 
kVeloxSsdCacheSizeDefault);
 
-    velox::memory::MmapAllocator::Options options;
+    velox::memory::MemoryAllocator::Options options;
     options.capacity = memCacheSize;
-    cacheAllocator_ = std::make_shared<velox::memory::MmapAllocator>(options);
+    // MmapAllocator tracks memory in 4 KB pages and refuses to start when the 
system page size differs (e.g. 64 KB
+    // pages on aarch64 kernels); fall back to MallocAllocator there.
+    if (velox::memory::MmapAllocator::isPageSizeSupported()) {
+      cacheAllocator_ = 
std::make_shared<velox::memory::MmapAllocator>(options);
+    } else {
+      LOG(INFO) << "System page size " << 
velox::memory::MmapAllocator::systemPageSize()

Review Comment:
   Nit: could we change the log level to WARN since this allocator change might 
not meet user's expectation?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to