Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2602392lqb; Tue, 28 May 2024 05:19:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUF/8NTVDnXerkvu9e954ej+K1b/vM2EMhChO4Hx05LjWUe1WU8agOiYMn23B6VFYI77xGq17Bnyu64qcCZastrTAFUIBazaz7aOO6zFw== X-Google-Smtp-Source: AGHT+IGHc+adlfUWKPY4x7nzxlBx9gvfyiFVQNRWLUfCb6kWGIoD4e4Gag+UEBA0YhEEEBUgQ0AL X-Received: by 2002:a17:906:1e05:b0:a5a:580f:8e64 with SMTP id a640c23a62f3a-a62641a67f6mr733474566b.15.1716898798550; Tue, 28 May 2024 05:19:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716898798; cv=pass; d=google.com; s=arc-20160816; b=MeVjeVojunFr3dDVxaK8MiUaNj9orCsMPrb4jrGUy3nZ3jtCqXmHjTyOd8eGTjc9vq +JtHW/eNuhmLB1Ke+SzmTOuhexLeSsjPYzH1jZUnvT+VA39KZ4FTQVtn+dBPf5HoxDgX yYEOg/V7t+2x6Nw8WGqe/MLIXUEXgiygYScgOrKA5XrbToJ9sbBcDBnujKYNuX6QRXgF brXXIbXG79JZDoerDQsvgoB6BQVu8FsoVaXYBTmQGqQJ3sV33Sx8qqjkgZE+P09JGzqO OLDRVTx9Qz9QAt01X2MGxYaCRd3aGMfCwvhSY0Xo1V0zfEpZO7pKYte7iwL3+8mKOraL d/xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=BVI6TfGQyXa2HdEH+/r5e1ZnTptMlsWk95fc1VQDtGI=; fh=GmvVFmSVaaiEuQnyL4keyQ9LIblNua/mtQPfXZT4Mh4=; b=fV2Tn18dDgU/XiIo4F89rAPwxoLl10BpHeaKByH40Pill4wDK6jEUwsXLDLWJ+PGwi ugjBydgY100xZ5q4TqIwfA1dTpbdGRZ4afUIblbWnAW/cZLIjKsiUDW1CNZ8ok7gCrhw VXMzaXxpO/DvsR/BX47J8fhXK0vpBk/len9QnBUEzD3HW4XQrLHEU4POD8Aokvd9FAsl dqli6GLzQX0QlJvWvj8t0H4WYejprUiBMrTgRZRaxmpvLwrO2x6ldBv18UzamkwleBhw Ex945mYrz8GrTSJsT+1uKZ0M13UuYMCN0BEqKuJDkEiZFzhGU1pIVItXemPrkbi2Y9qP Xr+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zJyONNdx; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VFE9cBeZ; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-192277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c800583si500501266b.153.2024.05.28.05.19.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 05:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zJyONNdx; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VFE9cBeZ; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-192277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4BC5F1F240C8 for ; Tue, 28 May 2024 12:19:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40B5816D9AD; Tue, 28 May 2024 12:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zJyONNdx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VFE9cBeZ" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0567716D4E9 for ; Tue, 28 May 2024 12:19:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716898779; cv=none; b=LPBUv5v7w1MN3OJmLrq2e0UeQHgmOo47tfZz45IrsH+6OfIl/Fjbqyn2Jmh8/8EnDh5cjtV+30pbFkJt6jKHEKXhuFnzrk9i8NgfJ+Jz6RFR7Fo+gBQix7hkuT/037K9SrVGPDL8xfaqOcEfJoo56dn1xVz72fjsmBEG3JXEpio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716898779; c=relaxed/simple; bh=6k3PwYvMbq7Jv+xs5c9g3ZV6scoDh6bYmY+SysydD30=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=qD4Xl7pqeIgFfHAQWDyPUurnWuzomTs5sVsurNex0JKbS3lrc4tpvtr6oKnk35bLQ6Amzc7zanxt2koElpP5LuSAlKu6D1Rd1eROI9bAo6W4XD6uJne1Urk7i1LTJalSz88A7lcuyYaL9RV9xNH4zDI7c4oFrVJoKuEPIwyoCyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zJyONNdx; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VFE9cBeZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 28 May 2024 14:19:28 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716898769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=BVI6TfGQyXa2HdEH+/r5e1ZnTptMlsWk95fc1VQDtGI=; b=zJyONNdx8saZ2VFjVc8rTd0pApCI3WDAcZke8JmBdGrwkoI5WG6TlAkrqz87b1Dej4Iraq VyYQZibATPir4vMtdIrvRjZdERYh2tcKPfz2HCyhQMyMXrIue+l1I1g20GjpTZtcdjkyhG UUl77euxq2PmZaTu7VMqVk4dYrqZLD+mNEwoXD4xiDXJE4/OqUGoJ5ReT17JA2cUeRfpSj FEowPg/pFCTCStMChvYOGBQr3jL0W1XXi5jhiW5JFCOSwZ/VQrQx0iOj31jwZ7qrJNEZ5l RX4HfGtWUJ/cwZfTEsIKRyZ6o/lTkhmcf+EOjIbZ2BE/sDfKLyzJLApiDljJlA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716898769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=BVI6TfGQyXa2HdEH+/r5e1ZnTptMlsWk95fc1VQDtGI=; b=VFE9cBeZh5CSymXXWfeQVGjrBbQEPBfw1e5kuPWLhN4sfCVp68x+hZkwFF2mdx91iMaeXw MWzfG2V/8htD5MDw== From: Sebastian Andrzej Siewior To: "Vlastimil Babka (SUSE)" Cc: Shakeel Butt , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: [PATCH] memcg: Remove the lockdep assert from __mod_objcg_mlstate(). Message-ID: <20240528121928.i-Gu7Jvg@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline The assert was introduced in the commit cited below as an insurance that the semantic is the same after the local_irq_save() has been removed and the function has been made static. The original requirement to disable interrupt was due the modification of per-CPU counters which require interrupts to be disabled because the counter update operation is not atomic and some of the counters are updated from interrupt context. All callers of __mod_objcg_mlstate() acquire a lock (memcg_stock.stock_lock) which disables interrupts on !PREEMPT_RT and the lockdep assert is satisfied. On PREEMPT_RT the interrupts are not disabled and the assert triggers. The safety of the counter update is already ensured by VM_WARN_ON_IRQS_ENABLED() which is part of memcg_stats_lock() and does not require yet another check. Remove the lockdep assert from __mod_objcg_mlstate(). Fixes: 91882c1617c15 ("memcg: simple cleanup of stats update functions") Signed-off-by: Sebastian Andrzej Siewior --- mm/memcontrol.c | 2 -- 1 file changed, 2 deletions(-) --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3147,8 +3147,6 @@ static inline void __mod_objcg_mlstate(s struct mem_cgroup *memcg; struct lruvec *lruvec; - lockdep_assert_irqs_disabled(); - rcu_read_lock(); memcg = obj_cgroup_memcg(objcg); lruvec = mem_cgroup_lruvec(memcg, pgdat);