Aligning small_buffer in struct unix_stream would help performance. As an array of char, it can and does appear with byte alignment.
Confirmed.
I don't think so, because it is not small_buffer that is used, but rather a char * buffer that can point to small_buffer. Is there a way to say that char * buffer will always be aligned? In that case this could still make sense.
I believe that one could use a GCC attribute to say that the arena will be aligned, but one needs to sprinkle the attribute everywhere that the pointer is allocated and passed as an argument, not just aligning the small buffer itself.
Closing. small_buffer will go away when we implement PR 25561 ("Eventually get rid of the Alloc Stream Facility").