You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/27 04:57:49 UTC

[GitHub] [doris] dataroaring opened a new pull request, #10446: alloc aligned memory for block bloom filter to work with jemalloc

dataroaring opened a new pull request, #10446:
URL: https://github.com/apache/doris/pull/10446

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] xinyiZzz commented on a diff in pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on code in PR #10446:
URL: https://github.com/apache/doris/pull/10446#discussion_r907261796


##########
be/src/exprs/block_bloom_filter_impl.cc:
##########
@@ -69,8 +72,12 @@ Status BlockBloomFilter::init_internal(const int log_space_bytes, uint32_t hash_
 
     const size_t alloc_size = directory_size();
     close(); // Ensure that any previously allocated memory for directory_ is released.
-    _mem_holder.reset(new char[alloc_size]);

Review Comment:
   Remove definition of `_mem_holder`



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman merged pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

Posted by GitBox <gi...@apache.org>.
morningman merged PR #10446:
URL: https://github.com/apache/doris/pull/10446


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dataroaring commented on a diff in pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

Posted by GitBox <gi...@apache.org>.
dataroaring commented on code in PR #10446:
URL: https://github.com/apache/doris/pull/10446#discussion_r907286437


##########
be/src/exprs/block_bloom_filter_impl.cc:
##########
@@ -69,8 +72,12 @@ Status BlockBloomFilter::init_internal(const int log_space_bytes, uint32_t hash_
 
     const size_t alloc_size = directory_size();
     close(); // Ensure that any previously allocated memory for directory_ is released.
-    _mem_holder.reset(new char[alloc_size]);
-    _directory = (Bucket*)_mem_holder.get();
+    DCHECK(_directory == nullptr);
+    int rc = posix_memalign((void**)&_directory, 32, alloc_size);

Review Comment:
   The patch fixes the problem when using jemalloc, does not enable jemalloc.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] xinyiZzz commented on a diff in pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on code in PR #10446:
URL: https://github.com/apache/doris/pull/10446#discussion_r907262234


##########
be/src/exprs/block_bloom_filter_impl.cc:
##########
@@ -69,8 +72,12 @@ Status BlockBloomFilter::init_internal(const int log_space_bytes, uint32_t hash_
 
     const size_t alloc_size = directory_size();
     close(); // Ensure that any previously allocated memory for directory_ is released.
-    _mem_holder.reset(new char[alloc_size]);
-    _directory = (Bucket*)_mem_holder.get();
+    DCHECK(_directory == nullptr);
+    int rc = posix_memalign((void**)&_directory, 32, alloc_size);

Review Comment:
   It seems that `posix_memalign` still allocates memory with `TCMalloc`, not `jemalloc`



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] xinyiZzz commented on pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on PR #10446:
URL: https://github.com/apache/doris/pull/10446#issuecomment-1168406883

   LGTM @dataroaring rebase for p0 and UT


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org