From patchwork Fri Feb 11 02:30:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED059C433F5 for ; Fri, 11 Feb 2022 02:37:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270081.464286 (Exim 4.92) (envelope-from ) id 1nILo2-0000Qc-H9; Fri, 11 Feb 2022 02:37:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270081.464286; Fri, 11 Feb 2022 02:37:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo2-0000PJ-B2; Fri, 11 Feb 2022 02:37:06 +0000 Received: by outflank-mailman (input) for mailman id 270081; Fri, 11 Feb 2022 02:37:04 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjS-0005DN-00 for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:22 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20715.outbound.protection.outlook.com [2a01:111:f400:feae::715]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d559148a-8ae2-11ec-8eb8-a37418f5ba1a; Fri, 11 Feb 2022 03:32:21 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:32:16 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:16 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d559148a-8ae2-11ec-8eb8-a37418f5ba1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNn5PFnUlQRZMroeUdNK6hMvhNg013ALNzHFF4aCA6tIQjuE/IGUwNtsc9o9ocX0gBwgK2zyNWLXbng9z2RHrgCw4E6Ay5ptBCwA+b+G+DElYxUxSp9P7KssRuYYHiIcY771B3LYduPicahMc4sd42w7/INIFVh9tYpCH5nt6HzYGa0VTHorekxnKLfyr6BkeU08PknMDQU/SvWmhQW1VFhNR6Qt8z+oW+nach0t6fV1rn6Qc6olB/SPz5KH17u2xzb5Zb4m0S5bylzkiIgJra1Hiq3rPa/ekftDUhqRYOVlzFQpXfPmDBJ7fLQUzQDS0i+cvGH/lEm1lSxHMohQvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g0n+5Y+UWhVVFn6fogkZFTZZCvYdUAj53FrLFaVjD6g=; b=di86ua/aim/Sa3gK6CBDkLJN+pJ0toIN9C3muFlOIThSpMmZIXe9/TRzGplUAvXdPO+awMomroG9nPL14bCyOmW/2tCpQO2edu8PO/mZJTI01FUz+b7AVFiEYwh5sp+LnEtbAeK5DwoON1y7/UkDGGo0d6k5TrmYr4DvY2hbHXdUNw/MMzPLF9vTo92NIvaleCtf34etFOtBgVlSgmToS9xL24VKexxA/hB6LDB9bcY2myWr90Ql33PbRZc6dNW4bSx2BFMPK0cTjl2dNQMsCbJLWMhAmw/pcF3w48R+//uzM/M7IBk0tViked0RujsCuMtM/l+cCmF4sF9d454SBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0n+5Y+UWhVVFn6fogkZFTZZCvYdUAj53FrLFaVjD6g=; b=G8TvP9jD7K7K7nFUHLOqGimeJOBLUx0xSN+gIQI4a17bqYB4kRNr2zygEnh6Iy9iSoSjoN4iphrLW0xJFhZbU30GXgXS9U5xorHCWsJsI4RjN6Ce45Cy1iVsvH5UbHBUqvW/e9udYvd5/UM1dESjpPmDEU3rzmYGRFkF2xhdM3o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 7/13] md: use time_is_before_jiffies(() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:30 -0800 Message-Id: <1644546640-23283-8-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c225f979-e148-4ff3-3fd8-08d9ed06b7c7 X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m+gLbLKDEUYtgg6JicjuPldNAEFxgWIHOT7l4DraoaJD6b+FautiuJXjyJSIJnH9mYKXvyu+2+URwZPVEfb6vN8+fn9tAy71Bc6uiykTfGDuBzTJ0l31SRC+FVmdiStKMGJYItgGxPmMwTWHdRigJlEQoVRSLJuD30YI6EKeosSlg41s5Kt5+03KD7jrPgSU3x7wAPsWx2YEd/ZdeGmDJ/OLPQLtxL8uga4F9oRJ7n3tpd//z6MSNbn23dygd7SK7z3LlOncANQB6BnnEUVhGionjOcYHC4Nhn8HHB+W6tbkLI4Q05+WXhY50Y0g7T5HuZXT1fyRKJntJX/D4xljmO/35XkBLb/WJBBPbxv7L3EZnoRv9+8E35V8fYjSclLpy6GSkmLgJ8ir76dIcz/sUwNkaMN9tpYehhuArKCh4gVArqP3Smg1izn6tNo5NTlWUYi/qAzjzgIFvMjPsJ3e7ZSGINZTq0N6+lCasmPqxtkC0vRYksTQ2uEcMAnIbZXmw7yYZN4HBTUF0uEnL0gsxQ4Tzd8JyQJ4FIbFYPxcMvQmyl2FuO1ptziccMi6fHR60ceVv0K8ymdF//fb6QGhDiy8jTmgesQpIpqHc4JTHlU/akv9pM+JhtXT19Z0WXfOZw9WpkAiVYMrdpno3VHXamMW1f69DbuTOQPcSiZ/3PgeoMJJMLuXbfdTShntVbvmMMa+xpVviUqPZhaWNt1eJEZBS0PqcJgxpQCriKRPTUI16z8JpnXpHbscDnhs/j+X X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(4744005)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9wJunXdafueXwS1HARm+UcDn9TyGyU9g1s76Lc6rMQJXbcwOgVcd4d8/HcxT/JVc9sR2wmCQDk7kOA/mKbLUkeUOddf5rVUcUlE81Fv0wxXIT/Foo0drXfj+okhp/LpdHRtg8IoqR4a+utA8A2LjYTwIuv7AbnnWNUrU8otcHM7DGUU9VSunOSybiJa3wl1QmPNWxBCuY2vE2cmkGuA0Q4Zf5+zvew3XxpH70pcN8epb8+0uImsWg9Oqzv2/l08hbRK/SmE7K1E24tWVo5yhjebtkN21zBsxvKLlMmB+C4ov9nUrCkwx9PIFlhzkbupJowU/DIOD8DxWCKA0/KETzZwpjNbyEjM6wg+YM7pTrdWeH00wh1eGD1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EAU4YWC4VY7bSUXWp2CElVRoET4QKsQhYhZn7jnD5YjklnY7XuekOlL9KeVHQz41Mmjvry8JHCbPYuu4iovExU+MBp07l6cqIgcdSvYJ/x6mvC111Frfk+SyjIJWYQpkZbOABnMpwjOyNUN+M5/hW3N1tvWHEGOejej4/MAyunSQ9wmcy2LGEE= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c225f979-e148-4ff3-3fd8-08d9ed06b7c7 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:16.0854 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: I4YxRg1ecI7HlnxWT425FXY4UjVoKm196uJwuFAtIX1YYiOd8+uoj7+n6d7o5Qgax39lGdeRzbAoVI+SjmIuNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index f4234d6..dced764 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -161,7 +161,7 @@ static void throttle_work_start(struct throttle *t) static void throttle_work_update(struct throttle *t) { - if (!t->throttle_applied && jiffies > t->threshold) { + if (!t->throttle_applied && time_is_before_jiffies(t->threshold)) { down_write(&t->lock); t->throttle_applied = true; }