linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: "Huang, Ying" <ying.huang@intel.com>,
	Xing Zhengjun <zhengjun.xing@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	 Shakeel Butt <shakeelb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	wfg@mail.ustc.edu.cn
Subject: Re: [RFC] mm/vmscan.c: avoid possible long latency caused by too_many_isolated()
Date: Tue, 27 Apr 2021 15:53:30 -0600	[thread overview]
Message-ID: <CAOUHufYa79naFrai3T5Tkd+TW4Lvk3PUzeeg68mhZ_1M7Pe2jQ@mail.gmail.com> (raw)
In-Reply-To: <87fszfxk89.fsf@yhuang6-desk1.ccr.corp.intel.com>

On Sat, Apr 24, 2021 at 6:48 PM Huang, Ying <ying.huang@intel.com> wrote:
>
> Yu Zhao <yuzhao@google.com> writes:
> [snip]
>
> > @@ -2966,13 +2938,20 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
> >                       /* need some check for avoid more shrink_zone() */
> >               }
> >
> > -             /* See comment about same check for global reclaim above */
> > -             if (zone->zone_pgdat == last_pgdat)
> > -                     continue;
> > -             last_pgdat = zone->zone_pgdat;
> >               shrink_node(zone->zone_pgdat, sc);
> >       }
> >
> > +     if (last_pgdat)
> > +             atomic_dec(&last_pgdat->nr_reclaimers);
> > +     else if (should_retry) {
> > +             /* wait a bit for the reclaimer. */
> > +             if (!schedule_timeout_killable(HZ / 10))
>
> Once we reached here, even accidentally, the caller needs to sleep at
> least 100ms.  How about use a semaphore for pgdat->nr_reclaimers?  Then
> the sleeper can be waken up when the resource is considered enough.

Yeah, that sounds good to me. I guess we will have to wait and see the
test result from Zhengjun.

Thanks.


  reply	other threads:[~2021-04-27 21:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  2:35 zhengjun.xing
2021-04-22  8:36 ` Xing Zhengjun
2021-04-22 10:23   ` Hillf Danton
2021-04-23  6:55     ` Xing Zhengjun
2021-04-30  5:33     ` Xing Zhengjun
2021-04-30  6:43       ` Hillf Danton
2021-05-10  8:03         ` Xing Zhengjun
2021-05-10  9:46           ` Hillf Danton
2021-04-22 17:13   ` Yu Zhao
2021-04-22 18:51     ` Shakeel Butt
2021-04-22 20:15       ` Yu Zhao
2021-04-22 20:17     ` Tim Chen
2021-04-22 20:30       ` Yu Zhao
2021-04-22 20:38         ` Tim Chen
2021-04-22 20:57           ` Yu Zhao
2021-04-22 21:02             ` Tim Chen
2021-04-23  6:57     ` Xing Zhengjun
2021-04-23 20:23       ` Yu Zhao
2021-04-25  0:48         ` Huang, Ying
2021-04-27 21:53           ` Yu Zhao [this message]
2021-04-30  5:57         ` Xing Zhengjun
2021-04-30  6:24           ` Yu Zhao
2021-04-28 11:55     ` Michal Hocko
2021-04-28 15:05       ` Yu Zhao
2021-04-29 10:00         ` Michal Hocko
2021-04-30  8:34           ` Yu Zhao
2021-04-30  9:17             ` Michal Hocko
2021-04-30 17:04               ` Yu Zhao

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=CAOUHufYa79naFrai3T5Tkd+TW4Lvk3PUzeeg68mhZ_1M7Pe2jQ@mail.gmail.com \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shakeelb@google.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=wfg@mail.ustc.edu.cn \
    --cc=ying.huang@intel.com \
    --cc=zhengjun.xing@linux.intel.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