Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp506775lqb; Wed, 29 May 2024 02:17:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhFEGiegldSaWM3TJ3nOPMFNiyy85+MfPoxRC0wqCV8/e139jQBpZrJqD59txUcMilguQ44p9aTTqFmJDuFfKbNmj9t0Jfg6O1sA2RNw== X-Google-Smtp-Source: AGHT+IHwXX01LHG8cQ1LjEBey0VhFjKJ/7kpToSGBZBOQw0RENGD1gdGxgu2pxKoBtu/XhwB+tml X-Received: by 2002:a05:622a:164e:b0:43d:fd4e:b893 with SMTP id d75a77b69052e-43fb0f12167mr166959941cf.45.1716974227410; Wed, 29 May 2024 02:17:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716974227; cv=pass; d=google.com; s=arc-20160816; b=cayti4uYM7ZkZT+h53QTNcCs/y2Newbq/mSH/CYunR4wS98j37ZVEAJFDShsLFx1ao CFNhYH/rxj+duTqUEYmplrn5vtCmOalEkVcbMsUlxG7BiYSlGx/YWhFAio4kTAf69px7 2t98nxXjStUUsDIfx+luzbOJu/LdbGxZQgMj5ap/j1AX5wsgkPK8cM4GbQUv11f5PcGl xlM3PXEv/od7ZZAE6ZqybnQGV2b1vtwOfXX+SnwNQQw73QeeBvm2qyBd3gSZCrbmKZVT BzUR1IV+1SwmOKiN3vkaOK8gtn32y41YnhNNrZAWr5ajTh5JdCNhXXFA7qi+2ef1sTcM KFug== 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:dkim-signature; bh=drsjYDhKr/t1LAl2BAdlMhkJ1IEJgrd0Ng+4OFdPbmA=; fh=m9YDZ0DhzDSsdIUfifEY6n5gn1Il4ln2Td/az6W1nbg=; b=Z9rVva6aMhOsmbobP7oc9KhvU38sd28RhmTHJACalr5gsEd45cHQNXQ/EdkEcpuabx SoB8OM5xPMoMdW1YmOYT7rlfYUB2e8ouE99PpCmRKp/4KTQF6kLTmnJGxh/45ltePaTr fTTGIR7xLZKZh/J+Y6A9qnIOF/STt+4BR9IPOLXdQK3IJPNNflV0lyJTkonCEDHTrKkp jzrqkHswN4vMPSl8uI0HAb3GTd973Mah3Iol909vW6IFu4HsBypfI5RXZPc6jIfqKl78 IB+R5vrOo1FD8Q42lsbJTp9l3YmEJIuRaax/Z4fAkPlod189htXY2IwuWcVgQd6KC6H6 bxzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OBwd7COA; dkim=pass header.i=@suse.com header.s=susede1 header.b=tu8OT6rM; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-193823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193823-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fdeb41568si20889861cf.691.2024.05.29.02.17.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OBwd7COA; dkim=pass header.i=@suse.com header.s=susede1 header.b=tu8OT6rM; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-193823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193823-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 210CF1C22D56 for ; Wed, 29 May 2024 09:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0CB0169ACD; Wed, 29 May 2024 09:17:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="OBwd7COA"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="tu8OT6rM" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7CCA6F079 for ; Wed, 29 May 2024 09:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716974220; cv=none; b=B7uSPvvWA6YAs0fG/e010bsqV+h2l/aECv5zy9CBimVMQFCxPf5TkXhh+QSs1KvE/V8idXu8XchMbGQAMu78lx7CDfG0epF9ueq4Iiy/+ewtCv09L3ak1HeUUby/xlLP0aB4WgYrCojwJ7fzWR7dyCPLgacBPpR4EfBif/sEURc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716974220; c=relaxed/simple; bh=g+v8I5RS5Rx3vW6PyLEYjBK98J13/Fvd9jdUMa+sqsg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UvNocw+r3ApVhfpAzDE2eTYnDytBumHIg7EYqKbVASOYP4iKG4nWIMBmjxZC/xe8jDNT+zcM+UbYrNcSS5+bwTqPSNeVeg9KKousq/tGVHVhtKtzNFsQDKblSU95NZ6leMMVSoFmtXxAlVnSEuiT8yKicpsW3vjVLrDfXByqcHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=OBwd7COA; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=tu8OT6rM; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CBD3F229ED; Wed, 29 May 2024 09:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716974217; h=from:from:reply-to: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=drsjYDhKr/t1LAl2BAdlMhkJ1IEJgrd0Ng+4OFdPbmA=; b=OBwd7COAQnOiMDeJuo2vxc2pmkPCg2GLFhMXAp0qIDQnhPtjjTmae/UggwkRPMVzjKcBoR RLWHjre8fRDz8f9pWn/9bTBjTA4MlGmqh7bMJTJMxeg6PTfUHBvwmYxcVXXesTf1vF9fNq 6HThrSWikRwLLBW+RHEEmo4S0buH8P0= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=tu8OT6rM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716974216; h=from:from:reply-to: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=drsjYDhKr/t1LAl2BAdlMhkJ1IEJgrd0Ng+4OFdPbmA=; b=tu8OT6rM1QvKJsWHdBsrZuYnoqNjKJ9mN4DG8b155lWQim62knoTjOks0AMAWQ6IKYjZ9K fjSA/XtcW0buJ61w51DHjvZaKhIsUwh50+L0Uu4qOrxHNgnZTnm5WAtCkpWmoNGCIyfIJ6 T27ZviTngtAqAQMYiDfJz4OyFF3Rk2M= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A7F1A13A6B; Wed, 29 May 2024 09:16:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id g1wcJojyVmbxdgAAD6G6ig (envelope-from ); Wed, 29 May 2024 09:16:56 +0000 Date: Wed, 29 May 2024 11:16:56 +0200 From: Michal Hocko To: Sebastian Andrzej Siewior Cc: "Vlastimil Babka (SUSE)" , Shakeel Butt , Andrew Morton , Johannes Weiner , 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> 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: <20240528141341.rz_rytN_@linutronix.de> X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; BAYES_HAM(-2.99)[99.97%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_TLS_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_SEVEN(0.00)[10]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,linutronix.de:email,suse.com:dkim,suse.com:email]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; DKIM_TRACE(0.00)[suse.com:+] X-Rspamd-Action: no action X-Rspamd-Queue-Id: CBD3F229ED X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -4.00 On Tue 28-05-24 16:13:41, 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. > > Remove the lockdep assert from __mod_objcg_mlstate(). > > Fixes: 91882c1617c15 ("memcg: simple cleanup of stats update functions") > Link: https://lore.kernel.org/r/20240528121928.i-Gu7Jvg@linutronix.de > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Michal Hocko -- Michal Hocko SUSE Labs