Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp816076rwi; Mon, 10 Oct 2022 07:34:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6C7O9JrVOjxRmpktiGAn6VDRo/XiPEHGol2kPTqDv2VqmWBHrynGSbJl8gc2FeM576LO0Y X-Received: by 2002:a17:907:74a:b0:77e:9455:b4e1 with SMTP id xc10-20020a170907074a00b0077e9455b4e1mr15300084ejb.462.1665412474880; Mon, 10 Oct 2022 07:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665412474; cv=none; d=google.com; s=arc-20160816; b=jaeu7ezXvaDXM54KY5nxbgimA9F86oIn9AVy1usW47Dp9mcUbOAgBatEUR2TEZnE3G vOyicmrdu5aMWjXvDQDXQRfxOjuGydNznXC7PM6H+nA3rcwlx6+U0iiW0y+wXcWV27lE Kt8R8Q+t01G1G36Rx6BPnWD0u8fmW4C+0n3oB3kF8i4ltJdzKh5ekg/DbGAEiJvMW4QH BcUmcZaMp4jnN2QG2rhwwvn/vzvwMLYHA80a+avFOaVA1aOOIEaI5D4V08jpEdK7Mj0m fyBPpaQ8bc5WLjB0P+xMksWC0I/wwDxqrjyfLyOEjcja4zeYGaeqXdgXByt0TY9hiCKS K7Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Zu8z8Nj9RdEMG/50s+mc4mawakG0ZoJbt+4Cl/tPiZw=; b=z9wHpMG+nso04+JZS4lQIn+OHz1XmmcXZlf0/mUI/Voo0WrfGz5As04Xe1lUW7vrzU 4Qv2y85ULaqbFId3Q5y6Tsalk4CsMCawvJ0eQzJEURtmKq1LUtk2gz6qwPv9GH/3WiBq cGIcamUltqQcf5e5VlACW4UaGP7ZJCP4UYvI4GWpncrk12RAzLSM0veQrH0wgrfRy6c0 RdJ5Lw/8mG/Eit0oGJj0aQyrnC/3i4NhMnnQdpPLNTmPmSvVVmma2bBlKFzH3FnfGyjJ +peXMHKrv3GGzUm+d7lhSGJm/d0y2+tTC3vSJpqzaZ+pBeYEzPVhOeraIB/VE5cdu9rV BaHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a50ea82000000b004590ae88029si8895827edo.610.2022.10.10.07.34.01; Mon, 10 Oct 2022 07:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229606AbiJJOXL (ORCPT + 99 others); Mon, 10 Oct 2022 10:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiJJOXH (ORCPT ); Mon, 10 Oct 2022 10:23:07 -0400 Received: from outbound-smtp46.blacknight.com (outbound-smtp46.blacknight.com [46.22.136.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1521A733D5 for ; Mon, 10 Oct 2022 07:23:06 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp46.blacknight.com (Postfix) with ESMTPS id AC9E7FB11B 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: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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