Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3053208lqo; Tue, 14 May 2024 19:47:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKpmgtbPP+zAEtIn5Mz8sxlsauTL3YwitQIbMH1/1zSr97BTBy6B4vFNASw/oPBkb+a7zEVFxUCdg/a5ipiOp3rUiNdl9p0FWpqt2nLQ== X-Google-Smtp-Source: AGHT+IGt4lWYRCYtAcpBbAfu6p94sImk5IZ9nmPBi7Jlp3nor6SGzzfduHu89aBctHbaQ/tHZH5N X-Received: by 2002:a37:c243:0:b0:792:baeb:1d61 with SMTP id af79cd13be357-792c7598814mr1666147585a.24.1715741241958; Tue, 14 May 2024 19:47:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715741241; cv=pass; d=google.com; s=arc-20160816; b=J+tAkzZp8dtX27/zU0PWqJSevyINzZa8iwHtJGEgPgkbR1tZTNIhoNA27sESoAazxq ebRQvatof726FL8v39smbZ2sQtGWW5ldO+xbTPuZCc7EEBzcAVQ4VKLs2FDKO5z0YpLl Bb1d2pDOZi2LpnSDbDyQd6fdbGHlOFYU+dmY5DU7D58EZkvlUezNLGyQnxUIydShiXiV afe1zELvjQGPL6Z9PinPphg05EqagYX3clmeo6eQfwLVH27uXSuSNZzqzne0VVblmF1D KXsHap65NOL1Gxv/WSHiNbXfV7QgcuG8lXPfDA6Gw4zBknqQX+A9cNeGoyel9YfXzAmY 817g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LWI5bgXmqsNPJRMEQUJSHBHxTumSuTFLjCmBxTnuUuo=; fh=nJTCkkbctcIyKDQDNPDWXYw1Jt3pjHGc0H+6NywGp2Q=; b=PVSAlyHypsfw56olRypZPhwCC4Iz0IrsS9qB6j8Isdn+O2hgdX47lvqEzQx3AVDUsv FdWQ5gr8tGP9i4hSmazXmig3Q1E/J62+IMBmLfv6SkzSGIm0mGWYZdMWQIMZ9Lfg1FdP MRWzaALjrjpYJND39IDYRI5VlLG8bW382KGSl3g9VeVk8HzX955S2jqyxmMNqgOOkPqp KiX5X7dNR8fxd1UA2Ttl73Ynm0WFK13eWmA0vRILZxqUMFDTj9enELuR4MDYP6DIWHTr 4ok2RbppDRWJwkvY+XBOS0Qcz63eyr0su2OUw+cWYV9SULEhp14tCwNPCx8XvFieAjpL KqzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-179359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf30a930si1267032685a.371.2024.05.14.19.47.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 19:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-179359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 AD5D11C2138B for ; Wed, 15 May 2024 02:47:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C483D374CC; Wed, 15 May 2024 02:47:14 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 7BB012E83F; Wed, 15 May 2024 02:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715741234; cv=none; b=pz4laoqbZa2dJ+uq7aWmvE3UsjleFpc4ZNTnhbMW0vm7cVljCoERvmtDXkWDdAr2vvW3hGfBSdD3i5oA89su12z300lbCKvJWQTtsl6Y2du7Q4i7GKTDyLXhbngv4HlV8AmA/TBsIPsflzuNt/IRBoT8PJKUsLfFmI2guluhG/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715741234; c=relaxed/simple; bh=I9V72DkiQhdP85f8x4+pkp/kW6Su4vtYx3XDQpiP11k=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=HGuRbkw1ANeFztygbqxQaDskKpywi6vIz2kKIEf/gjjYoeLxHMOR38DC9/S9VFoUmmjAMkGHM2GjKecoaUo+BQgap08WUMHbfCo9Ub7TpfzFBggHRSzvdO5+BJX9liqrzHRf1/47bs6B+W9wmKcCl0j3G+bySp5Eqbml40Cb1PI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4VfHZz5Xn0zgZCs; Wed, 15 May 2024 10:43:07 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id 9CF52140155; Wed, 15 May 2024 10:47:08 +0800 (CST) Received: from [10.67.110.112] (10.67.110.112) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 15 May 2024 10:47:08 +0800 Message-ID: <41fdf6cb-ec1b-ff07-44f4-3ba01b45ebda@huawei.com> Date: Wed, 15 May 2024 10:47:07 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH -next] memcg: don't handle event_list for v2 when offlining Content-Language: en-US To: Roman Gushchin , Michal Hocko CC: , , , , , , References: <20240514131106.1326323-1-xiujianfeng@huawei.com> From: xiujianfeng In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) On 2024/5/14 23:21, Roman Gushchin wrote: > On Tue, May 14, 2024 at 04:09:58PM +0200, Michal Hocko wrote: >> On Tue 14-05-24 13:11:06, Xiu Jianfeng wrote: >>> The event_list for memcg is only valid for v1 and not used for v2, >>> so it's unnessesary to handle event_list for v2. >> >> You are right but the code as is works just fine. The list will be >> empty. It is true that we do not need to take event_list_lock lock but >> nobody should be using this lock anyway. Also the offline callback is >> not particularly hot path. So why do we want to change the code? > > +1 to that. > > Plus this code will be moved to a separate function in mm/memcontrol-v1.c > and luckily can be compiled out entirely for users who don't need the > cgroup v1 support. I found the patchset you mentioned, Thanks. > > Thanks!