linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>, Ke Wang <ke.wang@unisoc.com>
Subject: Re: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail
Date: Tue, 20 Sep 2022 09:45:55 +0100	[thread overview]
Message-ID: <20220920084555.rzphzayirdbtht2w@techsingularity.net> (raw)
In-Reply-To: <CAGWkznFEBDwDVeR1AH6gk30PHU3pvSHBusOSQgEB2L7mZD4Mxg@mail.gmail.com>

On Tue, Sep 20, 2022 at 09:45:35AM +0800, Zhaoyang Huang wrote:
> On Mon, Sep 19, 2022 at 6:22 PM Mel Gorman <mgorman@techsingularity.net> wrote:
> >
> > On Fri, Sep 16, 2022 at 06:58:12PM +0800, zhaoyang.huang wrote:
> > > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> > >
> > > Check the global free list again even if rmqueue_bulk failed for pcp pages when
> > > there is ongoing reclaiming, which could eliminate potential direct reclaim by
> > > chance.
> > >
> > > Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> >
> > Patch does not apply and may be based on a custom kernel that introduced
> > a problem. There is no description of what problem this is trying to
> > fix. Checking the status of reclaim for a specific zone in this path would
> > be a little unexpected.  If allocation pressure is exceeding the ability
> > of reclaim to make progress then the caller likely needs to take action
> > like direct reclaim. If the allocation failure is due to a high-order
> > failure then it may need to enter direct compaction etc.
>
> Agree with the above comment. This is a proposal aiming at avoiding
> direct reclaiming things with minimum cost, that is to say, about 5
> CPU instructions in return with the overhead of function calls which
> has both of several loops inside and potential throttle sleep by IO
> congestion etc.

If the refill fails and kswapd is failing to keep up then actions like
direct reclaim or compaction are inevitable. At best, this patch would
race to allocate pages in one context that are being freed in parallel by
another context.

Nak.

-- 
Mel Gorman
SUSE Labs


  reply	other threads:[~2022-09-20  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 10:58 [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail zhaoyang.huang
2022-09-19 10:16 ` Mel Gorman
2022-09-20  1:45   ` Zhaoyang Huang
2022-09-20  8:45     ` Mel Gorman [this message]
2022-09-20  8:48       ` Zhaoyang Huang

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=20220920084555.rzphzayirdbtht2w@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=huangzhaoyang@gmail.com \
    --cc=ke.wang@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=zhaoyang.huang@unisoc.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;
as well as URLs for NNTP newsgroup(s).