tungtose commented on code in PR #2921:
URL: https://github.com/apache/iggy/pull/2921#discussion_r2936830414
##########
core/common/src/alloc/memory_pool.rs:
##########
@@ -16,26 +16,25 @@
* under the License.
*/
-use bytes::BytesMut;
+use aligned_vec::{AVec, ConstAlign};
use crossbeam::queue::ArrayQueue;
use human_repr::HumanCount;
use once_cell::sync::OnceCell;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use tracing::{info, trace, warn};
+pub const ALIGNMENT: usize = 4096;
Review Comment:
This is the issue I am referencing:
https://github.com/DataDog/glommio/issues/7 and this
[answer](https://unix.stackexchange.com/questions/761398/are-there-any-benefits-in-setting-a-hdds-logical-sector-size-to-4kn#:~:text=I%20still%20don't%20have,4096%20bytes%20won't%20hurt.&text=It%20can%20then%20be%20changed,with%20the%20manufacturer's%20proprietary%20tools.)
and for my naive thinking is that, 4096 is aligned to both 512 and 4096 but
512 is only aligned to 512. and most modern devices use 4096
--
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]