[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5968bdea851365e6c27637a16ccb094f8254e5d.camel@ibm.com>
Date: Mon, 3 Nov 2025 21:00:01 +0000
From: Viacheslav Dubeyko <Slava.Dubeyko@....com>
To: "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Alex Markuze
	<amarkuze@...hat.com>,
        "ceph-devel@...r.kernel.org"
	<ceph-devel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
        "rppt@...nel.org"
	<rppt@...nel.org>,
        "lorenzo.stoakes@...cle.com" <lorenzo.stoakes@...cle.com>,
        Xiubo Li <xiubli@...hat.com>,
        "idryomov@...il.com" <idryomov@...il.com>,
        "david@...hat.com" <david@...hat.com>,
        "mgorman@...e.de" <mgorman@...e.de>, "vbabka@...e.cz" <vbabka@...e.cz>,
        "vincent.guittot@...aro.org"
	<vincent.guittot@...aro.org>,
        "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>,
        "Liam.Howlett@...cle.com"
	<Liam.Howlett@...cle.com>,
        Ingo Molnar <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "surenb@...gle.com"
	<surenb@...gle.com>,
        Valentin Schneider <vschneid@...hat.com>,
        "kees@...nel.org" <kees@...nel.org>,
        "peterz@...radead.org"
	<peterz@...radead.org>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "bsegall@...gle.com" <bsegall@...gle.com>,
        "juri.lelli@...hat.com"
	<juri.lelli@...hat.com>
Subject: Re:  [RFC PATCH 5/5] ceph: Activate BLOG logging
On Fri, 2025-10-24 at 08:42 +0000, Alex Markuze wrote:
> Convert all debug logging calls from dout/doutc to bout/boutc throughout
> the Ceph filesystem code, enabling binary logging for improved performance
> and reduced overhead on hot paths.
> 
> **Scope of changes:**
> This commit is a mechanical transformation that replaces every instance of
> the traditional text-based logging macros (dout/doutc) with their binary
> logging equivalents (bout/boutc) across the entire Ceph client codebase.
> 
> **Modified subsystems:**
> - **Address space operations** (addr.c): Page cache, writeback, readahead
> - **Capability management** (caps.c): MDS capability tracking and revocation
> - **Crypto operations** (crypto.c): Encryption context handling
> - **Directory operations** (dir.c): Lookups, readdir, dcache management
> - **Export operations** (export.c): NFS export support
> - **File operations** (file.c): Open, read, write, mmap, fsync
> - **Inode operations** (inode.c): Inode lifecycle, attribute updates
> - **Ioctl operations** (ioctl.c): Special file operations
> - **POSIX locks** (locks.c): File locking operations
> - **MDS client** (mds_client.c): Metadata server communication and sessions
> - **MDS map** (mdsmap.c): MDS cluster topology tracking
> - **Quota management** (quota.c): Directory quota enforcement
> - **Snapshot operations** (snap.c): Snapshot realm management
> - **Superblock operations** (super.c): Mount, unmount, statfs
> - **Extended attributes** (xattr.c): Getxattr, setxattr, listxattr
> 
> **ceph_debug.h modifications:**
> Updated the debug header to define bout/boutc as the primary logging
> interface when CONFIG_BLOG is enabled, with automatic fallback to dout/doutc
> when BLOG is disabled. This ensures the code builds and runs correctly in
> both configurations.
> 
> **Performance impact:**
> Binary logging significantly reduces the overhead of debug logging by:
> - Deferring string formatting to userspace deserialization time
> - Using lock-free TLS contexts for log buffer allocation
> - Eliminating sprintf overhead on hot paths
> - Reducing cache pressure from format string processing
> 
> Debug logs can now be enabled in production with minimal performance impact,
> providing valuable diagnostic data without the overhead of traditional text
> logging. The binary format also enables more sophisticated analysis tools
> and higher log throughput.
> 
> **Compatibility:**
> The logging semantics remain identical - same log levels, same subsystem
> filtering, same conditional logic. Existing log analysis workflows can be
> adapted by deserializing BLOG buffers exported through debugfs (introduced
> in the previous commit).
> 
> After this commit, the Ceph filesystem uses BLOG for all debug logging when
> CONFIG_BLOG is enabled. Userspace tools can read binary logs from debugfs
> and deserialize them back to human-readable format using the format strings
> registered in the BLOG source ID registry.
I am slightly lost myself in the code. And, probably, I am missing the point.
But, as far as I can see, the doutc macro has simply being renamed on boutc:
-# define doutc(client, fmt, ...)					\
+# define boutc(client, fmt, ...)					\
 	pr_debug(" [%pU %llu] %s: " fmt, &client-
>fsid,			\
 		 client->monc.auth->global_id, __func__, ##__VA_ARGS__)
But how does it use the BLOG subsystem?
I am simply trying to understand how the Ceph's debugging subsystem can work
with enabled and disabled CONFIG_BLOB compilation option.
Thanks,
Slava.
Powered by blists - more mailing lists