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 EB41FC433FE for ; Mon, 10 Oct 2022 14:23:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 759606B0071; Mon, 10 Oct 2022 10:23:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7090F6B0073; Mon, 10 Oct 2022 10:23:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F7626B0074; Mon, 10 Oct 2022 10:23:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4E51A6B0071 for ; Mon, 10 Oct 2022 10:23:07 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 17177C0E56 for ; Mon, 10 Oct 2022 14:23:07 +0000 (UTC) X-FDA: 80005256814.05.9F4778D Received: from outbound-smtp63.blacknight.com (outbound-smtp63.blacknight.com [46.22.136.252]) by imf22.hostedemail.com (Postfix) with ESMTP id 72F1EC0028 for ; Mon, 10 Oct 2022 14:23:06 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp63.blacknight.com (Postfix) with ESMTPS id AB2C2FB11A for ; Mon, 10 Oct 2022 15:23:04 +0100 (IST) Received: (qmail 6536 invoked from network); 10 Oct 2022 14:23:04 -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); 10 Oct 2022 14:23:04 -0000 Date: Mon, 10 Oct 2022 15:22:08 +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: <20221010142208.ctsasloh7hbudupc@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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665411786; a=rsa-sha256; cv=none; b=2fFRpyhBrcbmfX2iGt14daosoHPh+pg9S9Eqfi2LpZ08y2+D60/UZurn7952RKrM9XQV4f J1fdpGQnOhr2RA1y2ltMwiRQO+gvaIAGtjUp7eidH9staqa+thosn08NCBm++pkBQxlZfI vM75vMXMwh1/idEWiydauuIpxduzxO8= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.252 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665411786; 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=Zu8z8Nj9RdEMG/50s+mc4mawakG0ZoJbt+4Cl/tPiZw=; b=AaY3LrA6Sn6lCJRrIg4s1amft1GK+XuiPg4WEO7rEt3ry8szT/NHN4THbEFWLuPVCHaKn1 5QQbw9RQBnLTBoDgD90B2ek8htig/iLiHbXvePH9VE1iBLIAC+ez6HBc3gMqNEaInNgbqe upx0tJoo0kXOSbEGDTRmX2jkuoaijKI= Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.252 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Stat-Signature: 1hsgsdahjs3p3ubnyqh9zb4da1h15bjt X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 72F1EC0028 X-Rspam-User: X-HE-Tag: 1665411786-707213 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. > > WARNING: inconsistent lock state > 6.0.0-dbg-DEV #1 Tainted: G S W O > -------------------------------- I finally found time to take a closer look at this and I cannot reproduce it against 6.0. What workload triggered the warning, on what platform and can you post the kernel config used please? It would also help if you can remember what git commit the patch was tested upon. Thanks and sorry for the long delay. -- Mel Gorman SUSE Labs