public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Long Li <leo.lilong@huawei.com>
To: Bernd Schubert <bernd@bsbernd.com>, <miklos@szeredi.hu>
Cc: <linux-fsdevel@vger.kernel.org>, <bschubert@ddn.com>,
	<yangerkun@huawei.com>, <lonuxli.64@gmail.com>
Subject: Re: [PATCH] fuse: limit debug log output during ring teardown
Date: Wed, 3 Dec 2025 09:31:48 +0800	[thread overview]
Message-ID: <aS-SpUnw4AVCLrSS@localhost.localdomain> (raw)
In-Reply-To: <71e2ccaa-325b-4dd4-b5b7-fd470924c104@bsbernd.com>

On Tue, Dec 02, 2025 at 06:40:10PM +0100, Bernd Schubert wrote:
> Hi Long,
> 
> On 11/29/25 12:06, Long Li wrote:
> > Currently, if there are pending entries in the queue after the teardown
> > timeout, the system keeps printing entry state information at very short
> > intervals (FUSE_URING_TEARDOWN_INTERVAL). This can flood the system logs.
> > Additionally, ring->stop_debug_log is set but not used.
> > 
> > Use ring->stop_debug_log as a control flag to only print entry state
> > information once after teardown timeout, preventing excessive debug
> > output. Also add a final message when all queues have stopped.
> > 
> > Signed-off-by: Long Li <leo.lilong@huawei.com>
> > ---
> >  fs/fuse/dev_uring.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> > index 5ceb217ced1b..d71ccdf78887 100644
> > --- a/fs/fuse/dev_uring.c
> > +++ b/fs/fuse/dev_uring.c
> > @@ -453,13 +453,15 @@ static void fuse_uring_async_stop_queues(struct work_struct *work)
> >  	 * If there are still queue references left
> >  	 */
> >  	if (atomic_read(&ring->queue_refs) > 0) {
> > -		if (time_after(jiffies,
> > +		if (!ring->stop_debug_log && time_after(jiffies,
> >  			       ring->teardown_time + FUSE_URING_TEARDOWN_TIMEOUT))
> >  			fuse_uring_log_ent_state(ring);
> >  
> >  		schedule_delayed_work(&ring->async_teardown_work,
> >  				      FUSE_URING_TEARDOWN_INTERVAL);
> >  	} else {
> > +		if (ring->stop_debug_log)
> > +			pr_info("All queues in the ring=%p have stopped\n", ring);
> >  		wake_up_all(&ring->stop_waitq);
> >  	}
> >  }
> 
> 
> how about like this?
> 
> diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> index f6b12aebb8bb..a527e58b404a 100644
> --- a/fs/fuse/dev_uring.c
> +++ b/fs/fuse/dev_uring.c
> @@ -452,9 +452,11 @@ static void fuse_uring_async_stop_queues(struct work_struct *work)
>          * If there are still queue references left
>          */
>         if (atomic_read(&ring->queue_refs) > 0) {
> -               if (time_after(jiffies,
> -                              ring->teardown_time + FUSE_URING_TEARDOWN_TIMEOUT))
> +               if (time_after(jiffies, ring->teardown_time +
> +                                       FUSE_URING_TEARDOWN_TIMEOUT)) {
>                         fuse_uring_log_ent_state(ring);
> +                       ring->teardown_time = jiffies;
> +               }
>  
>                 schedule_delayed_work(&ring->async_teardown_work,
>                                       FUSE_URING_TEARDOWN_INTERVAL);
> 
> Most of it is formatting, it just updates  "ring->teardown_time = jiffies",
> idea is that is logs the remaining entries. If you run into it there is
> probably a bug - io-uring will also start to spill warnings.
> 
> 
> Thanks,
> Bernd
> 

Hi, Bernd

Thanks for your reply, if we want to continuously log entries that have
not been stopped, the change to update teardown_time looks good to me,
and ring->stop_debug_log can be deleted if it is not used.

Long Li
Thanks


      reply	other threads:[~2025-12-03  1:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 11:06 [PATCH] fuse: limit debug log output during ring teardown Long Li
2025-12-02 17:40 ` Bernd Schubert
2025-12-03  1:31   ` Long Li [this message]

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=aS-SpUnw4AVCLrSS@localhost.localdomain \
    --to=leo.lilong@huawei.com \
    --cc=bernd@bsbernd.com \
    --cc=bschubert@ddn.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lonuxli.64@gmail.com \
    --cc=miklos@szeredi.hu \
    --cc=yangerkun@huawei.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