linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: 李培锋 <lipeifeng@oppo.com>
Cc: akpm@linux-foundation.org, david@redhat.com, osalvador@suse.de,
	 willy@infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  tkjos@google.com,
	surenb@google.com, gregkh@google.com, v-songbaohua@oppo.com
Subject: Re: [PATCH 1/2] mm/rmap: support folio_referenced to control if try_lock in rmap_walk
Date: Tue, 20 Feb 2024 20:16:08 +1300	[thread overview]
Message-ID: <CAGsJ_4zrctJbGZ6EwTJh5PadG_1Vk09Djw8Vd+hzvorq_DMfig@mail.gmail.com> (raw)
In-Reply-To: <8ea640a1-fc2c-a6fa-cf4b-bb8c0b694b4f@oppo.com>

On Tue, Feb 20, 2024 at 5:00 PM 李培锋 <lipeifeng@oppo.com> wrote:
>
>
> 在 2024/2/20 11:01, Barry Song 写道:
> > Hi peifeng,
> >
> > On Tue, Feb 20, 2024 at 2:43 PM 李培锋 <lipeifeng@oppo.com> wrote:
> >> add more experts from Linux and Google.
> >>
> >>
> >> 在 2024/2/19 22:17, lipeifeng@oppo.com 写道:
> >>> From: lipeifeng <lipeifeng@oppo.com>
> >>>
> >>> The patch to support folio_referenced to control the bevavior
> >>> of walk_rmap, which for some thread to hold the lock in rmap_walk
> >>> instead of try_lock when using folio_referenced.
> > please describe what problem the patch is trying to address,
> > and why this modification is needed in commit message.
>
> Hi Barry:
>
> 1. the patch is one of the kshrinkd series patches.

this seems like a bad name for the patchset as nobody knows
what is kshrinkd. maybe something like "asynchronously
reclaim contended folios rather than aging them"?

>
> 2. it is to support folio_referenced to control the bevavior of walk_rmap,
>
> kshrinkd would call folio_referenced through shrink_folio_list but it
> doesn't
>
> want to try_lock in rmap_walk during folio_referenced.
>
>
> > btw, who is set rw_try_lock to 0, what is the benefit?
>
> Actually, the current situation is that only shrink_folio_list will set
> try_lock to 1,

understood, as you don't want contended folios to be skipped
by scanner any more.

>
> while others will be set to 0 that it would wait for rwsem-lock if
> contened in rmap_walk.

ok. other reclamation threads will still skip contended folios.

As discussed, the patchset really needs detailed data to back up.

Thanks
Barry


  reply	other threads:[~2024-02-20  7:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 14:17 [PATCH 0/2] Support kshrinkd lipeifeng
2024-02-19 14:17 ` [PATCH 2/2] mm: support kshrinkd lipeifeng
2024-02-20  2:11   ` 李培锋
2024-02-20  3:19     ` Barry Song
2024-02-19 16:51 ` [PATCH 0/2] Support kshrinkd Matthew Wilcox
2024-02-20  2:04   ` 李培锋
2024-02-20  2:55     ` Matthew Wilcox
2024-02-20  4:14       ` 李培锋
     [not found] ` <20240219141703.3851-2-lipeifeng@oppo.com>
2024-02-20  1:42   ` [PATCH 1/2] mm/rmap: support folio_referenced to control if try_lock in rmap_walk 李培锋
2024-02-20  3:01     ` Barry Song
2024-02-20  4:00       ` 李培锋
2024-02-20  7:16         ` Barry Song [this message]
2024-02-20  2:09 ` [PATCH 0/2] Support kshrinkd 李培锋

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=CAGsJ_4zrctJbGZ6EwTJh5PadG_1Vk09Djw8Vd+hzvorq_DMfig@mail.gmail.com \
    --to=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=gregkh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lipeifeng@oppo.com \
    --cc=osalvador@suse.de \
    --cc=surenb@google.com \
    --cc=tkjos@google.com \
    --cc=v-songbaohua@oppo.com \
    --cc=willy@infradead.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