Project

General

Profile

Actions

Bug #3411

open

We can save 4 bytes in the rfs4_dbe struct

Added by Marcel Telka almost 9 years ago. Updated 4 months ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
nfs - NFS server and client
Start date:
2012-12-11
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

The rfs4_dbe structure is defined as follows:

63struct rfs4_dbe {
64    kmutex_t lock[1];        /* Exclusive lock for entry */
65    uint32_t refcnt;        /* # of references */
66    unsigned skipsearch:1;        /* skip search */
67    unsigned invalid:1;        /* invalid/"freed" entry */
68    unsigned reserved:31;
69    time_t     time_rele;        /* Time of last rele */
70    id_t     id;            /* unique identifier */
71    kcondvar_t cv[1];
72    rfs4_entry_t data;
73    rfs4_table_t *table;
74    rfs4_link indices[1];        /* Array of indices for entry */
75};

By changing reserved:31 to reserved:30 we would save 4 bytes.


Related issues

Blocked by illumos gate - Feature #3409: mdb: Open source implementation of nfs moduleIn Progress2012-12-10

Actions
Actions #1

Updated by Marcel Telka almost 9 years ago

  • Priority changed from Normal to Low
Actions #2

Updated by Dan McDonald 4 months ago

I think this will actually save 8 bytes:

> ::print -ath rfs4_dbe_t
0 rfs4_dbe_t {
    0 kmutex_t [1] dbe_lock 
    8 uint32_t dbe_refcnt 
    c unsigned int:1 dbe_skipsearch :1 
    c.1 unsigned int:1 dbe_invalid :1 
    c.2 unsigned <<HOLE>> :30 <====== /* XXX KEBE SAYS THIS SHOULD BE THE ONLY HOLE! */
    10 unsigned int:31 dbe_reserved :31 
    13.7 unsigned <<HOLE>> :33 
    18 time_t dbe_time_rele <===== THIS should start at offset 0x10
    20 id_t dbe_id 
    24 kcondvar_t [1] dbe_cv 
    26 uint16_t <<HOLE>> 
    28 rfs4_entry_t dbe_data 
    30 rfs4_table_t *dbe_table 
    38 rfs4_link_t [1] dbe_indices 
}
> 

Snagging it as a candidate for my student...

Actions #3

Updated by Dan McDonald 4 months ago

  • Assignee changed from Marcel Telka to Dan McDonald
Actions

Also available in: Atom PDF