From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F261CC4727E for ; Wed, 30 Sep 2020 11:27:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D9C220708 for ; Wed, 30 Sep 2020 11:27:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D9C220708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A4AA56B0068; Wed, 30 Sep 2020 07:27:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D31D6B006E; Wed, 30 Sep 2020 07:27:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A46F6B0068; Wed, 30 Sep 2020 07:27:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 6DFFE6B0068 for ; Wed, 30 Sep 2020 07:27:37 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 22A54181AE863 for ; Wed, 30 Sep 2020 11:27:37 +0000 (UTC) X-FDA: 77319502554.21.flame29_27181d227192 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 9D56C1807992E for ; Wed, 30 Sep 2020 11:27:36 +0000 (UTC) X-HE-Tag: flame29_27181d227192 X-Filterd-Recvd-Size: 1677 Received: from mail3-165.sinamail.sina.com.cn (mail3-165.sinamail.sina.com.cn [202.108.3.165]) by imf25.hostedemail.com (Postfix) with SMTP for ; Wed, 30 Sep 2020 11:27:34 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([221.219.2.146]) by sina.com with ESMTP id 5F746B9C00014479; Wed, 30 Sep 2020 19:27:31 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 602026628872 From: Hillf Danton To: nmeeramohide@micron.com Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mm@kvack.org, smoyer@micron.com, gbecker@micron.com, plabat@micron.com, jgroves@micron.com Subject: Re: [PATCH 01/22] mpool: add utility routines and ioctl definitions Date: Wed, 30 Sep 2020 19:27:15 +0800 Message-Id: <20200930112715.18532-1-hdanton@sina.com> In-Reply-To: <20200928164534.48203-2-nmeeramohide@micron.com> References: <20200928164534.48203-1-nmeeramohide@micron.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, 28 Sep 2020 11:45:13 -0500 Nabeel M Mohamed wrote: >=20 > +/* Rate limited version of mp_pr_err(). */ > +#define mp_pr_rl(_fmt, _err, ...) \ > +do { \ > + static unsigned long mp_pr_rl_state; \ We do not need to declare a mp_pr_rl_state per use case of mp_pr_rl. > + uint dly =3D msecs_to_jiffies(333); \ printk_timed_ratelimit() needs msec as input instead of tick. > + \ > + if (printk_timed_ratelimit(&mp_pr_rl_state, dly)) { \ > + pr_err("%s: " _fmt ": errno %d", \ > + __func__, ## __VA_ARGS__, (_err)); \ > + } \ > +} while (0)