packet_stream: improve buffer alignment

The bulk buffer is now 64Byte-aligned so that the allocated
packets get aligned likewise (assumed the packet allocator uses an
appropriately aligned block size). This ensures that each packet
starts at a new cache line on common platforms.

Issue #3053
This commit is contained in:
Johannes Schlatow 2018-11-09 18:15:54 +01:00 committed by Christian Helmuth
parent 4e375ec6df
commit 74f2954013

View File

@ -487,7 +487,7 @@ class Genode::Packet_stream_base
_ds_local_base(rm.attach(_ds_cap)),
_submit_queue_offset(0),
_ack_queue_offset(_submit_queue_offset + submit_queue_size),
_bulk_buffer_offset(_ack_queue_offset + ack_queue_size)
_bulk_buffer_offset(align_addr(_ack_queue_offset + ack_queue_size, 6))
{
Genode::size_t ds_size = Genode::Dataspace_client(_ds_cap).size();