lkml.org 
[lkml]   [2021]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7] mm: cma: support sysfs
From
Date
On 3/24/21 2:31 PM, Dmitry Osipenko wrote:
> ...
>> +#include <linux/kobject.h>
>> +
>> +struct cma_kobject {
>> + struct cma *cma;
>> + struct kobject kobj;
>
> If you'll place the kobj as the first member of the struct, then
> container_of will be a no-op.
>

However, *this does not matter*. Let's not get carried away. If
container_of() ends up as a compile-time addition of +8, instead
of +0, there is not going to be a visible effect in the world.
Or do you have some perf data to the contrary?

Sometimes these kinds of things matter. But other times, they are
just pointless to fret about, and this is once such case.


thanks,
--
John Hubbard
NVIDIA

\
 
 \ /
  Last update: 2021-03-24 23:03    [W:0.123 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site