LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	David Hildenbrand <david@redhat.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Zi Yan <ziy@nvidia.com>, Matthew Wilcox <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm: thp: update split_queue_len correctly
Date: Wed, 24 Nov 2021 13:17:07 -0800	[thread overview]
Message-ID: <CAHbLzkqmTks5dGn=yCykKSwqtmsCKVqLx_bU9D1=fTvEgX06xw@mail.gmail.com> (raw)
In-Reply-To: <CALvZod6zUsCajhYcQOod+Nf0Y34x_sS1nnc7zAXUwZX0w3jzTw@mail.gmail.com>

On Wed, Nov 24, 2021 at 12:44 PM Shakeel Butt <shakeelb@google.com> wrote:
>
> On Wed, Nov 24, 2021 at 12:12 PM Kirill A. Shutemov
> <kirill@shutemov.name> wrote:
> >
> > On Tue, Nov 23, 2021 at 11:09:16AM -0800, Shakeel Butt wrote:
> > > The deferred THPs are split on memory pressure through shrinker
> > > callback and splitting of THP during reclaim can fail for several
> > > reasons like unable to lock the THP, under writeback or unexpected
> > > number of pins on the THP. Such pages are put back on the deferred split
> > > list for consideration later. However kernel does not update the
> > > deferred queue size on putting back the pages whose split was failed.
> > > This patch fixes that.
> >
> > Hm. No. split_huge_page_to_list() updates the queue size on split success.
> >
>
> Right. This is really convoluted. split_huge_page_to_list() is just
> assuming that if the given page is on a deferred list then it must be
> on the list returned by get_deferred_split_queue(page). The
> interaction of move_charge and deferred split seems broken.

Because memcg code doesn't move charge for PTE mapped THP at all. See
the below comment from mem_cgroup_move_charge_pte_range():

"We can have a part of the split pmd here. Moving it can be done but
it would be too convoluted so simply ignore such a partial THP and
keep it in original memcg. There should be somebody mapping the head."

BTW, did you run into any problem related to this?

>
> Andrew, can you please drop this patch?

  reply	other threads:[~2021-11-24 21:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 19:09 Shakeel Butt
2021-11-23 20:00 ` Yang Shi
2021-11-24 20:12 ` Kirill A. Shutemov
2021-11-24 20:44   ` Shakeel Butt
2021-11-24 21:17     ` Yang Shi [this message]
2021-11-24 21:19       ` Shakeel Butt

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='CAHbLzkqmTks5dGn=yCykKSwqtmsCKVqLx_bU9D1=fTvEgX06xw@mail.gmail.com' \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shakeelb@google.com \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    --subject='Re: [PATCH v2] mm: thp: update split_queue_len correctly' \
    /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

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).