aio: WIP: align PGAlignedBlock to page size
authorAndres Freund <[email protected]>
Wed, 24 Jun 2020 23:35:49 +0000 (16:35 -0700)
committerAndres Freund <[email protected]>
Mon, 11 Jan 2021 23:09:14 +0000 (15:09 -0800)
Author:
Reviewed-By:
Discussion: https://postgr.es/m/
Backpatch:

src/include/c.h

index ae978830dafba72ada6352aae706614588c66f4d..f1cc66354bd53ec3c2b7dc11c2ce5899eb7d15ad 100644 (file)
@@ -1129,7 +1129,7 @@ typedef union PGAlignedBlock
    char        data[BLCKSZ];
    double      force_align_d;
    int64       force_align_i64;
-} PGAlignedBlock;
+} PGAlignedBlock __attribute__((aligned(4096)));
 
 /* Same, but for an XLOG_BLCKSZ-sized buffer */
 typedef union PGAlignedXLogBlock
@@ -1137,7 +1137,7 @@ typedef union PGAlignedXLogBlock
    char        data[XLOG_BLCKSZ];
    double      force_align_d;
    int64       force_align_i64;
-} PGAlignedXLogBlock;
+} PGAlignedXLogBlock  __attribute__((aligned(4096)));
 
 /* msb for char */
 #define HIGHBIT                    (0x80)