linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jaewon Kim <jaewon31.kim@samsung.com>
To: undisclosed-recipients:;
Subject: RE: [PATCH] vmscan: add a vmscan event for reclaim_pages
Date: Thu, 10 Oct 2024 08:53:52 +0900	[thread overview]
Message-ID: <20241009235352epcms1p681f02f15b1278e8cd5364a211de0d68b@epcms1p6> (raw)
In-Reply-To: <20241009134900.7cd8fe9000a9fafd7ca1c592@linux-foundation.org>

>
>> The reclaim_folio_list uses a dummy reclaim_stat and is not being
>> used. To know the memory stat, add a new trace event. This is useful how
>> how many pages are not reclaimed or why.
>> 
>> This is an example.
>> mm_vmscan_reclaim_pages: nr_scanned=17 nr_reclaimed=17 nr_dirty=0 nr_writeback=0 nr_congested=0 nr_immediate=0 nr_activate_anon=0 nr_activate_file=0 nr_ref_keep=0 nr_unmap_fail=0
>> 
>> Currenlty reclaim_folio_list is only called by reclaim_pages, and
>> reclaim_pages is used by damon and madvise. In the latest Android,
>> reclaim_pages is also used by shmem to reclaim all pages in a
>> address_space.
>> 
>
>This looks like it will add some overhead when tracing has been
>enabled.  Has this been measured and is it significant?

Hi
Thank you for your comment.

Regarding the overhead, I think the new function reclaim_stat_add seems to
make us feel overhead. I wanted to sum and print it once but I think I can
remove the sum, and put the new trace_mm_vmscan_reclaim_pages into
reclaim_folio_list to show stat for each node.

>
>Also, we're adding a significant amount of code for a simple trace
>record.  Do others think this is justifiable?

The mm_vmscan_reclaim_pages I added is similar to the mm_vmscan_lru_shrink_inactive.
If allowed, I think we can use DEFINE_EVENT for both trace events.

Let me think more.

Jaewon Kim


  parent reply	other threads:[~2024-10-09 23:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20241009093133epcas1p39b770ebcc6d2d78cad2f9a522bc6f179@epcas1p3.samsung.com>
2024-10-09  9:31 ` Jaewon Kim
2024-10-09 20:49   ` Andrew Morton
     [not found]   ` <CGME20241009093133epcas1p39b770ebcc6d2d78cad2f9a522bc6f179@epcms1p6>
2024-10-09 23:53     ` Jaewon Kim [this message]
2024-10-11  8:25     ` Jaewon Kim
2024-10-11  8:55       ` Vlastimil Babka
     [not found]       ` <CGME20241009093133epcas1p39b770ebcc6d2d78cad2f9a522bc6f179@epcms1p4>
2024-10-11 11:39         ` Jaewon Kim
2024-10-10  8:28   ` Vlastimil Babka
     [not found]   ` <CGME20241009093133epcas1p39b770ebcc6d2d78cad2f9a522bc6f179@epcms1p1>
2024-10-11  8:22     ` 김재원

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=20241009235352epcms1p681f02f15b1278e8cd5364a211de0d68b@epcms1p6 \
    --to=jaewon31.kim@samsung.com \
    /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