Thread (52 messages) 52 messages, 8 authors, 2021-12-15

Re: [PATCH v3 net-next 00/23] net: add preliminary netdev refcount tracking

flat view

From: Eric Dumazet <hidden>
Date: 2021-12-08 18:53:59

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 */
};
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help