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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55423C433B4 for ; Thu, 22 Apr 2021 12:34:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D57476147E for ; Thu, 22 Apr 2021 12:34:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D57476147E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F9CF6B0071; Thu, 22 Apr 2021 08:34:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A9A66B0072; Thu, 22 Apr 2021 08:34:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35D846B0073; Thu, 22 Apr 2021 08:34:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 13F3A6B0071 for ; Thu, 22 Apr 2021 08:34:31 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C89B112EA for ; Thu, 22 Apr 2021 12:34:30 +0000 (UTC) X-FDA: 78059946300.36.02DC316 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP id 8FF60EB for ; Thu, 22 Apr 2021 12:34:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D0135AF03; Thu, 22 Apr 2021 12:34:28 +0000 (UTC) Subject: Re: [PATCH 2/9] mm/page_alloc: Convert per-cpu list protection to local_lock To: Mel Gorman , Andrew Morton Cc: Chuck Lever , Jesper Dangaard Brouer , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Michal Hocko , Linux-MM , Linux-RT-Users , LKML References: <20210422111441.24318-1-mgorman@techsingularity.net> <20210422111441.24318-3-mgorman@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Thu, 22 Apr 2021 14:34:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210422111441.24318-3-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 8FF60EB X-Stat-Signature: gn5o17ndqztzzjadxtyqn8f3kj1xn44t Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1619094861-164891 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 4/22/21 1:14 PM, Mel Gorman wrote: > There is a lack of clarity of what exactly local_irq_save/local_irq_restore > protects in page_alloc.c . It conflates the protection of per-cpu page > allocation structures with per-cpu vmstat deltas. > > This patch protects the PCP structure using local_lock which for most > configurations is identical to IRQ enabling/disabling. The scope of the > lock is still wider than it should be but this is decreased later. > > It is possible for the local_lock to be embedded safely within struct > per_cpu_pages but it adds complexity to free_unref_page_list. > > [lkp@intel.com: Make pagesets static] > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka