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: 90961 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1958476vqo; Sun, 7 May 2023 23:56:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WmK87DvXZI0I77E1H3RfzI25+MIGu2YXOQCjxgh9Qijo34c8qBiEXNq9BjpxbTDw2SAcW X-Received: by 2002:a17:902:7d85:b0:1a2:9ce6:6483 with SMTP id a5-20020a1709027d8500b001a29ce66483mr8901879plm.64.1683528999050; Sun, 07 May 2023 23:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683528999; cv=none; d=google.com; s=arc-20160816; b=JPVXjk+ETX0Hw1mEC700vAO7rSeeujz6RK+dTOiqt2cD0ZiWTZTcY2IZ/RpHdpC5xk daAiUtKwh6k7FtgcjRD8+Rp06ahq9IQNP7iDAHj07iazmFyvIpDZlfSPcjt2uAHjoyoZ l+s8B15RwqoXmRyNcYH0Q0GMBwp4PkbBEE58gzlD4BS5ylVeAZMixB/JiKmHxvT7kgEE NayviGwlNwFtmHq7fyj9mclh8a5/KYjihFQ7NyxG5s882pxTr71/VXtDXUGI2x51oQWM kffpDJ1PAXt11n1pvi0OTYE7HFfPHWZx4b5IqG92NwsvUDAxXLRu4cQh6BtJef9t0rE/ sipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pEQmbXru6q4li0fN/aC7FJHKouP8VLqgIOaYkU8mCOk=; b=fB0pZmshoq1zKro6vokXSSZKnAYYv/FmYuozjao6KGeH+ABoxSbe0xiR0pSrA+HBgb fv+x3H1JMgOsbFZXri09UUPeiNclzd9diqNcDMbPB1B9Hn9PcyHmU0fCX5HDn0Zm3n95 heLows5ZF4Wls2lWuyrE+SHuH0wXJGyYVtBACFJ7lavtVIa2mMVmqM2ddT+hLCpj+l85 s5wyVhYbKHnyusbFrKZgeXAfiesZzSJNQyE5sQoo45coxi1q0+Cx5YK3hfbhQqMuSccT h8+5BvOzbiJ5Pn7KVpCQCm5uz5Arz5v6U3uYR5RrgprY+njiTo6qVoAtG3wUU/Zx94af wdSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a1709026a8a00b001a1a44cc945si7224680plk.580.2023.05.07.23.56.26; Sun, 07 May 2023 23:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232580AbjEHGzW (ORCPT + 99 others); Mon, 8 May 2023 02:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjEHGy4 (ORCPT ); Mon, 8 May 2023 02:54:56 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1592CAD03; Sun, 7 May 2023 23:54:55 -0700 (PDT) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765308103571284067?= X-GMAIL-MSGID: =?utf-8?q?1765308103571284067?= 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;