From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (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 6701D392C40 for ; Mon, 6 Apr 2026 18:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499083; cv=none; b=Nn9+XLB4Aiz5aZ1IVzUtlNebuVO9jpCvUhDmqVfGTcCv01Mb5QcISYNYMyQKQwjeIO1Q0bQkk0kvj1a4N6ROF7nYNgjo2ImlB8yy17swk421yEhuf9jQ33gJLC1O4jVYG6QAyJ4xD8BY2z5AsuCaGuictgnhNYQeiCwRW1E/O1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499083; c=relaxed/simple; bh=mvJHDQSniuPRVZlhKG7TgD8Kalt9wGJugRQKAMePGzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ogp6pIeicA2MxiKrNPDjyPuYU1/72p5cay+rLZvyWc7uC0xZAsM9gtf5vOELqDxZAxFb2/a7EYTkkf27Gq8XNAXJQRKRjX3AudPQUNcdrUPkJOoXbNUEL157DzdBDhku13KgJ8BRG7sG7JAYp2O/JzD3J/tpFp0H64XGQkko8oM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UMj2OxG3; arc=none smtp.client-ip=209.85.160.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UMj2OxG3" Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-4232323a7daso1062016fac.1 for ; Mon, 06 Apr 2026 11:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775499079; x=1776103879; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6TnCmX+3/CCMvkLoaDVEag7E8oCzFpXmbhOnswXUGMo=; b=UMj2OxG3ecKWh1FDE08uukTWTT8W9SbEGjMMHVbjDRjROzlWpOKOlRZQXFQInZe3gL xd7KZpOliIgoXE4eTXXJJLuebLI7SZ5GtJKJtMcRy2UbAYZzsc11uCKMUf4I2iQ33ogl M+UgQdejoseRp57+Of4HETjuGAHxgsuTvoWE3RUB/CQ+8D01am4g5MPyzu25SpMJ0GQt bPaSBU6COFrEPkDgHOunaHoS9504ObpksD3H42f0W9YJChhDBaFZM5a8rRvnuFuJLVep /3PsQ44q1AcQuMda2N8Sg0t3VI3EV/zZ347t2bTZ0JEdncDofIPW5ylt9Pv1g/J8hE8N OiaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775499079; x=1776103879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6TnCmX+3/CCMvkLoaDVEag7E8oCzFpXmbhOnswXUGMo=; b=CGWTEvaeg0E/IKrI07ISeWhlMwqLVHmoht51t42qE1/M4yWeJ0tK6KMnPWjvezDEnJ 96sQx89irf0IkvzgZ8MT1zl2LkVHSXhswa0KXeOtOcXyt416wAdNdqOQQqWEb+PjX3a0 j0c1UXwmuAaOGHcBwDK4PIXz692l4K7Dnj0X+83MUdtFimhKGSQ6kZ7mIHh9MSOeOqKU SyNHzTGg8+wR/3IeCeYxPiF8QMRtSlHQJ25R7rElE/xRqc6o9Y6urqPEe5yD0hWcahAc IggQosPdhXfaq93hgtuIqWqmvfofTnQrtW5Z/DZ8affgst1Iza6l2jxfKyaNRLmuxwiO yw4Q== X-Forwarded-Encrypted: i=1; AJvYcCWZaSWZieBcqdcEmCjTqKKq/RughreK4IG9mBQ5nLGqvd+sdhlU0PUe1lz+4YVtvfRBtgmXOyV6fOzcgUc=@vger.kernel.org X-Gm-Message-State: AOJu0YyX/l3BDaLDL2aNMqV4jf2NTq/cSg1mWeY5FYw3qykTqzzsVTwC +1he/sBwF9IlTyj4NhmsQB008L3XShESoZIPNkHD/GAushn3+KL2qdSy X-Gm-Gg: AeBDietEL/KzgdtxpwfpDcom0rJlgPwDPVgrp6dXv/Om73ewv4P9E1t7noUMZCzVidJ /+Xwxh7foKYluT2isDHdY+1ppLCL3vEDHaynHY+5Y182g4TFsIhGGUj4vdeMICPqF2ekd5Bu2Yt yapyh7X+8C7CXUbv+GG1+K/eKu6T2ykB7aTyn7jHl5zbt62uVvmDbaIf+vNNv772cs3kX/CtaFp J8se19OkFPfbXTjNpyCwJTKMMT3MmXYfiaVwyh5JnsuU1qn8cZYcNRo4M/Wvw8Pzajpus2hWGp0 ukeWKW98mOyuvQLyrPzo8Y8Fwf9ELbXVIGFRnUyHTAsZAjqgxn78XhzLkUermYPPyWJ6w1bfjUO jtMY35YkLXhbz6EQKBKAUua3x3XSVstk34adIMAYE1RAx5U+gmdnFrs5MaNxmnS+DzKgs1f8H1d /ewgiNN099uMmb++4Sbfi1cA== X-Received: by 2002:a05:6871:2313:b0:423:6559:ae4d with SMTP id 586e51a60fabf-4236559b3edmr2499144fac.37.1775499079203; Mon, 06 Apr 2026 11:11:19 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:50::]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4232eb3d0e4sm7345417fac.6.2026.04.06.11.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 11:11:18 -0700 (PDT) From: Joshua Hahn To: Qi Zheng Cc: hannes@cmpxchg.org, hughd@google.com, mhocko@suse.com, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, david@kernel.org, lorenzo.stoakes@oracle.com, ziy@nvidia.com, harry.yoo@oracle.com, yosry.ahmed@linux.dev, imran.f.khan@oracle.com, kamalesh.babulal@oracle.com, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, chenridong@huaweicloud.com, mkoutny@suse.com, akpm@linux-foundation.org, hamzamahfooz@linux.microsoft.com, apais@linux.microsoft.com, lance.yang@linux.dev, bhe@redhat.com, usamaarif642@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Muchun Song , Qi Zheng Subject: Re: [PATCH v6 32/33] mm: memcontrol: eliminate the problem of dying memory cgroup for LRU folios Date: Mon, 6 Apr 2026 11:11:16 -0700 Message-ID: <20260406181116.4053796-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <80cb7af198dc6f2173fe616d1207a4c315ece141.1772711148.git.zhengqi.arch@bytedance.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 5 Mar 2026 19:52:50 +0800 Qi Zheng wrote: > From: Muchun Song > > Now that everything is set up, switch folio->memcg_data pointers to > objcgs, update the accessors, and execute reparenting on cgroup death. > > Finally, folio->memcg_data of LRU folios and kmem folios will always > point to an object cgroup pointer. The folio->memcg_data of slab > folios will point to an vector of object cgroups. > > Signed-off-by: Muchun Song > Signed-off-by: Qi Zheng > Acked-by: Shakeel Butt > --- Hello Qi, thank you for this series! > static void memcg_online_kmem(struct mem_cgroup *memcg) > @@ -4949,16 +4985,20 @@ void mem_cgroup_calculate_protection(struct mem_cgroup *root, > static int charge_memcg(struct folio *folio, struct mem_cgroup *memcg, > gfp_t gfp) > { > - int ret; > - > - ret = try_charge(memcg, gfp, folio_nr_pages(folio)); While developing on top of mm-new I found that this was the last caller of try_charge(). I was thinking that it might be a nice opportunity to just remove the definition of try_charge() as well, maybe as a clean up patch at the end of the series. I see there are many acks on the entire series as well, and I don't think it is worth doing a new version just for this. But if you are planning on submitting a new version, I hope that you can consider this. Thank you! Have a great day : -) Joshua