From mboxrd@z Thu Jan 1 00:00:00 1970 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 06594C433EF for ; Wed, 9 Mar 2022 17:32:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 912B38D0005; Wed, 9 Mar 2022 12:32:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 89AA98D0001; Wed, 9 Mar 2022 12:32:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73B278D0005; Wed, 9 Mar 2022 12:32:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 62BFF8D0001 for ; Wed, 9 Mar 2022 12:32:42 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 138A8181BCDD2 for ; Wed, 9 Mar 2022 17:32:42 +0000 (UTC) X-FDA: 79225542564.20.78F2D9F Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf20.hostedemail.com (Postfix) with ESMTP id 8D4981C001B for ; Wed, 9 Mar 2022 17:32:41 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id h126so5927180ybc.1 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=Ne1xg51rsVLva0GpZfZ/yLeHQ+SB83sK4nxFWcdhkc/Pv/KTB15Tytbdk6EjLhsw7K E+el/iAGaWejDUtb9tDRepML1YNi6hjxQLHZWq9YYIwqXRmTyfDQbmlf1hdS7rdv5RmA 0mJWWECgnaKfmEHwPs7C8xLWwqxvfgMQdvaPwoPixqHY8ZSBE6sGAxapNrUBRy9MUUsp Yq58uOff+YS76EYI4vg9jLQzQBCPK9B4TgMYCeubs8ioOrXC6b7I8UsyYUCmcQdESge3 HqW1ecj/+LPVdg75LNYI3yok19VIuVHZocp0BF8L5+XVwdsVecCWvuYdntcYkWEWWJtu R+zQ== X-Gm-Message-State: AOAM5339GBxq5EHB6vyVDJBk/mS+LmRFRnO3XjRO6p8M7rg5+VZQlF+O O4+mDunjXz8/hyZZ8OrQOhTYx1INDDH1/i211xSNsA== X-Google-Smtp-Source: ABdhPJzdNSsV+EnBETzF7al3BTdSykx7KBrwPPXsRMe8yPq/+DLtS3UMlMRXHd4s26hur+LuhcYBsU3+BUJdPQG47Yo= 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-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: 49399mkya1451msn9s4whqs5nu8kkfkp Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="g+BR/qvw"; spf=pass (imf20.hostedemail.com: domain of edumazet@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=edumazet@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Queue-Id: 8D4981C001B X-HE-Tag: 1646847161-802467 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: 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