From patchwork Mon May 8 07:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13234128 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 DD0E6C7EE2F for ; Mon, 8 May 2023 06:55:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DA2A280004; Mon, 8 May 2023 02:54:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8632E900006; Mon, 8 May 2023 02:54:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 70ACE280004; Mon, 8 May 2023 02:54:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 24239900006 for ; Mon, 8 May 2023 02:54:59 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F20F0120E81 for ; Mon, 8 May 2023 06:54:58 +0000 (UTC) X-FDA: 80766175476.03.382C4A7 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf23.hostedemail.com (Postfix) with ESMTP id C6A5814000B for ; Mon, 8 May 2023 06:54:56 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1683528897; 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=mHji8aA2k5A9IPOJUAOuwPkLmUye7HoIib1aXF/ZXxL217nCg80aJOV5euaYBgecRnEqzG HfwGTM2OeHaMSzQTXFJ+isb/OmZN9Ghzmmugt5TXMg/xRLdWVTjJKxmRNUYcc63LKMLsk9 I9XqQq0oiCLlBzZtklnR4RDDS2GU3No= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1683528897; a=rsa-sha256; cv=none; b=XwL6W9NP7Jyi5cWBmpyIuJeQl96+b9n2lMlEkN9sXrKBs5mSPMZDLs+EOb+pLPLrVhOS84 XblgUE/cV9sCoa0J54tkO7FubaD9fbS4nJOIMg5RXX1VN7KupGgxWIPY+kafsQqUtGhXD9 sgBdGDpa6dn77tWxFeiSVC/Neen3X4s= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QFBpG2Gm2zpW9f; Mon, 8 May 2023 14:53:42 +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; Mon, 8 May 2023 14:54:52 +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 11/12] mm: vmscan: use gfp_has_io_fs() Date: Mon, 8 May 2023 15:11:59 +0800 Message-ID: <20230508071200.123962-12-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230508071200.123962-1-wangkefeng.wang@huawei.com> References: <20230508071200.123962-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Stat-Signature: b5ctf5z56mkhwg4dc8rmtxc1gafz3xrb X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C6A5814000B X-Rspam-User: X-HE-Tag: 1683528896-303011 X-HE-Meta: U2FsdGVkX1+5STQNi2R6tmxI8xaoEewTnSWirnTZof4lvQTajwZmFF2abTHFTP1NmilG7lyP5H3pMBfN+olXZvVbdX0bu1hogWfssUbO+EI1+gaRDtQJAGt3bYM7m7yVqFTiz2t+hTaprVIABDyeXU6fDmXPelc4Vc3wfFyDT3HuSV3Ta1aMD+EGv9Ilt3i2yIOw2UytJUVkagmrlU2cUIQdM2W8T/0RKLhxrbyQToFKzSk6tmLbp6X2PORxKE8PqOEaN9kShkYP/ZrojRklKfp+jfMqON4IpUUicYHjWZx71+PiF7St/KUrLrSeeeMNloUlK1qp8K9S9DvPcvWWLIn+dbi5Jh0KJ8CoHcTruG0ek+wO8ENZp0SPkmrw6kra4IqAjzZaWNe0dhvMNlYosri/aB2bMyrguqvoQGbHafE9bfxaV08UdBv4x1FRGqUBwA4WJ/9MfW/+tjCbhTK41UzsD9wgqTrhcPLg1EiPXkhKFf4T1f08MKmWYhAV4iFygl2mylU5znsUSvhKTy8MaZjP0x6yizLBmOjhijWou+kY9qiUftjvkQtVg0HzqnkSVax1vrW9tUZ1DQLVM4KFigfWWm1Nwmikr7R0AqwsDTVMgsfH9vITpK2BniBpYpZLtklycRxGxxgaYdLI9xapvK16Qn1Jsfye0d2d3Nlwa3Myg59juigj8mnqV41MyaY0vv6Px9tcxRNdUBPVAt34JEb0+7ORwDo7En38egC0kioVljcVJviV/ecK4gMm4hP6p4LusFryOhztnJQeTlmRKm49rVhtDU5DNRmETk2gJVKoKuO3zwcLpANF/L4iNzrxngRq28RvbSwXOhmbQ9M7t6agjCKMIKRIllPM00nIqPn+8GEQyE8WmzcDGKP380xbkTQ0WRJHM7tEmLCvWzqzPgfOUQa2f+2wzrxkFSv9btqW7TjO2S87yzVOEBtsdREO/hIPNZCDYPkWL/O23T3 pG4Jcrdt jWSEa9XFdt7rRP0P4IiIWyOCF2n9fgLaWLP5DGvZ3kHYtX99glVjxZrlZZdBJAXIvKElKJltpfNrJq2a2QCgLpvedCxJAmmwqlUeGav4YwcJ/DmOJvKAV11wHQFRqCz0Qizpd/Zrbejj3tt0jpWCGIlfwz/65YObSYT22liAnDCrLieyrNRzedrdK9DvbZP6lL9HZeo5NdslqutoZsSnYyJepC9Te9q7gai7/ 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;