From: Peter Zijlstra <peterz@infradead.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Mike Snitzer <msnitzer@redhat.com>, Jens Axboe <axboe@kernel.dk>,
Damien Le Moal <dlemoal@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Guangwu Zhang <guazhang@redhat.com>,
dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] completion: move blk_wait_io to kernel/sched/completion.c
Date: Wed, 17 Apr 2024 19:55:38 +0200 [thread overview]
Message-ID: <20240417175538.GP40213@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <31b118f3-bc8d-b18b-c4b9-e57d74a73f@redhat.com>
On Wed, Apr 17, 2024 at 07:49:17PM +0200, Mikulas Patocka wrote:
> Index: linux-2.6/kernel/sched/completion.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched/completion.c 2024-04-17 19:41:14.000000000 +0200
> +++ linux-2.6/kernel/sched/completion.c 2024-04-17 19:41:14.000000000 +0200
> @@ -290,6 +290,26 @@ wait_for_completion_killable_timeout(str
> EXPORT_SYMBOL(wait_for_completion_killable_timeout);
>
> /**
> + * wait_for_completion_long_io - waits for completion of a task
> + * @x: holds the state of this particular completion
> + *
> + * This is like wait_for_completion_io, but it doesn't warn if the wait takes
> + * too long.
> + */
> +void wait_for_completion_long_io(struct completion *x)
> +{
> + /* Prevent hang_check timer from firing at us during very long I/O */
> + unsigned long timeout = sysctl_hung_task_timeout_secs * HZ / 2;
> +
> + if (timeout)
> + while (!wait_for_completion_io_timeout(x, timeout))
> + ;
> + else
> + wait_for_completion_io(x);
> +}
> +EXPORT_SYMBOL(wait_for_completion_long_io);
Urgh, why is it a sane thing to circumvent the hang check timer?
next prev parent reply other threads:[~2024-04-17 17:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 17:49 [PATCH 1/2] completion: move blk_wait_io to kernel/sched/completion.c Mikulas Patocka
2024-04-17 17:55 ` Peter Zijlstra [this message]
2024-04-17 18:00 ` Mikulas Patocka
2024-04-18 4:57 ` Christoph Hellwig
2024-04-18 14:30 ` Jens Axboe
2024-04-18 14:46 ` Christoph Hellwig
2024-04-18 15:09 ` Jens Axboe
2024-04-22 10:59 ` Peter Zijlstra
2024-04-23 12:36 ` Mikulas Patocka
2024-04-26 6:06 ` Christoph Hellwig
2024-04-22 10:54 ` Peter Zijlstra
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=20240417175538.GP40213@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=guazhang@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=mpatocka@redhat.com \
--cc=msnitzer@redhat.com \
--cc=will@kernel.org \
/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