On Thu, 24 Oct 2024 02:18:59 +0300
Dmitry Kozlyuk <dmitry.kozl...@gmail.com> wrote:

> --- a/lib/eal/common/eal_internal_cfg.h
> +++ b/lib/eal/common/eal_internal_cfg.h
> @@ -103,6 +103,8 @@ struct internal_config {
>       struct simd_bitwidth max_simd_bitwidth;
>       /**< max simd bitwidth path to use */
>       size_t huge_worker_stack_size; /**< worker thread stack size */
> +     /** True to include mapped hugepages in coredump. */
> +     unsigned int huge_dump;

No need to waste 4 bytes for a flag.
Find an existing one byte hole and use that.

struct internal_config {
        volatile size_t            memory;               /*     0     8 */
        volatile unsigned int      force_nchannel;       /*     8     4 */
        volatile unsigned int      force_nrank;          /*    12     4 */
        volatile unsigned int      no_hugetlbfs;         /*    16     4 */
        struct hugepage_file_discipline hugepage_file;   /*    20     2 */

        /* XXX 2 bytes hole, try to pack */

        volatile unsigned int      no_pci;               /*    24     4 */
        volatile unsigned int      no_hpet;              /*    28     4 */
        volatile unsigned int      vmware_tsc_map;       /*    32     4 */
        volatile unsigned int      no_shconf;            /*    36     4 */
        volatile unsigned int      in_memory;            /*    40     4 */
        volatile unsigned int      create_uio_dev;       /*    44     4 */
        volatile enum rte_proc_type_t  process_type;     /*    48     4 */
        volatile unsigned int      force_sockets;        /*    52     4 */
        volatile volatile uint64_t   socket_mem;         /*    56   256 */
        /* --- cacheline 4 boundary (256 bytes) was 56 bytes ago --- */
        volatile unsigned int      force_socket_limits;  /*   312     4 */

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 5 boundary (320 bytes) --- */
        volatile volatile uint64_t   socket_limit;       /*   320   256 */
        /* --- cacheline 9 boundary (576 bytes) --- */
        uintptr_t                  base_virtaddr;        /*   576     8 */
        volatile unsigned int      legacy_mem;           /*   584     4 */
        volatile unsigned int      match_allocations;    /*   588     4 */
        volatile unsigned int      single_file_segments; /*   592     4 */
        volatile int               syslog_facility;      /*   596     4 */
        volatile enum rte_intr_mode  vfio_intr_mode;     /*   600     4 */
        rte_uuid_t                 vfio_vf_token;        /*   604    16 */

        /* XXX 4 bytes hole, try to pack */

        char *                     hugefile_prefix;      /*   624     8 */
        char *                     hugepage_dir;         /*   632     8 */
        /* --- cacheline 10 boundary (640 bytes) --- */
        char *                     user_mbuf_pool_ops_name; /*   640     8 */
        unsigned int               num_hugepage_sizes;   /*   648     4 */

        /* XXX 4 bytes hole, try to pack */

        struct hugepage_info       hugepage_info[3];     /*   656 12720 */
        /* --- cacheline 209 boundary (13376 bytes) --- */
        enum rte_iova_mode         iova_mode;            /* 13376     4 */

        /* XXX 4 bytes hole, try to pack */

        rte_cpuset_t               ctrl_cpuset;          /* 13384   128 */
        /* --- cacheline 211 boundary (13504 bytes) was 8 bytes ago --- */
        volatile unsigned int      init_complete;        /* 13512     4 */
        unsigned int               no_telemetry;         /* 13516     4 */
        struct simd_bitwidth       max_simd_bitwidth;    /* 13520     4 */

        /* XXX last struct has 1 hole */
        /* XXX 4 bytes hole, try to pack */

        size_t                     huge_worker_stack_size; /* 13528     8 */

        /* size: 13536, cachelines: 212, members: 34 */
        /* sum members: 13514, holes: 6, sum holes: 22 */
        /* member types with holes: 1, total: 1 */
        /* last cacheline: 32 bytes */
};

Reply via email to