All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Li Wang" <liwang@kylinos.cn>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH] virtiofs: fix lost reply due to unaligned cache line sharing
Date: Wed, 25 Nov 2026 09:53:02 +0000	[thread overview]
Message-ID: <sashiko-outbox-233077@kernel.org> (raw)
In-Reply-To: <20261125093908.48619-1-liwang@kylinos.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] fuse: FUSE_REQ_DMA_ALIGN macro on struct fuse_req breaks
  kernel-doc parsing
--

commit 3bc673b953140f81a8cc8d09ee9dceb6e21e9096
Author: Li Wang <liwang@kylinos.cn>

virtiofs: fix lost reply due to unaligned cache line sharing

This commit aligns struct fuse_req::out and struct fuse_req::waitq to
ARCH_DMA_MINALIGN when CONFIG_VIRTIO_FS is enabled and creates the
fuse_request slab cache with struct fuse_req alignment so DMA unmapping
of out.h does not share a cache line with waitq.

> diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h
> index a8eba46a3e51d..e42f3dc30d3b6 100644
> --- a/fs/fuse/fuse_dev_i.h
> +++ b/fs/fuse/fuse_dev_i.h
> @@ -12,6 +12,18 @@
>  #include <linux/wait.h>
>  #include <linux/workqueue.h>
>  #include <linux/fs.h>
> +#include <linux/cache.h>
> +
> +/*
> + * virtiofs DMA-maps fuse_req::out.h for DMA_FROM_DEVICE in place.
> + * Put @out on its own granule and start @waitq on the next one.
> + * fuse_dev_init() allocates the slab at this alignment.
> + */
> +#if IS_ENABLED(CONFIG_VIRTIO_FS)
> +#define FUSE_REQ_DMA_ALIGN __aligned(ARCH_DMA_MINALIGN)
> +#else
> +#define FUSE_REQ_DMA_ALIGN
> +#endif
>  
>  /* Ordinary requests have even IDs, while interrupts IDs are odd */
>  #define FUSE_INT_REQ_BIT (1ULL << 0)
> @@ -94,10 +106,10 @@ struct fuse_req {
>  	struct {
>  		/** @out.h: The request output header */
>  		struct fuse_out_header h;
> -	} out;
> +	} out FUSE_REQ_DMA_ALIGN;
>  
>  	/** @waitq: Used to wake up the task waiting for completion of request */
> -	wait_queue_head_t waitq;
> +	wait_queue_head_t waitq FUSE_REQ_DMA_ALIGN;

[Severity: Low]
Does placing FUSE_REQ_DMA_ALIGN after the member names break kernel-doc
parsing for struct fuse_req?

scripts/kernel-doc strips known attributes such as __aligned(...) from
struct members (via CTransforms.struct_xforms in
tools/lib/python/kdoc/xforms_lists.py), but it does not expand custom
wrapper macros.  As a result, kernel-doc parses FUSE_REQ_DMA_ALIGN as the
member identifier instead of out and waitq, emitting warnings for an
undescribed FUSE_REQ_DMA_ALIGN member and excess descriptions for out,
out.h, and waitq.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125093908.48619-1-liwang@kylinos.cn?part=1

  reply	other threads:[~2026-11-25  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  9:39 [PATCH] virtiofs: fix lost reply due to unaligned cache line sharing Li Wang
2026-11-25  9:53 ` sashiko-bot [this message]
2026-11-25 10:46 ` Michael S. Tsirkin

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=sashiko-outbox-233077@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=liwang@kylinos.cn \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.