Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp636943pxf; Thu, 8 Apr 2021 09:52:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTd1V6PGn/SocbhQNOWNXsjX3vWimDsGSmaUmyo8dzC+BHQdMOGe2WFnCXOrunpOmzeIt3 X-Received: by 2002:a17:906:8a5b:: with SMTP id gx27mr8953917ejc.344.1617900735874; Thu, 08 Apr 2021 09:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617900735; cv=none; d=google.com; s=arc-20160816; b=GUQgPlqg0r1IWSPn5ag4jWWUKtT/sd+pNXoYnIvSkQSVr9vYfaUX5Dlt+B+WEZvY6f PRoVNpJPeUvirETY+ohyOyphV74ShiRnIsS6dqz4X+7d1t8WSu8fsQaEN5zgtEg5YMQn PZaaWS1Kc+4ooazm6GkzeEjNEDp6TLPAr2fYzX1nnmLfVwaT52MMjwXS7G0eengr0LZs P86WYdHudLNviechaDIyWuGeMaAjlyLiqGTjZJ6HCNgfBnq5FP15glG2lvy9ND0I78Wg Hn4UO+ic3HP/CKl35zznv23C1VKm8h0Adp+BntFEkIbeY21s9UEHC48mlaEEbu8oNB7p 8hRg== 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:dkim-signature; bh=fEz0qL5rgd1VzfLvTxSwEHMutEn6GIS7JQ+Kp9M1gJI=; b=Ogye/e8Vn72I7J6wx2Fq/19mk6l2iImUZgnrpqIpBJGwe9kkPM2wGtVaJunBNAAxI+ w10oKfqY1mI6sfU5mAwakfuphsYHR/y5cgpcgGapAonAOy5POLZk24a4UWuLr92ZSgL0 nlQyno0YlY4lmQm2sNbJDy8TMjFHFe6ZX7a1M17jgflVq1LCALwJSGvMg7aECLbhZu4g YiDy8E8EgQnfJtV94ueNzNKWkZT1k44suHe5D3s9aLheOY7j5v0HQKHcD4Y0bmpyH3WO JOBMoo6SMWbv0xZMTgns2Af4q7QWx1BaNvGsEcfHZ4aPyoCMtwaJ2kFG40XmyLscgKJY +MpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bVkLffvL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si21903664ede.520.2021.04.08.09.51.51; Thu, 08 Apr 2021 09:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bVkLffvL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232359AbhDHQtF (ORCPT + 99 others); Thu, 8 Apr 2021 12:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbhDHQtF (ORCPT ); Thu, 8 Apr 2021 12:49:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB68C061760; Thu, 8 Apr 2021 09:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fEz0qL5rgd1VzfLvTxSwEHMutEn6GIS7JQ+Kp9M1gJI=; b=bVkLffvLTZgMgl+d5wzDgWDKrR O76Mtw0cqfFyPmETXybZGjHNWl/ovIvE8ZSum8LgbTrRXxxigYYMB4lKFULUY8nNWyMrIR7S3yACy NQlbmpL1t2BEInc4NeQcB3MiWHy1umdmTpZiu8kDWVAgqomOw2nV1AQKmuqES6qJjbeESOl82QsbI WWvyCB08gebpFdI2m2BJncq/fWpcdNH4ECoP8RNgdPPOznALlcSox6G6kihbuCwh6E1mo2wJ7xg5d GAavrpzBUbEL/9RWesYeCzjYeWl9MUsJ5dTkoK/k/NmbAoXDuA+GTxyVs26WvN4091q8NwjKLeGq2 7Wwzw/iw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lUXnx-00GXdE-2u; Thu, 08 Apr 2021 16:47:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 600723001D8; Thu, 8 Apr 2021 18:46:30 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 32EA32B71A271; Thu, 8 Apr 2021 12:56:01 +0200 (CEST) Date: Thu, 8 Apr 2021 12:56:01 +0200 From: Peter Zijlstra To: Mel Gorman Cc: Linux-MM , Linux-RT-Users , LKML , Chuck Lever , Jesper Dangaard Brouer , Matthew Wilcox , Thomas Gleixner , Ingo Molnar , Michal Hocko , Oscar Salvador Subject: Re: [PATCH 0/11 v2] Use local_lock for pcp protection and reduce stat overhead Message-ID: References: <20210407202423.16022-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407202423.16022-1-mgorman@techsingularity.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 09:24:12PM +0100, Mel Gorman wrote: > Why local_lock? PREEMPT_RT considers the following sequence to be unsafe > as documented in Documentation/locking/locktypes.rst > > local_irq_disable(); > raw_spin_lock(&lock); Almost, the above is actually OK on RT. The problematic one is: local_irq_disable(); spin_lock(&lock); That doesn't work on RT since spin_lock() turns into a PI-mutex which then obviously explodes if it tries to block with IRQs disabled. And it so happens, that's exactly the one at hand.