linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Kellermann <max@blarg.de>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org, idryomov@gmail.com,
	linux-fsdevel@vger.kernel.org, pdonnell@redhat.com,
	amarkuze@redhat.com, Slava.Dubeyko@ibm.com, vdubeyko@redhat.com
Subject: Re: [RFC PATCH 02/20] ceph: add comments to metadata structures in buffer.h
Date: Fri, 5 Sep 2025 23:43:06 +0200	[thread overview]
Message-ID: <aLtZatfYT7jy4sdL@swift.blarg.de> (raw)
In-Reply-To: <20250905200108.151563-3-slava@dubeyko.com>

On 2025/09/05 22:00, Viacheslav Dubeyko <slava@dubeyko.com> wrote:
> Claude AI generated comments

Is LLM-generated text acceptable in the kernel?  Last week, I was
asked to add more explanations to a patch, but it was rejected because
I was accused of having used a LLM.

I feel that asking others to review LLM-generated content is a DoS on
their time.

>  /*
> - * a simple reference counted buffer.
> - *
> - * use kmalloc for smaller sizes, vmalloc for larger sizes.
> + * Reference counted buffer metadata: Simple buffer management with automatic
> + * memory allocation strategy. Uses kmalloc for smaller buffers and vmalloc
> + * for larger buffers to optimize memory usage and fragmentation.

This rephrasing done by your LLM is wrong.  Previously, the buffer
(i.e. the struct) was "simple".  Now, the management of this data
structure is called "simple".  Can you explain why you thought
changing this meaning is an improvement?

Even ignoring this part, I don't see any other improvement here.  This
just expands the wording (requires more time to read) but adds no
value.

>   */
>  struct ceph_buffer {
> +	/* Reference counting for safe shared access */

This is not "reference counting", but a "reference counter".  But who
really needs to be taught what a "struct kref" is?

And what does "safe shared access" mean?  This wording sounds like
it's for (thread) synchronization, but it's really only about knowing
when the object can be freed because no reference exists.

>  	struct kref kref;
> +	/* Kernel vector containing buffer pointer and length */

I don't think it is helpful to add an explanation of what a "struct
kvec" consists of here.  This is just redundant noise.

>  	struct kvec vec;
> +	/* Total allocated buffer size (may be larger than vec.iov_len) */
>  	size_t alloc_len;

This is the only useful piece of information added by this patch,
albeit trivial enough for everybody to induce from the name.

I'm not so excited about what you got from Claude here.

  reply	other threads:[~2025-09-05 21:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 20:00 [RFC PATCH 00/20] add comments in include/linux/ceph/*.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 01/20] ceph: add comments to metadata structures in auth.h Viacheslav Dubeyko
2025-09-05 21:50   ` Max Kellermann
2025-09-05 20:00 ` [RFC PATCH 02/20] ceph: add comments to metadata structures in buffer.h Viacheslav Dubeyko
2025-09-05 21:43   ` Max Kellermann [this message]
2025-09-05 20:00 ` [RFC PATCH 03/20] ceph: add comments in ceph_debug.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 04/20] ceph: add comments to declarations in ceph_features.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 05/20] ceph: rework comments in ceph_frag.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 06/20] ceph: add comments to metadata structures in ceph_fs.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 07/20] ceph: add comments in ceph_hash.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 08/20] ceph: add comments to metadata structures in cls_lock_client.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 09/20] ceph: add comments to metadata structures in libceph.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 10/20] ceph: add comments to metadata structures in messenger.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 11/20] ceph: add comments to metadata structures in mon_client.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 12/20] ceph: add comments to metadata structures in msgpool.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 13/20] ceph: add comments to metadata structures in msgr.h Viacheslav Dubeyko
2025-09-05 22:18   ` Max Kellermann
2025-09-05 20:01 ` [RFC PATCH 14/20] ceph: add comments to metadata structures in osd_client.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 15/20] ceph: add comments to metadata structures in osdmap.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 16/20] ceph: add comments to metadata structures in pagelist.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 17/20] ceph: add comments to metadata structures in rados.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 18/20] ceph: add comments to metadata structures in string_table.h Viacheslav Dubeyko
2025-09-05 22:00   ` Max Kellermann
2025-09-05 20:01 ` [RFC PATCH 19/20] ceph: add comments to metadata structures in striper.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 20/20] ceph: add comments to metadata structures in types.h 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=aLtZatfYT7jy4sdL@swift.blarg.de \
    --to=max@blarg.de \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pdonnell@redhat.com \
    --cc=slava@dubeyko.com \
    --cc=vdubeyko@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).