On Wed, Dec 8, 2021 at 10:21 AM Eric Dumazet [off-list ref] wrote:
I do not think ns precision of a ktime_t is really needed.
jiffies should be enough, saving potential high cost of ktime_get_ns()
Also worth mentioning this is doubling size of ref_tracker.
(going from 32-byte to 64-bytes standard kmem cache)
I would advise creating a dedicated kmem_cache to avoid wasting memory.
current layout being:
struct ref_tracker {
struct list_head head; /* 0 0x10 */
bool dead; /* 0x10 0x1 */
/* XXX 3 bytes hole, try to pack */
depot_stack_handle_t alloc_stack_handle; /* 0x14 0x4 */
depot_stack_handle_t free_stack_handle; /* 0x18 0x4 */
/* size: 32, cachelines: 1, members: 4 */
/* sum members: 25, holes: 1, sum holes: 3 */
/* padding: 4 */
/* last cacheline: 32 bytes */
};