Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp736704pxp; Wed, 9 Mar 2022 11:34:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfB6b8sjbw6NA51SSo5CkU2886emcs2vGpVrglkPQ9rI4kHJ8PhdJ1Iy9qcKgYMJF9sp9X X-Received: by 2002:a17:903:41c9:b0:151:a545:2d5f with SMTP id u9-20020a17090341c900b00151a5452d5fmr1080494ple.114.1646854494034; Wed, 09 Mar 2022 11:34:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646854494; cv=none; d=google.com; s=arc-20160816; b=qNC/+XFox1ObOOJtcaL65JdCYdqREiekhUHGkzGtA2PWEiLVXkb3T9SwMVNkrPo8kl p1iPdfqLjB/ebrNwaBGHfrIi8reWvKIZKBRSoFCTeoObuRyXnw8XlAalFs6MzELGmAbW RjdMr2QdLyqpUT5xwLUpCRB9QYOoaPJYuS7f+5jg6P1tnKFgJ2Bq3GVJ9vkDh6fSzujW uylp9I3C4F3eJasn1FKTJyZn0IxQfXRKKsevWIIvpRJGx2f0wnz7jO0Nq7DmnEC25nV8 SWu9C70OleTGIxk5zfLjUkdg0w60nljczNa46xw4vpdZUNq6qMBpCtJJ3Q3SZzeY+pdo zsbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=v8I9rVh449xj9D045Y6s7uA6WVIr+RagQY+WMcg87OI=; b=ZCaoX+Fpw7VzMsFw20kIso1nY2wHDZ/TWeil94n9BviYqWbWvnv0vliTF1zkvzQDiE Lk6QRciLVQWIm8nKsKtV7r4u/ktrvXWkDD4zAvwygGUmmO+0RC9hSa72tV2owxigPQI8 kbV1mswVf1yWryt41WpABjTc5/sajbTERA9SVO3M9lhHNZeeEkoDstVmlwDvK7uAnQ7c qh0i33sgqZ02uPqnHEce7xWuJS4PeTtEr/rylVnLYL1hMQ4+0h2KDl/RcizM/XJizPTQ Mc3+3XcU/U4X9XFxpZTmNIDvvrIWTTDPVb+IfcxRR6rGW8CvWagthUl5VA4m2BeXnqe+ CMdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="g+BR/qvw"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a056a00080300b004e1290682a0si2931400pfk.335.2022.03.09.11.34.36; Wed, 09 Mar 2022 11:34:54 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20210112 header.b="g+BR/qvw"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233862AbiCIRdl (ORCPT + 99 others); Wed, 9 Mar 2022 12:33:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231331AbiCIRdk (ORCPT ); Wed, 9 Mar 2022 12:33:40 -0500 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A85DA860 for ; Wed, 9 Mar 2022 09:32:41 -0800 (PST) Received: by mail-yb1-xb2a.google.com with SMTP id v130so5822209ybe.13 for ; Wed, 09 Mar 2022 09:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v8I9rVh449xj9D045Y6s7uA6WVIr+RagQY+WMcg87OI=; b=g+BR/qvwq9//xxibZjdrhWKWOAO4O0s7AYq41a103ZswtzQ7Ew8H9zCEk+L4QIs3qv 8UbLmgNN3QzwZUK7nIkr1ARqfH3dwNxv7BEv0B+pLn2FK6vTsdnFA559s9jm5xGOT5/1 mkUsTvNk1Z+X/jCGrNPJyozZV1VpZZRyGyr7rnpO1WStwzXy+LD/BmzLjs2YX/58UAF0 L7UHLX6kFk6QSpCCzWVprOU358yC0KqVQFjC7Iw5CFjpuUFOxqYuHRuFBzH10Y5ei8py 07oJ9b4hTYakS2PD4YyoErid8y9iSsc0ESTqJLXX8og6f7HKlDM2CkcI5GuBMpWCZ2Aa OePA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v8I9rVh449xj9D045Y6s7uA6WVIr+RagQY+WMcg87OI=; b=AANe2yijhl5CjFxBHiMyGnIGHXhBJx+EsTaUbVCB1c0beB7SFO1VP/0m726U6kOqJQ gTq6uxPh4vuL6UVwUu/St49PO+9YDq7KutSa1nqNYC+4YiHrLx85BQxRDm5l5F1o+vMm HsCuf5D5Js2tL9/6T4HhmZpjycMI+7aqyH7tjIcwFcvX81OysYLkdymuTbcUxo+M0zVI RIMQrihjmFSTjxCPLlr8I5P54Jyuhy8JdNcxvUwg5qOvyZolgqeUoPvRMmadqMmn2bpw XiL+yQSUqOnOIqjBxdoCgfOiXu/sVX0670tPtd+UjS4qyVG/HMh48UqUM/sF9LkT+ldv FLUA== X-Gm-Message-State: AOAM530DG+0+7AD/li8M1ENtnpynsFBFY9H4tBhEIfNH6aGrxS5A3ueY CSlI2EiEUY2CPYZJOYfvaLBxRCOpuWePnqQ26bA4tP17UpwmxQ== X-Received: by 2002:a05:6902:1347:b0:629:1863:9dc6 with SMTP id g7-20020a056902134700b0062918639dc6mr747150ybu.36.1646847160230; Wed, 09 Mar 2022 09:32:40 -0800 (PST) MIME-Version: 1.0 References: <20220304170215.1868106-1-eric.dumazet@gmail.com> <20220307091541.GD15701@techsingularity.net> <20220309123245.GI15701@techsingularity.net> In-Reply-To: <20220309123245.GI15701@techsingularity.net> From: Eric Dumazet Date: Wed, 9 Mar 2022 09:32:29 -0800 Message-ID: Subject: Re: [PATCH v2] mm/page_alloc: call check_new_pages() while zone spinlock is not held To: Mel Gorman Cc: Eric Dumazet , Andrew Morton , linux-kernel , linux-mm , Vlastimil Babka , Michal Hocko , Shakeel Butt , Wei Xu , Greg Thelen , Hugh Dickins , David Rientjes Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Wed, Mar 9, 2022 at 4:32 AM Mel Gorman wrote: > We should because it was an oversight. Thanks for pointing that out. > > > Or was it a conscious choice of yours ? > > (I presume part of the performance gains came from > > not having to bring ~7 cache lines per 32KB chunk on x86) > > > > There will be a performance penalty due to the check but it's a correctness > vs performance issue. > > This? It's boot tested only. > > --8<-- > mm/page_alloc: check high-order pages for corruption during PCP operations > > Eric Dumazet pointed out that commit 44042b449872 ("mm/page_alloc: allow > high-order pages to be stored on the per-cpu lists") only checks the head > page during PCP refill and allocation operations. This was an oversight > and all pages should be checked. This will incur a small performance > penalty but it's necessary for correctness. > > Fixes: 44042b449872 ("mm/page_alloc: allow high-order pages to be stored on the per-cpu lists") > Reported-by: Eric Dumazet > Signed-off-by: Mel Gorman > --- SGTM, thanks Mel ! Acked-by: Eric Dumazet