linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: JaeJoon Jung <rgbi3307@gmail.com>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev,  linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [RFC PATCH v3 04/37] mm/damon/core: implement damon_report_page_fault()
Date: Sat, 13 Dec 2025 10:37:14 +0900	[thread overview]
Message-ID: <CAHOvCC6Bt-PcxhT=TJpukSyPyj-9e=dP--aQ8YR9JVKYJ913=w@mail.gmail.com> (raw)
In-Reply-To: <20251213005639.50513-1-sj@kernel.org>

On Sat, 13 Dec 2025 at 09:56, SeongJae Park <sj@kernel.org> wrote:
>
> On Sat, 13 Dec 2025 09:31:22 +0900 JaeJoon Jung <rgbi3307@gmail.com> wrote:
>
> > On Sat, 13 Dec 2025 at 07:47, SeongJae Park <sj@kernel.org> wrote:
> > >
> > > On Fri, 12 Dec 2025 21:46:03 +0900 JaeJoon Jung <rgbi3307@gmail.com> wrote:
> > >
> > > > On Mon, 8 Dec 2025 at 15:33, SeongJae Park <sj@kernel.org> wrote:
> > > > >
> > > > > Implement a DAMON core API for reporting page fault events to DAMON.  It
> > > > > is a wrapper of damon_report_access().
> > > > >
> > > > > This is a temporal hack.  In future versions that will have no RFC tag,
> > > > > only damon_report_access() may be used.
> > > >
> > > > It's a minor, but git am throws an error when applying the [RFC PATCH v3 04/37]
> > > > patch file.
> > >
> > > Interesting.  I can do 'git am' this patch without error on mm-new branch.  Are
> > > you using something other than mm-new as your baseline?
> > >
> > > > I am testing it by modifying it as follows.
> > > > damon_report_access() is
> > > > called by damon_report_page_fault(), so they depend on each other.
> > > >
> > > > #ifdef CONFIG_MMU
> > > > void damon_report_access(struct damon_access_report *report);
> > > > void damon_report_page_fault(struct vm_fault *vmf, bool huge_pmd);
> > > > #else
> > > > static inline void damon_report_access(struct damon_access_report *report)
> > > > {
> > > > }
> > > > static inline void damon_report_page_fault(struct vm_fault *vmf, bool huge_pmd)
> > > > {
> > > > }
> > > > #endif
> > >
> > > Seems this is not for fixing a 'git am' error but build error...?  Can you
> > > share what error exactly you are seeing?
> >
> > You have been deploying RFC PATCH v1, v2, and v3 starting from 2025-06-29.
> > I am currently working with the latest version v6.18.1 (as of 2025-12-13).
> >
> > $ head Makefile
> > # SPDX-License-Identifier: GPL-2.0
> > VERSION = 6
> > PATCHLEVEL = 18
> > SUBLEVEL = 1
> > EXTRAVERSION =
> > NAME = Baby Opossum Posse
> >
> > When applying RFC PATCH v1, v2, v3 with the above version, errors occur
> > in several places in 'git am' as follows.
> >
> > -------- [RFC PATCH v1] -------------------------------------------------
> >
> > $ git am '[RFC PATCH 1/6]'
> > Applying: mm/damon/core: introduce damon_report_access()
> >
> > $ git am '[RFC PATCH 2/6]'
> > Applying: mm/damon/core: add eliglble_report() ops callback
> >
> > $ git am '[RFC PATCH 3/6]'
> > Applying: mm/damon/core: check received access reports
> >
> > $ git am '[RFC PATCH 4/6]'
> > Applying: mm/damon/vaddr: impleement eligible_report() callback
> > error: patch failed: mm/damon/vaddr.c:610
> > error: mm/damon/vaddr.c: patch does not apply
> > Patch failed at 0001 mm/damon/vaddr: impleement eligible_report() callback
> > hint: Use 'git am --show-current-patch=diff' to see the failed patch
> > When you have resolved this problem, run "git am --continue".
> > If you prefer to skip this patch, run "git am --skip" instead.
> > To restore the original branch and stop patching, run "git am --abort".
> [...]
>
> Thank you for sharing these!  We are working on moving baseline, specifically
> mm-new in most cases.  And we keep under-development patches on damon/next
> tree.  Please refer to the document [1] for more details.
>
> And a later version of the patch series is for replacing the old version.  If
> you have no special reason to apply the old versions of the patches, I'd
> suggest to use only the latest version.  And if you have no special reasons to
> use only 6.18.1, I'd recommend to just play with the commits on damon/next
> tree that was used to generate the patch files.
>
> Nonetheless, if you have a strong reason to do work on only 6.18.1, please feel
> free to ask help if needed.
>
> > If I build the kernel with the above status, I get compilation errors
> > as follows.
> >
> > /home/arm64/projects/kernel/linux-stable/mm/damon/sysfs.c:758:25:
> > error: ‘DAMON_FILTER_TYPE_WRITE’ undeclared here (not in a function);
> > did you mean ‘DAMOS_FILTER_TYPE_TARGET’?
> >   758 |                 .type = DAMON_FILTER_TYPE_WRITE,
> >       |                         ^~~~~~~~~~~~~~~~~~~~~~~
> >       |                         DAMOS_FILTER_TYPE_TARGET
> [...]
>
> Makes sense.  Again, I'd recommend using mm-new as your baseline or play with
> the commits on damon/next, but if you need help, please feel free to reach out
> :)

Thank you for your detailed and kind reply.
I am glad to refer to damon/next and mm-new in the document [1] you provided.
I will continue to share the analysis with you.

>
> [1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
> [2]
>
> Thanks,
> SJ
>
> [...]


  reply	other threads:[~2025-12-13  1:37 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  6:29 [RFC PATCH v3 00/37] mm/damon: introduce per-CPUs/threads/write/read monitoring SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 01/37] mm/damon/core: implement damon_report_access() SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 02/37] mm/damon: define struct damon_sample_control SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 03/37] mm/damon/core: commit damon_sample_control SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 04/37] mm/damon/core: implement damon_report_page_fault() SeongJae Park
2025-12-12 12:46   ` JaeJoon Jung
2025-12-12 22:47     ` SeongJae Park
2025-12-13  0:31       ` JaeJoon Jung
2025-12-13  0:56         ` SeongJae Park
2025-12-13  1:37           ` JaeJoon Jung [this message]
2025-12-08  6:29 ` [RFC PATCH v3 05/37] mm/{mprotect,memory}: (no upstream-aimed hack) implement MM_CP_DAMON SeongJae Park
2025-12-08 11:19   ` David Hildenbrand (Red Hat)
2025-12-09  4:56     ` SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 06/37] mm/damon/paddr: support page fault access check primitive SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 07/37] mm/damon/core: apply access reports to high level snapshot SeongJae Park
2025-12-12 13:20   ` JaeJoon Jung
2025-12-12 23:11     ` SeongJae Park
2025-12-13  1:10       ` JaeJoon Jung
2025-12-13  3:21         ` SeongJae Park
2025-12-13  4:09           ` JaeJoon Jung
2025-12-13  5:53             ` SeongJae Park
2025-12-13  9:17               ` SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 08/37] mm/damon/sysfs: implement monitoring_attrs/sample/ dir SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 09/37] mm/damon/sysfs: implement sample/primitives/ dir SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 10/37] mm/damon/sysfs: connect primitives directory with core SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 11/37] Docs/mm/damon/design: document page fault sampling primitive SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 12/37] Docs/admin-guide/mm/damon/usage: document sample primitives dir SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 13/37] mm/damon: extend damon_access_report for origin CPU reporting SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 14/37] mm/damon/core: report access origin cpu of page faults SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 15/37] mm/damon: implement sample filter data structure for cpus-only monitoring SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 16/37] mm/damon/core: implement damon_sample_filter manipulations SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 17/37] mm/damon/core: commit damon_sample_filters SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 18/37] mm/damon/core: apply sample filter to access reports SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 19/37] mm/damon/sysfs: implement sample/filters/ directory SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 20/37] mm/damon/sysfs: implement sample filter directory SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 21/37] mm/damon/sysfs: implement type, matching, allow files under sample filter dir SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 22/37] mm/damon/sysfs: implement cpumask file " SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 23/37] mm/damon/sysfs: connect sample filters with core layer SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 24/37] Docs/mm/damon/design: document sample filters SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 25/37] Docs/admin-guide/mm/damon/usage: document sample filters dir SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 26/37] mm/damon: extend damon_access_report for access-origin thread info SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 27/37] mm/damon/core: report access-generated thread id of the fault event SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 28/37] mm/damon: extend damon_sample_filter for threads SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 29/37] mm/damon/core: support threads type sample filter SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 30/37] mm/damon/sysfs: support thread based access sample filtering SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 31/37] Docs/mm/damon/design: document threads type sample filter SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 32/37] Docs/admin-guide/mm/damon/usage: document tids_arr file SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 33/37] mm/damon: support reporting write access SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 34/37] mm/damon/core: report whether the page fault was for writing SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 35/37] mm/damon/core: support write access sample filter SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 36/37] mm/damon/sysfs: support write-type " SeongJae Park
2025-12-08  6:29 ` [RFC PATCH v3 37/37] Docs/mm/damon/design: document write access sample filter type SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHOvCC6Bt-PcxhT=TJpukSyPyj-9e=dP--aQ8YR9JVKYJ913=w@mail.gmail.com' \
    --to=rgbi3307@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox