Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1992965rwn; Fri, 16 Sep 2022 04:13:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM616DFoaS5w7Cr2HuaVtkM4vuTOT+9zhAhB6crTCXjl2lP9xdVmt1GopXuu/R0hZERUTAmT X-Received: by 2002:a17:907:7f88:b0:780:4593:8f96 with SMTP id qk8-20020a1709077f8800b0078045938f96mr3218003ejc.520.1663326811621; Fri, 16 Sep 2022 04:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663326811; cv=none; d=google.com; s=arc-20160816; b=x0ez0uAUx3o7L5J+BdfjADetRLguYGMZKTPMvwQvX4SM7zrVzcr3KOohUeiDIHl8Yw AfKut0Agl61lwhCcjWKCP10HNIkurlabzfb6WTsqTV+ObtWfbHFBcXxfSWuENaLsWReh rc/MisVjEF3MYoonfvh30D/15QsM+1dtFNSLJsyCXASReOmcJraaV/yk9jGh7yAATDcX JLUWMrWwgAELvp1dB/wnRe5V3bR0MZcps4c0HgVpK9xoeYQssUGpHzFeA60zfwFiab/b Y2wKhjraMmwm9yXTe7pe5wBvWq7rZN99weQWPohjd2EacmQBcaAosFnn5Da2bUJaZ0CZ /8gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=heyAav7cP5DeiLAyZVkPXilu+yl/Pdp1UrBG+LNPCfw=; b=a4aVFpUSZvqMX5OipWyOxJaSuK7dqJea4gRrpfMvGvmt24ZWhLCOT/8aWMCkvQRwB9 mDEilzApoAMvdCLpNjZTr5zQui6T73Ru6d2/nyW/FePFgFkEv173EQpbLx33X2Irpynr lX3qeGnVuc8OiGI1N/CeoyXBWlSEctO+rUvV2oyAzQq21uqInIizMdGgBmr6AOzv1AY3 RdnSV+y0bMF59FkWL1tOTTvNro7YB0Y5E7C1CVzh7ZxCBKf+rfClN8FlETp9NgfV+I07 KGDYSDnjOWksqP7tQZbG3M1VSeznyEN4m8tIGkIJRN6HYwvWkQYzMQfBRAa2aUYHZR0h dxZg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a1709064fcc00b007800890e3ebsi4092840ejw.415.2022.09.16.04.13.06; Fri, 16 Sep 2022 04:13:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbiIPLGf (ORCPT + 99 others); Fri, 16 Sep 2022 07:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232210AbiIPLGC (ORCPT ); Fri, 16 Sep 2022 07:06:02 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F933FA26 for ; Fri, 16 Sep 2022 03:59:10 -0700 (PDT) Received: from SHSend.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by SHSQR01.spreadtrum.com with ESMTPS id 28GAwVml097851 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Fri, 16 Sep 2022 18:58:31 +0800 (CST) (envelope-from zhaoyang.huang@unisoc.com) Received: from bj03382pcu.spreadtrum.com (10.0.74.65) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 16 Sep 2022 18:58:31 +0800 From: "zhaoyang.huang" To: Mel Gorman , Andrew Morton , Zhaoyang Huang , , , Subject: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail Date: Fri, 16 Sep 2022 18:58:12 +0800 Message-ID: <1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.74.65] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 28GAwVml097851 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 From: Zhaoyang Huang Check the global free list again even if rmqueue_bulk failed for pcp pages when there is ongoing reclaiming, which could eliminate potential direct reclaim by chance. Signed-off-by: Zhaoyang Huang --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e008a3d..7e99f7d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3729,7 +3729,8 @@ struct page *rmqueue(struct zone *preferred_zone, migratetype != MIGRATE_MOVABLE) { page = rmqueue_pcplist(preferred_zone, zone, order, gfp_flags, migratetype, alloc_flags); - goto out; + if (page || !test_bit(ZONE_RECLAIM_ACTIVE, &zone->flags)) + goto out; } } -- 1.9.1