From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) (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 9971B22B8C5 for ; Wed, 11 Mar 2026 14:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773240951; cv=none; b=mcdRtLCDLk54TPqifHSvuXEel6FTe+bgyyrhRcEkyZ22vtg11eVnZYHTr3CivuM7ge+m+99YCgO/BcvCCq1tMPhuuafB6WMUcsDouz7QA28wlc7s5kLJ46MyGBx3B2MKb5H282u4lsRNhj8Q4XVER5pPC1ZWHMBQD4spgkQxkQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773240951; c=relaxed/simple; bh=5f5tRTKEyYw6qJ30Y7mId9YxF4B4rXjuWjdIa1m/Ydc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvUmGplhehYgN86mNf3q9d5Hmi/5j4Wgcm0L2mJpEOnbsNZwyy+khn35Nt1NJ+ZSw+Radu3W8wUYdzCIOYhrbcAp6Dtsobq6/z5scY+xkF2P3GNM+0qAj6m2gikOny0mAdZCGVCdxXw2GiKNCvzvebmj2T4zHCgcKxi1AivTxn4= 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=gxbkgZWB; arc=none smtp.client-ip=209.85.161.45 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="gxbkgZWB" Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-67bb19ac35aso2900455eaf.1 for ; Wed, 11 Mar 2026 07:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773240949; x=1773845749; 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=coDqJI1op4oYDtjwGdTFlrXQKPgNyvcAEUeJOHUa6Vo=; b=gxbkgZWBN5hjHfPlRFiIgCAim4JKnYFs/BzrluG/EoHwz/EUHCM6chRgX40m1PZstb WRf+dOzoT3/CVpu0gSagc0HXot634sGPMpmhFchkAlk6VisiIsEUDjwMYDDh3MIoWirm gWv4/E7inAgQZGjXC/k77Wfjb+yM8NapGwPZry5dqSGoworuy3inJBfZBvJwVnlPp1I/ vQlI8ckLa9LTnjo+9itUbBygeZkgbECtV1MhkFQB55u73FVnHjf7diMA/ZbV1WpJveWH cp45GO8ZxAwuIimDM/kYYudVG1W42Nz5g31wGN6pIZT8hoexunNmUC19Yba26ejfHDnU xEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773240949; x=1773845749; 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=coDqJI1op4oYDtjwGdTFlrXQKPgNyvcAEUeJOHUa6Vo=; b=pdMi6AuqU0XJhd05SO5ZaMZL/GM008ibnOaDteWt36j498CTj8NRwta2nJvcSjx2ri 8HmsNRmRKzvOjVH7PDyDRzHA/IMm0Iug+FMGZd77lzaxMeRs0O5vUQzewpeHEKGPFryQ w+xHAgdnhTzVjPGYKfSZQasY9vu0At0ZtIEkltJCwq2osyWJT1cqNr/lW/JMajm3d6+o p2ED7XF3ht4OH8fIu+NZ+oheRHE1T2aAmsdxSliVdZb8J19m+S/RCmwfP29or6d/76EO oTfuUB6x6acAq+6qLq0mHTru3gTvv4IovQCKiqXsyeXosTDjSGFzn+oe/NXXH7dOT4Xt aIOg== X-Forwarded-Encrypted: i=1; AJvYcCUP/3RO8ukVNksKOJUihjaYE6R55/QA9rz93ICCnLrPzGiUg1B1RcC1/wr3R7RajwRwP5JPGKdjrOioj28=@vger.kernel.org X-Gm-Message-State: AOJu0YyIp/0J3DJ+VeJsP6+9Rk2C4IIi5L6j3rGz3OnXvFAw8QXgQmSO jxO0WcMR83Hi8QvBCbmL2khXttMm1gquqCSF6pt5PcEWzs5PbK6JrULv X-Gm-Gg: ATEYQzxBmkFb6m7/kFAB0u023QTKCQtsrjMEZ/4v8KASkKPh3X0UOz9Ng2DBTSeQt/2 Y7BNgOD80TnVibiOnPnGe4oct9N8UHwNcnfu44UoGZRuZGvXyBIf9JEiOIxJOmVk8LFxdKbU2/q tZS4IwQZ4EPBtCUbsnGcp8nEWLry21Ht2xSGOMHK+flM7DUfXmTajWOsqNPiQx7xm0ArdJ2dLK8 JZ9iVMdJqFN5yq+2ZxTlMOhy1WFIUw/Ea8IJzi3RZeA7WVSFki4oknAn91vblPFD0wLVlHAWswF AkwRm41hqljbvVOWT9bNnB4dLzxnTCdNAfCJeMhzHGcWBPRX3JVZ0gY9jp7+rZ/YGKejj3rNBnc eN5jvEXDVywmWm+ZhLR4TytzUxrXGwItxXftBS7xeO0NvWXnV7gIQmuT4o4UK3vPBGr3+yRgKlg u/wEJ6k7+AGE4z7bbyPcXjdg== X-Received: by 2002:a05:6820:16a3:b0:67b:c7a0:e4fa with SMTP id 006d021491bc7-67bc889733emr1799649eaf.4.1773240949468; Wed, 11 Mar 2026 07:55:49 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:72::]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-67bc9336db1sm1433202eaf.14.2026.03.11.07.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 07:55:49 -0700 (PDT) From: Joshua Hahn To: Alexandre Ghiti Cc: akpm@linux-foundation.org, alexghiti@kernel.org, kernel-team@meta.com, akinobu.mita@gmail.com, david@kernel.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, hannes@cmpxchg.org, zhengqi.arch@bytedance.com, shakeel.butt@linux.dev, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, gourry@gourry.net, apopple@nvidia.com, byungchul@sk.com, joshua.hahnjy@gmail.com, matthew.brost@intel.com, rakie.kim@sk.com, ying.huang@linux.alibaba.com, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] mm: Move demotion related functions in memory-tiers.c Date: Wed, 11 Mar 2026 07:55:47 -0700 Message-ID: <20260311145547.2461611-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260311110314.237315-2-alex@ghiti.fr> 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 Wed, 11 Mar 2026 12:02:40 +0100 Alexandre Ghiti wrote: > Let's have all the demotion functions in this file, no functional > change intended. Hi Alexandre, I hope you are doing well! Thank you for the patch. Makes sense to move the migration functions together. Just one small nit, I think the following comment is pretty helpful in understanding that folios that aren't demoted still remain in @demote_folios. Should we also move this comment to memory-tiers.c? [...snip...] > -/* > - * Take folios on @demote_folios and attempt to demote them to another node. > - * Folios which are not demoted are left on @demote_folios. > - */ > -static unsigned int demote_folio_list(struct list_head *demote_folios, > - struct pglist_data *pgdat, > - struct mem_cgroup *memcg) > -{ > - int target_nid; > - unsigned int nr_succeeded; > - nodemask_t allowed_mask; > - [...snip...] Anyways, the rest looks good to me. Have a great day! Joshua