Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp396612rwe; Thu, 25 Aug 2022 02:19:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6x1wAti8cOf3rEh17RvLFGkN93sAqA3D1bUdismLepYXiFraP/qFHxS25y9E5ijZAlwcwU X-Received: by 2002:a17:906:fe09:b0:73d:90ae:f801 with SMTP id wy9-20020a170906fe0900b0073d90aef801mr1683280ejb.699.1661419139990; Thu, 25 Aug 2022 02:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661419139; cv=none; d=google.com; s=arc-20160816; b=rWVWWlmzofuSXMycTKHkbzf/VVeVPYmmTChPoPAtwp4ZnHOVIemovmsK+rGZC4vV3V lpp5HgCn2PqtoEdNUfENhpjAbIk2tmOFkfBWMzd8Yv6Ipks4p0e7sa4OJPjfLn6WGY/E V4BVAZvl2AgLmx19IgfEoK/qxMgVAjlzznkVcquau+Sarrvs02/UuJHpPet0xDl2c5eW JLomEwVblI/M1By2px+Mp3p9SHxIb5GglGtV1icd9mrUQr/EemZrjqHEio+sSVzUInDO AByETiK5QCt3j16aWsJfUAVgqNlZglfWhHTP5sRrUOB3CV0nNDX2/IfYrnqmPAmrLFKk WqcA== 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=nNGhVM4ON2wJwhx44KAiRahBsiKwi+am7Hy8+VJBfNY=; b=m/MpomqXq0WUHBj8rmcyZXKRuYI0zZ0mILDcfY21nwHZt/RbAEEvEuw/jmDXcPUsPb rn4GjMnbDw2EuGPByKIq1xEmaKeHRLJwoGaSTLvItjsgm8VTotQrEmtOIdORLDUqUsK8 1j6evldnJrdxSJWC558CubEbX3h2smvMlIpa/MjiXeweX+9fiNWnq3WB6Jx2WPVtfiT6 72DT1tqNnr8pziLxLluReRwG3fmTMA1eiirD4jWYOXpUKVdUSQJMwEl1JtRQUl9HDWKq /zdX/Wz74L0jHnwXM96A1rH0ykbOU51/rvILvOW9GwLlGOavRqmLkjxFbwjVvplPv/B8 ft9Q== 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 b10-20020a056402350a00b0043d32528589si6342538edd.549.2022.08.25.02.18.33; Thu, 25 Aug 2022 02:18:59 -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 S235964AbiHYJLe (ORCPT + 99 others); Thu, 25 Aug 2022 05:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239042AbiHYJLc (ORCPT ); Thu, 25 Aug 2022 05:11:32 -0400 Received: from outbound-smtp10.blacknight.com (outbound-smtp10.blacknight.com [46.22.139.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18C1352090 for ; Thu, 25 Aug 2022 02:11:28 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp10.blacknight.com (Postfix) with ESMTPS id 75DDA1C3E90 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: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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. I see the patch is already taken out of mm-unstable so back to the drawing board! -- Mel Gorman SUSE Labs