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 8FC21C433EF for ; Fri, 13 May 2022 14:23:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C0C66B0073; Fri, 13 May 2022 10:23:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16FFE6B0075; Fri, 13 May 2022 10:23:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 060366B0078; Fri, 13 May 2022 10:23:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id EC8E36B0073 for ; Fri, 13 May 2022 10:23:34 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C58FF214F1 for ; Fri, 13 May 2022 14:23:34 +0000 (UTC) X-FDA: 79460937948.14.528FF9A Received: from outbound-smtp22.blacknight.com (outbound-smtp22.blacknight.com [81.17.249.190]) by imf24.hostedemail.com (Postfix) with ESMTP id 2FAD61800CA for ; Fri, 13 May 2022 14:23:25 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp22.blacknight.com (Postfix) with ESMTPS id 9AB32BAC3E for ; Fri, 13 May 2022 15:23:32 +0100 (IST) Received: (qmail 16087 invoked from network); 13 May 2022 14:23:32 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 13 May 2022 14:23:32 -0000 Date: Fri, 13 May 2022 15:23:30 +0100 From: Mel Gorman To: Andrew Morton Cc: Nicolas Saenz Julienne , Marcelo Tosatti , Vlastimil Babka , Michal Hocko , LKML , Linux-MM Subject: Re: [PATCH 0/6] Drain remote per-cpu directly v3 Message-ID: <20220513142330.GI3441@techsingularity.net> References: <20220512085043.5234-1-mgorman@techsingularity.net> <20220512124325.751781bb88ceef5c37ca653e@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20220512124325.751781bb88ceef5c37ca653e@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 2FAD61800CA X-Stat-Signature: 9it9gx689uxdqjezf3sd33nh7nnh796j X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.190 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-HE-Tag: 1652451805-383210 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 Thu, May 12, 2022 at 12:43:25PM -0700, Andrew Morton wrote: > On Thu, 12 May 2022 09:50:37 +0100 Mel Gorman wrote: > > > Changelog since v2 > > o More conversions from page->lru to page->[pcp_list|buddy_list] > > o Additional test results in changelogs > > > > Changelog since v1 > > o Fix unsafe RT locking scheme > > o Use spin_trylock on UP PREEMPT_RT > > > > This series has the same intent as Nicolas' series "mm/page_alloc: Remote > > per-cpu lists drain support" -- avoid interference of a high priority > > task due to a workqueue item draining per-cpu page lists. While many > > workloads can tolerate a brief interruption, it may be cause a real-time > > s/may be/may/ > > > task runnning on a NOHZ_FULL CPU to miss a deadline and at minimum, > > s/nnn/nn/ > Correct. > > the draining in non-deterministic. > > s/n/s/;) > Think that one is ok. At least spell check did not complain. > > Currently an IRQ-safe local_lock protects the page allocator per-cpu lists. > > The local_lock on its own prevents migration and the IRQ disabling protects > > from corruption due to an interrupt arriving while a page allocation is > > in progress. The locking is inherently unsafe for remote access unless > > the CPU is hot-removed. > > I don't understand the final sentence here. Which CPU and why does > hot-removing it make the locking safe? > The sentence can be dropped because it adds little and is potentially confusing. The PCP being safe to access remotely is specific to the context of the CPU being hot-removed and there are other special corner cases like zone_pcp_disable that modifies a per-cpu structure remotely but not in a way that causes corruption. -- Mel Gorman SUSE Labs