Re: [PATCH v2 03/15] block: Support data lifetime in the I/O priority bitfield

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/23 18:02, Damien Le Moal wrote:
Some have stated interest in CDL in NVMe-oF context, which could
imply that combining CDL and lifetime may be something useful to do
in that space...

We are having this discussion because bi_ioprio is sixteen bits wide and
because we don't want to make struct bio larger. How about expanding the
bi_ioprio field from 16 to 32 bits and to use separate bits for CDL
information and data lifetimes?

This patch does not make struct bio bigger because it changes a three
byte hole with a one byte hole:

--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -268,8 +268,8 @@ struct bio {
                                                 * req_flags.
                                                 */
        unsigned short          bi_flags;       /* BIO_* below */
-       unsigned short          bi_ioprio;
        blk_status_t            bi_status;
+       u32                     bi_ioprio;
        atomic_t                __bi_remaining;

        struct bvec_iter        bi_iter;


From the pahole output:

struct bio {
        struct bio *               bi_next;              /*     0     8 */
        struct block_device *      bi_bdev;              /*     8     8 */
        blk_opf_t                  bi_opf;               /*    16     4 */
        short unsigned int         bi_flags;             /*    20     2 */
        blk_status_t               bi_status;            /*    22     1 */

        /* XXX 1 byte hole, try to pack */

        u32                        bi_ioprio;            /*    24     4 */
        atomic_t                   __bi_remaining;       /*    28     4 */
        struct bvec_iter           bi_iter;              /*    32    20 */
        blk_qc_t                   bi_cookie;            /*    52     4 */
        bio_end_io_t *             bi_end_io;            /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        void *                     bi_private;           /*    64     8 */
        struct bio_crypt_ctx *     bi_crypt_context;     /*    72     8 */
        union {
struct bio_integrity_payload * bi_integrity; /* 80 8 */
        };                                               /*    80     8 */
        short unsigned int         bi_vcnt;              /*    88     2 */
        short unsigned int         bi_max_vecs;          /*    90     2 */
        atomic_t                   __bi_cnt;             /*    92     4 */
        struct bio_vec *           bi_io_vec;            /*    96     8 */
        struct bio_set *           bi_pool;              /*   104     8 */
        struct bio_vec             bi_inline_vecs[];     /*   112     0 */

        /* size: 112, cachelines: 2, members: 19 */
        /* sum members: 111, holes: 1, sum holes: 1 */
        /* last cacheline: 48 bytes */
};

Thanks,

Bart.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux