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 63888C04AA5 for ; Thu, 25 Aug 2022 09:11:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD5F16B0074; Thu, 25 Aug 2022 05:11:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B85D6940007; Thu, 25 Aug 2022 05:11:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A74D56B0078; Thu, 25 Aug 2022 05:11:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 984F46B0074 for ; Thu, 25 Aug 2022 05:11:30 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6847840BD4 for ; Thu, 25 Aug 2022 09:11:30 +0000 (UTC) X-FDA: 79837546740.25.DED65A3 Received: from outbound-smtp11.blacknight.com (outbound-smtp11.blacknight.com [46.22.139.106]) by imf02.hostedemail.com (Postfix) with ESMTP id 0E3EE80002 for ; Thu, 25 Aug 2022 09:11:28 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp11.blacknight.com (Postfix) with ESMTPS id 7120A1C3E6C for ; Thu, 25 Aug 2022 10:11:27 +0100 (IST) Received: (qmail 13199 invoked from network); 25 Aug 2022 09:11:27 -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); 25 Aug 2022 09:11:27 -0000 Date: Thu, 25 Aug 2022 10:11:19 +0100 From: Mel Gorman To: Yu Zhao Cc: Andrew Morton , Nicolas Saenz Julienne , Marcelo Tosatti , Vlastimil Babka , Michal Hocko , Hugh Dickins , Marek Szyprowski , LKML , Linux-MM Subject: Re: [PATCH 1/1] mm/page_alloc: Leave IRQs enabled for per-cpu page allocations Message-ID: <20220825091051.7awtjp25yh7bv3xf@techsingularity.net> References: <20220824141802.23395-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661418689; a=rsa-sha256; cv=none; b=P4v2xOj88HzDCzarIlNfW26Q4+peW/gmuvjn231jzg/mXvNfhJfv5+QXAFHOGC0CUg2dh0 uuMPrzpqyI5imhBKsAbZiKEigkdd9ZKqVNs031K//pBCATRmQFulXB7eZ+NNsaXvCzNv5r nuLvNISjXhqnzsrT32c3b5VbICgkr8I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661418689; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nNGhVM4ON2wJwhx44KAiRahBsiKwi+am7Hy8+VJBfNY=; b=c/bO5gCed1wNkxRoCpVkXDDRUr6u+2VEZsZIvhv1SkGhxVAdshXwMCP7oZ/HV1M7AirdHd jLZaH9sI3ufaVXb7sKWh/eGUMomGF7FARTwOlqLqeB/mgqNP48Hs110pUdB7E5MjBpkVQH RQaljU7sXXXdHvY8xecT6aBEnMtajpk= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 0E3EE80002 X-Rspam-User: X-Stat-Signature: rsuiwuadmu9w1mpgd4ys6gmdxkn9ewg5 Authentication-Results: imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-HE-Tag: 1661418688-798792 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, Aug 24, 2022 at 10:58:26PM -0600, Yu Zhao wrote: > On Wed, Aug 24, 2022 at 8:18 AM Mel Gorman wrote: > > > > The pcp_spin_lock_irqsave protecting the PCP lists is IRQ-safe as a task > > allocating from the PCP must not re-enter the allocator from IRQ context. > > In each instance where IRQ-reentrancy is possible, the lock is acquired using > > pcp_spin_trylock_irqsave() even though IRQs are disabled and re-entrancy > > is impossible. > > > > Demote the lock to pcp_spin_lock avoids an IRQ disable/enable in the common > > case at the cost of some IRQ allocations taking a slower path. If the PCP > > lists need to be refilled, the zone lock still needs to disable IRQs but > > that will only happen on PCP refill and drain. If an IRQ is raised when > > a PCP allocation is in progress, the trylock will fail and fallback to > > using the buddy lists directly. Note that this may not be a universal win > > if an interrupt-intensive workload also allocates heavily from interrupt > > context and contends heavily on the zone->lock as a result. > > Hi, > > This patch caused the following warning. Please take a look. > Thanks. I see the patch is already taken out of mm-unstable so back to the drawing board! -- Mel Gorman SUSE Labs