From patchwork Tue May 16 06:38:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13242584 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62931C77B7F for ; Tue, 16 May 2023 06:21:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60F0828000A; Tue, 16 May 2023 02:21:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59B06280008; Tue, 16 May 2023 02:21:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 34E5628000A; Tue, 16 May 2023 02:21:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 11472280008 for ; Tue, 16 May 2023 02:21:43 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id D9DEE141469 for ; Tue, 16 May 2023 06:21:42 +0000 (UTC) X-FDA: 80795122044.18.DD5F29D Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf09.hostedemail.com (Postfix) with ESMTP id B3A6F140009 for ; Tue, 16 May 2023 06:21:40 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684218101; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pEQmbXru6q4li0fN/aC7FJHKouP8VLqgIOaYkU8mCOk=; b=ZJeHz4bC7MLPlD9o89iaomzZb2CYxgY6QpKhp6QYy3jPy3GMf056m/aTE8ZkGmnkEQUs3J mqVkgDPVPLsobVQ0H6GB1mbe3RsF5ejyEt0sXivCVT5xXWSK+9YbbWz01vux30LdRhK67o 7re32WtTE2QulNaGMk9ba85DzAp5uL4= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684218101; a=rsa-sha256; cv=none; b=szotoskW6K8lNVncKIu+zvVMFoVnvSNo7zBNnZnUQ+WYJ+6lrFxpO9RcamWWahbrQ/YGln l0qNqgeyBvtb9T8xpAQHM6I2VXyoKLzn48pOv8A+Z98TP8P+7Biacfmzr83Iy9aZSeyahc O10uM3/tztmAYilPml5TUrqRHR8WkP0= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QL5gG1gffzsSGt; Tue, 16 May 2023 14:19:38 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 16 May 2023 14:21:36 +0800 From: Kefeng Wang To: Andrew Morton , Mike Rapoport , CC: David Hildenbrand , Oscar Salvador , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Luis Chamberlain , Kees Cook , Iurii Zaikin , , , , , Kefeng Wang Subject: [PATCH v2 11/13] mm: vmscan: use gfp_has_io_fs() Date: Tue, 16 May 2023 14:38:19 +0800 Message-ID: <20230516063821.121844-12-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230516063821.121844-1-wangkefeng.wang@huawei.com> References: <20230516063821.121844-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Stat-Signature: rkuy7pprxgy8tnarhkr1oqd1mb8f3sdi X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B3A6F140009 X-Rspam-User: X-HE-Tag: 1684218100-195386 X-HE-Meta: U2FsdGVkX1+q90vJ+F45pIqndWS8x5PaVs19TuqY8125bCJjAFkLMTMQgr6aUZ+MHdTmD1KahOY405a7NKSw+u0luzSz9zMkGHq61/rck5YKPIl+twtuejgOUWJ9R6FyCkFbd9cQYWwguIoDC0MhY6Tgeagwt4DJCs13fJNbU2yIFdzb6uUk2y1yJUUBuT+4F5WZMuHAmns07EYH8lKjDr6FDVofGIse7+nEpzVoECewsZQmfxlzpasyAw4TNL25jOX2XmpKAouF4Rh2wq0gTR+wMrVFKGnq72psOJ/JLXQq2wAaZUcTZEcOnthoRDKD2Pzv2ESkBE+2JkbvbJHzzg/QvvNYLRvIcLSd4F/0yO8+dMqzl+JeHz2v16WrAViDrmaYpNrWOHDy2im9kWSoBtIORLr3sXFbCLTTKGfYn+uU6sbhDgwXs5DKng+fwO/Pt+kggp0KBdkAPV4Zv8X3bcROZnxLfXUD0CoiT4kxO8fpwdX5ZHgMhHZ/Q9D5cbe0xp8dxUvub7ae2zGuqM3Jdb6Ut7yDiFSmc4HTXZFG+5+9u7OPkTP/NGwVBNNB3Xd0nX3v/f833aAtUF8nB8Iz/TAgCRkYLRUQCLfWC2BaMfiP2vaZNMewVBjz5wQQtiVwJNmcuqHqQkO2i22fE/JvAQ6a1qrSYkbPdKpR+MZTAJeNWJP/8Zv0PDrcT4+c99EyVVBQ3szTt6olZinb/YIbtWtb5/3CQ6bNU5KjFYuYh367NMv1IqEKkzgECHx4Qc+byWzX5ifhuIhwVrPsbKnRE8exssZGJx2kFi9HbRxaAbdIoYFRozHZsJdel9Qsjn/iUyPiQoRCv0J0z9Zv0Z2CAiQ2CEXzA18nRnfnTM0Io9ZAZObm+KwZvfMFmwtFllxBaBHMMPOO8K1DukrCE9mfPspSCeGtFSCXZ/Sz4Hn32+IfAXmPwmK0LKSOkrlquonWoHO4ldj7+XVpTw6P4+N Kwt+3QXp hmSZ0mGNejGuk5l7ZB4bu5P0fEajSXDaL02Eb2qhirDiLUBB/VrVqF8d8n50NVtS0XJBFF/1xKW2SpHBgUUf9FWV812eJrIwP/0GjoHbx9nqq8lWyyjgiULetGpLpdflxBPA/7D8L2qQ4ZxXZIBLTNQV6HcIc+2IeiIZGuDzKlXEBpNDSSxdu4XBRMwYchUGVkRv570eMcDiVI9xVEGY2xbI8Sq74BmaAIvK/ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use gfp_has_io_fs() instead of open-code. Signed-off-by: Kefeng Wang --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 6d0cd2840cf0..15efbfbb1963 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2458,7 +2458,7 @@ static int too_many_isolated(struct pglist_data *pgdat, int file, * won't get blocked by normal direct-reclaimers, forming a circular * deadlock. */ - if ((sc->gfp_mask & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS)) + if (gfp_has_io_fs(sc->gfp_mask)) inactive >>= 3; too_many = isolated > inactive;