lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3EBFFE1F-0D8E-4F65-9C97-0E94D735C06E@vmware.com>
Date:   Wed, 19 Jul 2023 11:08:32 +0000
From:   Ajay Kaher <akaher@...are.com>
To:     Steven Rostedt <rostedt@...dmis.org>
CC:     "shuah@...nel.org" <shuah@...nel.org>,
        "mhiramat@...nel.org" <mhiramat@...nel.org>,
        Ching-lin Yu <chinglinyu@...gle.com>,
        "linux-kernel@...r.kernel.org" <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>,
        "lkp@...el.com" <lkp@...el.com>, Nadav Amit <namit@...are.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 09/10] eventfs: Move tracing/events to eventfs


> On 15-Jul-2023, at 2:36 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> !! External Email
> 
> On Thu, 13 Jul 2023 17:03:23 +0530
> Ajay Kaher <akaher@...are.com> wrote:
> 
>> Till now /sys/kernel/debug/tracing/events is a part of tracefs,
>> with-in this patch creating 'events' and it's sub-dir as eventfs.
>> Basically replacing tracefs calls with eventfs calls for 'events'.
> 
> [ note: /sys/kernel/debug/tracing is deprecated. Please avoid referencing it. ]
> 
> Up until now, /sys/kernel/tracing/events was no different than any other
> part of tracefs. The files and directories within the events directory was
> created when the tracefs was mounted, and also created for the instances in
> /sys/kernel/tracing/instances/<instance>/events. Most of these files and
> directories will never be referenced. Since there are thousands of these
> files and directories they spend their time wasting precious memory
> resources.
> 
> Move the "events" directory to the new eventfs. The eventfs will take the
> meta data of the events that they represent and store that. When the files
> in the events directory are referenced, the dentry and inodes to represent
> them are then created. When the files are no longer referenced, they are
> freed. This saves the precious memory resources that were wasted on these
> seldom referenced dentries and inodes.
> 

Some correction here:

The dentry and inodes to represent eventfs files or directories will be freed only
during drop cache or eventfs_remove(). This is same as with other dynamic fs
e.g. sysfs or procfs.

We can achieve ‘free the dentry and inodes if no longer requires’ using
create_file()->d_instantiate_anon() instead create_file()->d_instantiate(), but I faced 
some issues. This optimisation we may consider in future along with sysfs, procfs.

-Ajay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ