Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp82404lqb; Tue, 28 May 2024 09:22:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmNZb1M/pjbD/D4u7evEsreIEhJjCq28/k+1NLDrk4bvcdz7HThDQPNYO6vLDaYxGB9f0QRNN9AWjTXlaqnOmxg970suXhTwNCT2KLxA== X-Google-Smtp-Source: AGHT+IElzjsxOAwL2bKQeqvqfaz8J7xkVigQaYmgLLErjlvq2cwbRtNzUTjW1GulsAaAlA3VGCuR X-Received: by 2002:a05:6a00:2c94:b0:6ed:d5f5:85e with SMTP id d2e1a72fcca58-6f8f2c74a8dmr13094203b3a.3.1716913341882; Tue, 28 May 2024 09:22:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716913341; cv=pass; d=google.com; s=arc-20160816; b=wB7e6Vy78+0eE38rqvZn5a9ZwG2H5sFTPPB0Fs8vvJWg2ZM2ZbUgefMeifC9bB/7iW fGy08cFQnkl9nO8coyJrIxxfsU6kNnjBf84qhXfxIFHWgH0Fk5GPPgGY+/+cPS1Drcry jFSlJQcn1M29HVk451kZESQAlAUbNo8W1xPcfs9Jc74IDpdxBi/7IKz4lNtzImOJeHzQ QLgny6Qc4r6q5NNhYR1UUS90lHrlrCKjQ/Lr52lSam/Cf46+TQGDgNkk878WcBIhy9yR Dz8NNQAHVJo1IpWA6Vwmj3tZBKIdmzGrG5UMXHmB9cv0D2Rq2dvflqlU2jabbLwavCef GJOg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yuktqrfd31OkWOROGNmSkwGnkxmTBVn2VgOEo4Ue4P4=; fh=YKrC7yTxMlejfbDLbFFN1AbDQm0E8FzNQ0iEEgmpKsM=; b=t9iy/NRdi2qJEDNdufhEjs+OXshUCJHqM/1etMy9/PUiJZR9CUMSgLuaCJmij0nrmr 17POK8/WO0glReDKb+polCXWBlq9r/MnA03jpnLpieKhfvb0WRucKgDfWTSUXyLowFMr Us+crJvB9OxPVlj8kW1z07HrgK5UVN3ZUCKRx0YGc1AEiwjbqMd3IU8B469W4e/3y3sF tx9whJWMCvKcHqyJ+0WS4sfSAUtaOYZMUTkv5VBXBCWhpZbZFlvtSrWGPtcI2UeeuDY7 jvw4zRQ1eOipFlZqokr7R+T5R+Bd63SBYMq1sUA6zsmhwHMbyu2jqLB4sAAqYXRiHkXZ zsRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Kk1LlkUh; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-192742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fcfd8078si8144297b3a.159.2024.05.28.09.22.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 09:22:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Kk1LlkUh; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-192742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3733E284FB7 for ; Tue, 28 May 2024 16:21:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F036B172BD9; Tue, 28 May 2024 16:21:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Kk1LlkUh" Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 59B7D172786 for ; Tue, 28 May 2024 16:21:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716913290; cv=none; b=iUJ4SYetisiZV6V1uewKR5rpawbJApk/rlJkfsujC9tZmo0Aux8eOqsitylQEpKZ9+G6g4odBmuVyhlmxnNj7OJJOJl+6RroL0n7WR2y59Oxn/exbEWiu5V5qB0bktBLTOfjEjMEHEBwfO/SVFCK04wBywsHh79krvPKFhmVK80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716913290; c=relaxed/simple; bh=Biu4PBBspoqGQ3J7fgglu/BUZ6uUOiZAOORBWSaUKy8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tQTFIXZ+L2Khl8oeuHWv/V+oRQ/qFk7Wrr6kqW9HM4guTvt04CGNh1AbWahfX7lFeOpMPkZHHPr5CKcZjI7+kx05fhqPckKeznLkTUbayFMuwYmY2OBhzjILhf9TGzWHhZEvzuT6s4nDHVJWwtH6y9ktLZHoMJqYz+cZ/PlYTw0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Kk1LlkUh; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: vbabka@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716913286; 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: in-reply-to:in-reply-to:references:references; bh=Yuktqrfd31OkWOROGNmSkwGnkxmTBVn2VgOEo4Ue4P4=; b=Kk1LlkUhvRu0ERT35QVz+9NWUESdBeuDKd/X62727Y+kM8i/6ZCwLGAs+Wy+NxMHFZQke1 NMFqhXFreeY0TihVufHlBN1vGNTfoSzFnU2jFRdGKOo8Lt9DobDHYkcWRmdnm9xmQbKtp6 uVV7ICwDx5v6coFe53oMYyOXeZgFSKc= X-Envelope-To: bigeasy@linutronix.de X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: hannes@cmpxchg.org X-Envelope-To: mhocko@kernel.org X-Envelope-To: roman.gushchin@linux.dev X-Envelope-To: muchun.song@linux.dev X-Envelope-To: linux-mm@kvack.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: tglx@linutronix.de Date: Tue, 28 May 2024 09:21:22 -0700 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: "Vlastimil Babka (SUSE)" Cc: Sebastian Andrzej Siewior , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH v2] memcg: Remove the lockdep assert from __mod_objcg_mlstate(). Message-ID: References: <20240528121928.i-Gu7Jvg@linutronix.de> <09e085bb-f09e-4901-a2dd-a0b789bb8a4d@kernel.org> <20240528134027.OxDASsS3@linutronix.de> <20240528141341.rz_rytN_@linutronix.de> <897354c6-764b-4f3f-9ece-2feafb0222e9@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <897354c6-764b-4f3f-9ece-2feafb0222e9@kernel.org> X-Migadu-Flow: FLOW_OUT On Tue, May 28, 2024 at 05:07:06PM GMT, Vlastimil Babka (SUSE) wrote: > On 5/28/24 4:59 PM, Shakeel Butt wrote: > > On Tue, May 28, 2024 at 04:13:41PM GMT, Sebastian Andrzej Siewior wrote: > >> 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 __mod_memcg_lruvec_state() and > >> does not require yet another check. > > > > One question on VM_WARN_ON_IRQS_ENABLED() in __mod_memcg_lruvec_state(). > > On a PREEMPT_RT kernel with CONFIG_DEBUG_VM, will that > > VM_WARN_ON_IRQS_ENABLED() cause a splat or VM_WARN_ON_IRQS_ENABLED is > > special on PREEMPT_RT kernels? > > It only does something with CONFIG_DEBUG_VM_IRQSOFF and that's disabled by > dependencies on PREEMPT_RT :) Thanks for the explanation.