Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES
From: Geert Uytterhoeven
Date: Thu Dec 26 2019 - 05:43:55 EST
- Next message: Corentin Labbe: "Re: [PATCH v8 0/7] add thermal sensor driver for A64, A83T, H3, H5, H6, R40"
- Previous message: OndÅej Jirman: "Re: [PATCH v8 0/7] add thermal sensor driver for A64, A83T, H3, H5, H6, R40"
- In reply to: Chao Yu: "Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES"
- Next in thread: Vyacheslav Dubeyko: "Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Vyacheslav,
On Wed, Dec 25, 2019 at 10:58 AM Vyacheslav Dubeyko <slava@xxxxxxxxxxx> wrote:
> On Mon, 2019-12-23 at 09:41 +0100, Geert Uytterhoeven wrote:
> > On Mon, Dec 23, 2019 at 5:01 AM Chao Yu <yuchao0@xxxxxxxxxx> wrote:
> > > As Geert Uytterhoeven reported:
> > >
> > > for parameter HZ/50 in congestion_wait(BLK_RW_ASYNC, HZ/50);
> > >
> > > On some platforms, HZ can be less than 50, then unexpected 0
> > > timeout
> > > jiffies will be set in congestion_wait().
>
> It looks like that HZ could have various value on diferent platforms.
> So, why does it need to divide HZ on 50? Does it really necessary?
> Could it be used HZ only without the division operation?
A timeout of HZ means 1 second.
HZ/50 means 20 ms, but has the risk of being zero, if HZ < 50.
If you want to use a timeout of 20 ms, you best use msecs_to_jiffies(20),
as that takes care of the special cases, and never returns 0.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
- Next message: Corentin Labbe: "Re: [PATCH v8 0/7] add thermal sensor driver for A64, A83T, H3, H5, H6, R40"
- Previous message: OndÅej Jirman: "Re: [PATCH v8 0/7] add thermal sensor driver for A64, A83T, H3, H5, H6, R40"
- In reply to: Chao Yu: "Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES"
- Next in thread: Vyacheslav Dubeyko: "Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]