Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9637511ybl; Thu, 26 Dec 2019 02:45:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwMbpG7nVhjJj9hkQ5Kj468cmnwk2thqg6DnDCNuBvZCsQL5iBvyi7jgBtI6E/rBwhx9yGK X-Received: by 2002:a9d:6f11:: with SMTP id n17mr35694330otq.126.1577357159822; Thu, 26 Dec 2019 02:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577357159; cv=none; d=google.com; s=arc-20160816; b=iRy4FyF3VDEJ7KRJGWAu1OHxnporc0aZjz/zofpOFZI+uZn93dlkDRqynN1KA1auL/ +12t27JfdzVW1N6guvf6E1BTePZsjaNH+OeRgHOe7AFKhRux4MzXb/fabexsOm1xrDQN 78R1BSZ25lGLEbuQbcPmIw7SOVpwMQFmm0+lGH1f+kQ1pHCFHI8d+1slao27dyw+GV7T QmBc9VslJGOO51zGX4L6+g5ZTkvvrvENvaYMP2O1FVLc0cDXe6BxTlo+m1XAeBmhkuPG vqfDAzeE72EaEu39sniHSVH4gUPCgJawKSp2J/NQW3t0UyMKJr5Pqoyd3hfR0SAv6oNT VAzw== 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=CciSmY8mQmtaNJQQRD2CEzQF42UO9vxilmnwdC9yw6Y=; b=cUsuAKQCyPRbfH5Nyh72ZIKgEKmiyF32IDgFoGiD/2JlV+XtwkBInKs9xjnWi/MXgi PcgKBGPEKZTwW0Yv5Eyp0yJ2EOseo7tvCvR9r7PlTSi/gYBu9kfbKo+rq3X37jlkHqUY xXRqKERZNnM1we3eUkODSeXdnChdiHpexbTcGnCsP2uk15Au/AZyE72O7XZwJIn8E/o6 iRIHJ88OiaO9EViwYA0rF0JXw7NgvNyliyG0FN9djMQ8cm0GXrdrYmaXkfTY73yIhk3o u0GM+sigERqM8fDcJKEf9KMym32vQz/sMTvqz0+mHk7cGtBFTa3kTuqJx6nIbYTUQMy6 mF8Q== 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 101si11830772otm.168.2019.12.26.02.45.48; Thu, 26 Dec 2019 02:45:59 -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 S1726472AbfLZKnu (ORCPT + 99 others); Thu, 26 Dec 2019 05:43:50 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34887 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfLZKnu (ORCPT ); Thu, 26 Dec 2019 05:43:50 -0500 Received: by mail-ot1-f65.google.com with SMTP id k16so27567916otb.2; Thu, 26 Dec 2019 02:43:50 -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=CciSmY8mQmtaNJQQRD2CEzQF42UO9vxilmnwdC9yw6Y=; b=b74CcF25mImP66sBDSQR+v9dMkqvuhKKJpNN4CBLxTxEi4jAl17wNprjU840rniIxa kDi6a4QucEu2oCW8/fVIn7baEIW4m8UJvpYnqBsZmrx0+cFkEdcZG1/EnBGqpLIwVvtz 8jUZ4bAOYnCA3uG27e6wnq6e5SQk24uZes3fUVPphRsd0+5Livy6AjWPjgvEotLlvS/9 HRDGBBYVxrCPexHF/X33fMb1DP9w/II0CkZnfo12E8c4Lha1DGsU2hfaVQTFHXqM742U gylk4dQvh1j88xT+WJXd876F5OblFcr9oiqX4eQorWsJrA5jbr9N3Rsym0P8KAblFkph 8aiw== X-Gm-Message-State: APjAAAXVwVf7kZu2yE2NjusTGu2JwNaDY5PAEx/Y+i1RW0YgH1QvAGEe Ga55Z3GrEEPsjf340T/5eIyoTdHMpTFvXJvzLzk= X-Received: by 2002:a9d:8f1:: with SMTP id 104mr45680549otf.107.1577357029668; Thu, 26 Dec 2019 02:43:49 -0800 (PST) MIME-Version: 1.0 References: <20191223040020.109570-1-yuchao0@huawei.com> <1cc2d2a093ebb15a1fc6eb96d683e918a8d5a7d4.camel@dubeyko.com> In-Reply-To: <1cc2d2a093ebb15a1fc6eb96d683e918a8d5a7d4.camel@dubeyko.com> From: Geert Uytterhoeven Date: Thu, 26 Dec 2019 11:43:38 +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 Wed, Dec 25, 2019 at 10:58 AM Vyacheslav Dubeyko 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. 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