Hi,

While learning QEMU, I notice that some fields of structures are
comment with "should fit in a cache line." For instance, the
MemoryRegion is defined as:

struct MemoryRegion {
    Object parent_obj;

    /* private: */

    /* The following fields should fit in a cache line */
    bool romd_mode;
    bool ram;
    /* ... */

I know we can get better memory performance if their size can fit in a
cache line, but doesn't it would do so only if they aligned adequately
on an address that's a multiple of 64? Do we make sure most uses of
those structures are aligned, or I misunderstood something?

Thanks.



Reply via email to