From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Salman Qazi <sqazi@google.com>,
Jesse Barnes <jsbarnes@google.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/2] block: add blk_default_io_timeout() for avoiding task hung in sync IO
Date: Sun, 3 May 2020 09:43:43 +0800 [thread overview]
Message-ID: <20200503014343.GA1120601@T590> (raw)
In-Reply-To: <61520b08-326d-036b-e69d-08e2cad4d3c8@acm.org>
On Wed, Apr 29, 2020 at 08:08:03PM -0700, Bart Van Assche wrote:
> On 2020-04-28 18:17, Ming Lei wrote:
> > On Tue, Apr 28, 2020 at 07:19:33AM -0700, Bart Van Assche wrote:
> >> On 2020-04-28 00:46, Ming Lei wrote:
> >>> +/*
> >>> + * Used in sync IO for avoiding to triger task hung warning, which may
> >>> + * cause system panic or reboot.
> >>> + */
> >>> +static inline unsigned long blk_default_io_timeout(void)
> >>> +{
> >>> + return sysctl_hung_task_timeout_secs * (HZ / 2);
> >>> +}
> >>> +
> >>> #endif
> >>
> >> This function is only used inside the block layer. Has it been
> >> considered to move this function from the public block layer API into a
> >> private header file, e.g. block/blk.h?
> >
> > Please look at the commit log or the 2nd patch, and the helper will be
> > used in 2nd patch in dio code.
>
> Has it been considered to use the expression
> "sysctl_hung_task_timeout_secs * (HZ / 2)" directly instead of wrapping
> that expression in a function? I think using the expression directly may
> be more clear. Additionally, it is slightly confusing that the function
> name starts with "blk_" but that nothing in the implementation of that
> function is specific to the block layer.
Fine, will do it in V2.
thanks,
Ming
next prev parent reply other threads:[~2020-05-03 1:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 7:46 [PATCH 0/2] block: prevent task hung from being triggered in sync dio Ming Lei
2020-04-28 7:46 ` [PATCH 1/2] block: add blk_default_io_timeout() for avoiding task hung in sync IO Ming Lei
2020-04-28 8:05 ` Hannes Reinecke
2020-04-28 8:30 ` Ming Lei
2020-04-28 14:19 ` Bart Van Assche
2020-04-29 1:17 ` Ming Lei
2020-04-30 3:08 ` Bart Van Assche
2020-05-03 1:43 ` Ming Lei [this message]
2020-04-28 7:46 ` [PATCH 2/2] block: add blk_io_schedule() for avoiding task hung in sync dio Ming Lei
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=20200503014343.GA1120601@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=jsbarnes@google.com \
--cc=linux-block@vger.kernel.org \
--cc=sqazi@google.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).