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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC0A7C433EF for ; Mon, 25 Oct 2021 11:16:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 747F560EDF for ; Mon, 25 Oct 2021 11:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 747F560EDF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id DE8FD940008; Mon, 25 Oct 2021 07:16:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D980A940007; Mon, 25 Oct 2021 07:16:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C609D940008; Mon, 25 Oct 2021 07:16:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id B75A5940007 for ; Mon, 25 Oct 2021 07:16:54 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6EE5C182CA105 for ; Mon, 25 Oct 2021 11:16:54 +0000 (UTC) X-FDA: 78734707548.04.64B7B96 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf01.hostedemail.com (Postfix) with ESMTP id 9A7C45084D58 for ; Mon, 25 Oct 2021 11:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=uKMp+UdofClw849xuzt1pSlxZ9rknHZuSbrollMA2yA=; b=A1BwrVGajL0/kYFkTVv8hvGdlp MRagtoNje8/nZnYxmtC5XHKoDIDkL1IlPPvYMcgfe9exFTGTcsoZAKo8v8niW7XLXkatGS42P2amc H5/rQuZlcwiT034Suf0f5mjAz4iecI3IE99DnPXgzNV+2KUs1NQfAR4ydCtFyLafeEy3R1MdTaKqf QYdrQftsD0z8vx9vZpslVyfL9FXL2XIs0VZUbkRQFtt1sq/FyiKZHWvwaCjZQhHTy14/oEGcQ8S0j zpM3iihfMdRe/3+FUSUQQWsPxzUXrG4qdwSsEEExWAIA0wjtOnhEyFeKBi52z5D29NmQkvO99a2y9 +c3cviwA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexyB-00C8L6-Q8; Mon, 25 Oct 2021 11:16:47 +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 37E743001BF; Mon, 25 Oct 2021 13:16:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0D1DE20C6C142; Mon, 25 Oct 2021 13:16:47 +0200 (CEST) Date: Mon, 25 Oct 2021 13:16:46 +0200 From: Peter Zijlstra To: Vlastimil Babka Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Alexander Duyck , Alex Shi , Hugh Dickins , Johannes Weiner , Thomas Gleixner Subject: Re: [PATCH] memcg: Optimise relock_page_lruvec functions Message-ID: References: <20211019125034.2799438-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9A7C45084D58 X-Stat-Signature: adket764sxe5sw811gorxob8zo5cyszn Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=A1BwrVGa; spf=none (imf01.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none X-HE-Tag: 1635160607-286353 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 Mon, Oct 25, 2021 at 12:44:05PM +0200, Vlastimil Babka wrote: > On 10/19/21 14:50, Matthew Wilcox (Oracle) wrote: > > Leave interrupts disabled when we change which lru lock is held. > > > > Signed-off-by: Matthew Wilcox (Oracle) > > Acked-by: Vlastimil Babka > > Assuming lockdep is fine with e.g.: > > spin_lock_irqsave(A); > spin_unlock(A); > spin_lock(B); > spin_unlock_irqrestore(B); > > (with A and B of same class). It's unconditionally okay with that pattern. As far as lockdep is concerned there really is no differences vs: local_irq_save() spin_lock(a) spin_unlock(a) spin_lock(b) spin_unlock(b) local_irq_restore() It's the RT locking primitives that care about the difference :-)