From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f65.google.com (mail-dl1-f65.google.com [74.125.82.65]) (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 A6DF92C15BE for ; Wed, 25 Feb 2026 18:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=74.125.82.65 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772043803; cv=pass; b=c+FYKb6dwOGvDANDDaxOACgKNhRZMIqEBLEy35NM4Tiiey6zkQUpzJ9fviDAQgbTtEDq9XyWvN9qioyfNh+ZWNjSOkgS2SlQvCVCBFonwxnb8XxClglWCcDKUTZerPKloCvkubag/xY0oj9IVkigHzdwIUe7yO+Q5qDI0zyzuu0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772043803; c=relaxed/simple; bh=5BAMHytd4kvzuUgndcBud/UrnLOdHAgpwSexbphb5p0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SmT+7GfAsAJlGFiB/4cyX5gvl97GEB6NrB1Tf+QgOOEKZ51QCu2pSIBAZ1j3JUJuQZ7ti98Sv0LMG4mdCPfa2Yc688QBaQwLqVjWz/S8Ac1Mtbg70OXeGYbVX14mcrcEPB+HlHby9/sTirjnarDEn+/IwFNsXfya1jQ7pIl6TPs= ARC-Authentication-Results:i=2; 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=YUwJnVOR; arc=pass smtp.client-ip=74.125.82.65 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="YUwJnVOR" Received: by mail-dl1-f65.google.com with SMTP id a92af1059eb24-1270ac5d3efso6576416c88.1 for ; Wed, 25 Feb 2026 10:23:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772043802; cv=none; d=google.com; s=arc-20240605; b=CAqE3yh5S1zazkqyiTqy4vj0T+axSmXGhQDPGwcgPvf3Xd3wExdsMZtmSFarB1JICW c4v80THJseLgtB3/lvPSfRXJyhHoFAQnJuA7Oy15Uhvq763aEOcV60xdClUXxHLrdvCH Kbd94kC1eiy7HKZwVFc0Ez7k1Lme4rDWqWVr33ZCNbrZiv4YTIVT5ZjdzjyhDy7sfZRx Oiv1gspZZ1JuSjRohOOh47OUgQz0mUupBq9EkanroJmpwNGusAQTm1dTTpuSEb2Y29I0 ajaK5zOsefPZ4epFcEelX0o7sKq2Vp8Kqoe9WBmhmt0Q6P3V1pgln871tfSx2fCd2/Ad NwIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/xa2NxgBV56+zcp+pDI4D3jQAyDOvWbrM47gZNUvrNM=; fh=lXelsnU3MOGePdrSrb4Bu+Hj4Ssbj5zjonn7ylKY/II=; b=dxJ2r5a99Y7YLksvzHtaNwLJqYxpMQHm0oBOKFnSDcyBD1ZtF6e5KnHvBZs+JGgmXo EaLrFl+iaONVC8MZnHpbR2beI0cg1Dn5kj5sx+oGWittT7/a+5swA+o2FioiWR4S/hp5 kpFqXp+gXMXHApoDR6HCgG6zIu4A2Jlqn3Ancno3E+bkXsiSzT8wodjPEDD1JdfdhXbc BL9beV+dqGhmT4fC1xId54GBwDwPtew2QV4EKMYLiy+NfxdcXfQDTffzucZ4wew4Hph8 XqvVDq52a/O+ds4TbfaUt2ye6TzugE4iRStaoOTl7+pvmlfY6KZTl2gTuGA3r6ovZ7Fg FsqA==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772043802; x=1772648602; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/xa2NxgBV56+zcp+pDI4D3jQAyDOvWbrM47gZNUvrNM=; b=YUwJnVORBiebkiK94qllkkfj3T/ItETMXbmGt0Al4qUauV2c3sCnLhe5DjaQZ2JLDD 8npgdn/h6sSQ7kRiJJWEq1Dn64Ezg4WnF9P7gvdAkJzgfDKQ4d3g+qvi0KIURAvhwFu0 q4e1Erq5mmMFw2VuEqTRY4prw3NZryRelgD3MkBkTsOxkvVS/DCGOOvbfWzxPCXPe74O 9AVrTb/MYzG92OHUOwBzNqSvP8pkjxPKf2qnhEcpl8gPimuIjgwtRYuYSIOkPc5gG2HG k/Aw0Tp41x/hLiK+uqAQpe9zoMkzVcTknJ0CSS4nWxFmOOfEDJF36xhCgZl0Zl1y7sTA lnrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772043802; x=1772648602; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/xa2NxgBV56+zcp+pDI4D3jQAyDOvWbrM47gZNUvrNM=; b=DcP9IzT1bYbo0hrhSATNf/PlrA/zPuGYS8931uN2UP5qPRTouo0fJzyzh+pNX+HbR4 B0bSPawChAVGUISwoFQddjeISoVgqpUmEGhd2l0dkV+4nrzSQN+i/43LnSDxBkZoRG0L kEbvJkW42Oy/YU77/nUVxxRpNLRIrPTuqhC+gos6OAfGE37BwRoHQVSgo1XwilVYY+CQ 1R/zh/KNbQ79QNuhsZ+i0RHoH2ekjC3fYBoVZ+0NfbujkM3IMk70atU9Wx6gY9vQHAjZ 7rEPQrlYLvHc+lilkT0hPgSpkWYcPBjtrgRxIuttLfi0glj4CEIjx86imhm508wavzek f2mg== X-Forwarded-Encrypted: i=1; AJvYcCXMvMKDDTbpD3pfPSRwRrK9I15hWZouh1OqVM2WhyU2aciwPwsNcaDic/5kKqsVVSjy0l6rxAOoShay81s=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/FBB8ru22srYF6OqdaoGmiNdP96nLOj7IbUzrl8izfbosEHik zsKzlbS5HcWvxKIXsYV9u3fNU1WfD79FoJs0AmLbGRAqBWZT91SejsMO98cvE9OggKiRjKp1qSS rxSV8wJin9M3p9gwS/QZ0OgUAqT4GkQ== X-Gm-Gg: ATEYQzzauaPdXGH6L2Va6jfu8/Cdih6VbkWPn/lfeOCEBq1IG2+CiLn8GDmJRj3o5j2 UFCFD8l+YR5wuwfEs8seTompqn2Z0QdMscV2YD25I06yTDodB+JTdZQ9yuT9KOAiNy8mXcsICvh 7JKPBlSIQlFAZPZyuQv9UlafR+IB+uneENGGhEC1B/83voOaKjsJjI4lWiJdKkCuv8sNnDM6XV1 85ysuJFLNhwzHeK6CbRJAlkjr3GJ5YhRmPG3GZ36IJ4E8ScdAt/PlTIpGm36/QSnMC9zYpxs6P5 1DZSGw8= X-Received: by 2002:a05:7022:1605:b0:127:3214:c862 with SMTP id a92af1059eb24-127869c8215mr555717c88.40.1772043801261; Wed, 25 Feb 2026 10:23:21 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260223123232.12851-2-ravis.opensrc@gmail.com> <20260224014011.56624-1-sj@kernel.org> In-Reply-To: <20260224014011.56624-1-sj@kernel.org> From: Ravi Jonnalagadda Date: Wed, 25 Feb 2026 10:23:09 -0800 X-Gm-Features: AaiRm52SmZr4YLw7ydgp3VDu-h8ez3jJibjPYgTRa_tIkzg4tH3npe4ZI2HnusQ Message-ID: Subject: Re: [RFC PATCH v3 1/4] mm/damon/sysfs: set goal_tuner after scheme creation To: SeongJae Park Cc: damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, akpm@linux-foundation.org, corbet@lwn.net, bijan311@gmail.com, ajayjoshi@micron.com, honggyu.kim@sk.com, yunjeong.mun@sk.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 23, 2026 at 5:40=E2=80=AFPM SeongJae Park wrote= : > > On Mon, 23 Feb 2026 12:32:29 +0000 Ravi Jonnalagadda wrote: > > > damon_new_scheme() always sets quota.goal_tuner to CONSIST (the default= ) > > regardless of what was passed in the quota struct. This caused the sysf= s > > goal_tuner setting to be ignored. > > > > The comment in damon_new_scheme() says "quota.goals and .goal_tuner > > should be separately set by caller", but the sysfs code wasn't doing > > this. Add explicit assignment of goal_tuner after damon_new_scheme() > > returns to properly apply the user's setting. > > > > Without this fix, setting goal_tuner to "temporal" via sysfs has no > > effect - the scheme always uses the CONSIST (feed loop) tuner, causing > > overshoot when the goal is reached instead of immediate stop. > > Thank you for catching this, Ravi! So, this is a fix for the RFC patch s= eries > [1] that not yet merged, right? I think this fix is better to be carried= with > the series, and squashed into the broken commit to not introduce unnecess= ary > regression. > > So, if you don't mind, I will squash this into the sysfs-schemes part cha= nge on > my tree, with your Co-developed-by: tag. Yes. Please go ahead and squash it into your series. > > [1] https://lore.kernel.org/20260212062314.69961-1-sj@kernel.org > [2] https://lore.kernel.org/20260212062314.69961-4-sj@kernel.org > > > > > Signed-off-by: Ravi Jonnalagadda > > Reviewed-by: SeongJae Park > > > --- > > mm/damon/sysfs-schemes.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c > > index bbea908074bb..fe2e3b2db9e1 100644 > > --- a/mm/damon/sysfs-schemes.c > > +++ b/mm/damon/sysfs-schemes.c > > @@ -2809,6 +2809,9 @@ static struct damos *damon_sysfs_mk_scheme( > > if (!scheme) > > return NULL; > > > > + /* Set goal_tuner after damon_new_scheme() as it defaults to CONS= IST */ > > + scheme->quota.goal_tuner =3D sysfs_quotas->goal_tuner; > > + > > err =3D damos_sysfs_add_quota_score(sysfs_quotas->goals, &scheme-= >quota); > > if (err) { > > damon_destroy_scheme(scheme); > > To follow the order on the comment ("quota.goals and .goal_tuner should b= e > separately set by caller"), I'd prefer setting the goal_tuner after > damos_sysfs_add_quota_Score() call here, if you don't mind. Let me know = if you > prefer keeping the current order. If not, I will just make the change wh= en I > apply this to damon/next. > Agreed. Please make that change when you apply it. > > Thanks, > SJ > > [...]