[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iK9ijiQb9ihAZwywzqmOmEbz8YA375SAAzEAUq_vxUSmw@mail.gmail.com>
Date: Wed, 8 Dec 2021 10:53:45 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>,
Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [PATCH v3 net-next 00/23] net: add preliminary netdev refcount tracking
On Wed, Dec 8, 2021 at 10:21 AM Eric Dumazet <edumazet@...gle.com> 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 */
};
Powered by blists - more mailing lists