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 X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C09C4338F for ; Wed, 4 Aug 2021 07:39:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD4B960F25 for ; Wed, 4 Aug 2021 07:39:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD4B960F25 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3D2078D0037; Wed, 4 Aug 2021 03:39:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 382708D002D; Wed, 4 Aug 2021 03:39:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2707C8D0037; Wed, 4 Aug 2021 03:39:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 0F90C8D002D for ; Wed, 4 Aug 2021 03:39:26 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B3F161E06C for ; Wed, 4 Aug 2021 07:39:25 +0000 (UTC) X-FDA: 78436597890.11.12741C9 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf19.hostedemail.com (Postfix) with ESMTP id 288B7B00BCAB for ; Wed, 4 Aug 2021 07:39:25 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D4D9C22193; Wed, 4 Aug 2021 07:39:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628062763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fvd9pPr9EanKWBW5cDt9Sg5pvM2uTEKHOrqxlKqLhuE=; b=UzHHJ65hvzZkwrhUytOaNbHvEDJs+m6w9AqJrpSN6Eu7Fk+tWYzFaysfAMgWLxPAXRKsK5 WgC5cerdwOJLCAD+Yad0uXurjc6hwK/zhAl5uAC5zbuB/OBcUpIK7RFkkHtnosVMYVepM2 V7ivdH+N7LSHpj0BA9Q4M6aMZRESDds= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628062763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fvd9pPr9EanKWBW5cDt9Sg5pvM2uTEKHOrqxlKqLhuE=; b=l4IOXECy3nbKl00pW05d5t9CIG9R796gBwYSXRuZBE5IUbxcGEybBzu45/vZBwug9NuH04 XOt3qwD29AbYVVDg== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 97E8B13768; Wed, 4 Aug 2021 07:39:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id AunDIytECmHVSwAAGKfGzw (envelope-from ); Wed, 04 Aug 2021 07:39:23 +0000 Subject: Re: [PATCH] mm/memcg: Disable task obj_stock for PREEMPT_RT To: Thomas Gleixner , Waiman Long , Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Roman Gushchin Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt , Muchun Song , Luis Goncalves , Sebastian Andrzej Siewior , Daniel Bristot de Oliveira , Linus Torvalds References: <20210803175519.22298-1-longman@redhat.com> <87h7g62jxm.ffs@tglx> From: Vlastimil Babka Message-ID: <93dfe0d4-c687-93f8-da75-c5d3c9bd0ac7@suse.cz> Date: Wed, 4 Aug 2021 09:39:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87h7g62jxm.ffs@tglx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 288B7B00BCAB Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=UzHHJ65h; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=l4IOXECy; dmarc=none; spf=pass (imf19.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: n7ybdsz4ubudim6uf7g5jpjno7udp34g X-HE-Tag: 1628062765-731213 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 8/4/21 1:21 AM, Thomas Gleixner wrote: > /* > * The only protection from memory hotplug vs. drain_stock races is > * that we always operate on local CPU stock here with IRQ disabled > */ > - local_irq_save(flags); > + local_lock_irqsave(memcg_stock_lock, flags); > ... > if (use_task_obj_stock()) > drain_obj_stock(&stock->task_obj); > > which is incomprehensible garbage. > > The comment above the existing local_irq_save() is garbage w/o any local > lock conversion already today (and even before the commit which > introduced stock::task_obj) simply because that comment does not explain > the why. Michal, this seems to be your comment from commit 72f0184c8a00 ("mm, memcg: remove hotplug locking from try_charge"). Was "memory hotplug" a mistake, because the rest of the commit is about cpu hotplug, and I don't really see a memory hotplug connection there?