Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9781338ybl; Thu, 26 Dec 2019 05:17:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxt+JsmZ+kJj9la+CHYq38j8qB2IayFL1yn0imADa7ODCxL0G18nyguUfl4d7Iab8lRNyBq X-Received: by 2002:a9d:65cb:: with SMTP id z11mr30967422oth.348.1577366248791; Thu, 26 Dec 2019 05:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577366248; cv=none; d=google.com; s=arc-20160816; b=gMNLMyDXkSjyN3A/CVGpHvzZLr9QUJvZzZT/OvtYntR8NMP3e7HpvzqQKarQ1VvF0i 2KWhme5/C2NwC98V7m3qeHbbdjBDq7slNGRExKtbUcUzW5MqFrieP4uFSqBdjffLyPxu KwH6XMN0pRpg8LLZKiii/T1LTuGb9oNI7a3NcWRgYWKffRq9bnSTx92ZMUBx8jYOif2+ fciUP/UPZ+V5oaOWsIdQAwNq53/uqWebBrvjCo5yg5ejhfuh9D69a5MDOSyN/LROmNy8 1DpnoP3dWuczkOAF5LK+r2ODk/VqscsDCvGwW9PnKhhPDfWk5Tdf2thTZatCJq8UpE3g XM2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=YXEQfNaH8VgTuSjnmguZGyC11qEHXS5tzAGI8RrbPY8=; b=TUS3wEwZMkmLtl+6bTQaDm0SM9Hh8Dwjx0FtMXaIBEeCQ18YE/O5Z4mLWL+U2ysfjp Y4hjRQHGg5p5SLauArX+cZMdllcG/hySOP4Vv3Kcbfazytdyl2RC988INz5HahBP3OqY 6KnPTwn/DBbiXZQdxUnIlNxdtsG7gFkMrZMCcJV1y55M/kwlstnbPdzJlZ/9uOhRuw11 pcDL3qFU2t9XXVgPzuMbMFpUIAIy7anGShREt2P3xcjorsb+B6J1IiwJjEWYDwFeZR10 f6ZhEPcunoDQTEFnVb5ySyYaccHpslwfuGO1uxF+iepP/tdz4qdh87/+8G1tnH/OHI0N Yg9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si13349585oie.87.2019.12.26.05.17.16; Thu, 26 Dec 2019 05:17:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbfLZNQg (ORCPT + 99 others); Thu, 26 Dec 2019 08:16:36 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41600 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfLZNQg (ORCPT ); Thu, 26 Dec 2019 08:16:36 -0500 Received: by mail-ot1-f67.google.com with SMTP id r27so32509003otc.8; Thu, 26 Dec 2019 05:16:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YXEQfNaH8VgTuSjnmguZGyC11qEHXS5tzAGI8RrbPY8=; b=GF4b3ctqjMVQ3Jb+e46vQOkSONVLZM3KfdYhX1urh4bwGFznUnLyqDfv/lU4OUuZXv z/YUjzsd6ag4gY/reT8TJEd11yEJLqFLMQ3CAB447vVWlcIk4g4SZ0JuHWcxsBU7d0Hf kXKC5BPxvuCrJFIHlOFs5j/UJ4/CWLaJ+0mqIIHoZmABDimhlvS2NXLB1pUGQ21MFwtT odAKwTFtE3s6E5cR2og1ncJHV3aVuPgAsGV10eSL6Pmzw/NmCl6prTibmP06QwwGPV6C wo3RDRIOxZ8lbE6ppWHVhgWeB55g+mkejbZxtuxXRc5+qOp5UmT4a4ckB2IbaYqghoUm KVhg== X-Gm-Message-State: APjAAAUXbrfw1/GHX/YeJISltDc3BdCWwSuPxYMJ1wICqozjgX2cmffE mm/1dIe2u2OWzwfuiMmdDcMHYiNHShUL4MrW9T8= X-Received: by 2002:a9d:7984:: with SMTP id h4mr51311676otm.297.1577366195614; Thu, 26 Dec 2019 05:16:35 -0800 (PST) MIME-Version: 1.0 References: <20191223040020.109570-1-yuchao0@huawei.com> <1cc2d2a093ebb15a1fc6eb96d683e918a8d5a7d4.camel@dubeyko.com> <61e43dcb781c9e880fac95b525830fd384de122a.camel@dubeyko.com> In-Reply-To: <61e43dcb781c9e880fac95b525830fd384de122a.camel@dubeyko.com> From: Geert Uytterhoeven Date: Thu, 26 Dec 2019 14:16:24 +0100 Message-ID: Subject: Re: [PATCH] f2fs: introduce DEFAULT_IO_TIMEOUT_JIFFIES To: Vyacheslav Dubeyko Cc: Chao Yu , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net, Linux Kernel Mailing List , Chao Yu , Linux FS Devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vyacheslav, On Thu, Dec 26, 2019 at 2:08 PM Vyacheslav Dubeyko wrote: > On Thu, 2019-12-26 at 11:43 +0100, Geert Uytterhoeven wrote: > > On Wed, Dec 25, 2019 at 10:58 AM Vyacheslav Dubeyko < > > slava@dubeyko.com> wrote: > > > On Mon, 2019-12-23 at 09:41 +0100, Geert Uytterhoeven wrote: > > > > On Mon, Dec 23, 2019 at 5:01 AM Chao Yu > > > > 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. > > > > The msecs_to_jiffies(20) looks much better for my taste. Maybe, we > could use this as solution of the issue? Thanks, sounds good to me. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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