[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66DACCE8-1C57-4A30-8ACF-D88179CA6381@vmware.com>
Date: Fri, 21 Jul 2023 17:17:24 +0000
From: Nadav Amit <namit@...are.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: Ajay Kaher <akaher@...are.com>,
"shuah@...nel.org" <shuah@...nel.org>,
"mhiramat@...nel.org" <mhiramat@...nel.org>,
Ching-lin Yu <chinglinyu@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"linux-trace-kernel@...r.kernel.org"
<linux-trace-kernel@...r.kernel.org>,
kernel test robot <lkp@...el.com>,
"oe-lkp@...ts.linux.dev" <oe-lkp@...ts.linux.dev>,
Alexey Makhalov <amakhalov@...are.com>,
"er.ajay.kaher@...il.com" <er.ajay.kaher@...il.com>,
"srivatsa@...il.mit.edu" <srivatsa@...il.mit.edu>,
Tapas Kundu <tkundu@...are.com>,
Vasavi Sirnapalli <vsirnapalli@...are.com>
Subject: Re: [PATCH v4 00/10] tracing: introducing eventfs
> On Jul 21, 2023, at 6:19 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
>> union {
>> + struct list_head del_list;
>> struct rcu_head rcu;
>> - struct llist_node llist; /* For freeing after RCU */
>> + unsigned long is_freed; /* Freed if one of the above is set */
>
> I changed the freeing around. The dentries are freed before returning from
> eventfs_remove_dir().
>
> I also added a "is_freed" field that is part of the union and is set if
> list elements have content. Note, since the union was criticized before, I
> will state the entire purpose of doing this patch set is to save memory.
> This structure will be used for every event file. What's the point of
> getting rid of dentries if we are replacing it with something just as big?
> Anyway, struct dentry does the exact same thing!
Hey, don’t shoot me…
[And admittedly, I didn’t review the whole series after v1.]
I understand your position, but I think that at least is_freed should not
be in the union, and you can just put it after umode_t.
Even for the matter of size, it should not matter in most architectures
since umode_t is 16-bit, as natural alignment is at least 32-bits.
[ And “bool" is clearer type for is_freed. ]
Powered by blists - more mailing lists