From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Alex Markuze <amarkuze@redhat.com>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rppt@kernel.org" <rppt@kernel.org>,
"lorenzo.stoakes@oracle.com" <lorenzo.stoakes@oracle.com>,
Xiubo Li <xiubli@redhat.com>,
"idryomov@gmail.com" <idryomov@gmail.com>,
"david@redhat.com" <david@redhat.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"vbabka@suse.cz" <vbabka@suse.cz>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
Ingo Molnar <mingo@redhat.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"surenb@google.com" <surenb@google.com>,
Valentin Schneider <vschneid@redhat.com>,
"kees@kernel.org" <kees@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"mhocko@suse.com" <mhocko@suse.com>,
"bsegall@google.com" <bsegall@google.com>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>
Subject: Re: [RFC PATCH 5/5] ceph: Activate BLOG logging
Date: Mon, 3 Nov 2025 21:00:01 +0000 [thread overview]
Message-ID: <c5968bdea851365e6c27637a16ccb094f8254e5d.camel@ibm.com> (raw)
In-Reply-To: <20251024084259.2359693-6-amarkuze@redhat.com>
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.
next prev parent reply other threads:[~2025-11-03 21:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 8:42 [RFC PATCH 0/5] BLOG: per-task logging contexts with Ceph consumer Alex Markuze
2025-10-24 8:42 ` [RFC PATCH 1/5] sched, fork: Wire BLOG contexts into task lifecycle Alex Markuze
2025-10-24 17:44 ` Steven Rostedt
2025-10-29 18:57 ` Viacheslav Dubeyko
2025-10-24 8:42 ` [RFC PATCH 2/5] lib: Introduce BLOG (Binary LOGging) subsystem Alex Markuze
2025-10-30 18:47 ` Viacheslav Dubeyko
2025-10-24 8:42 ` [RFC PATCH 3/5] ceph: Add BLOG scaffolding Alex Markuze
2025-11-03 22:37 ` Viacheslav Dubeyko
2025-10-24 8:42 ` [RFC PATCH 4/5] ceph: Add BLOG debugfs support Alex Markuze
2025-11-03 21:07 ` Viacheslav Dubeyko
2025-10-24 8:42 ` [RFC PATCH 5/5] ceph: Activate BLOG logging Alex Markuze
2025-11-03 21:00 ` Viacheslav Dubeyko [this message]
2025-10-24 15:32 ` [RFC PATCH 0/5] BLOG: per-task logging contexts with Ceph consumer David Hildenbrand
2025-10-24 17:53 ` Steven Rostedt
2025-10-25 10:50 ` Alex Markuze
2025-10-25 14:59 ` Steven Rostedt
2025-10-25 17:54 ` Alex Markuze
2025-10-27 14:54 ` Steven Rostedt
2025-10-28 17:07 ` Viacheslav Dubeyko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c5968bdea851365e6c27637a16ccb094f8254e5d.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=amarkuze@redhat.com \
--cc=bsegall@google.com \
--cc=ceph-devel@vger.kernel.org \
--cc=david@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=idryomov@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=xiubli@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).