From: Liang Li <liliang324@gmail.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>,
Alexander Duyck <alexander.h.duyck@linux.intel.com>,
Mel Gorman <mgorman@techsingularity.net>,
Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
David Hildenbrand <david@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Michal Hocko <mhocko@suse.com>,
Liang Li <liliangleo@didiglobal.com>,
linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org
Subject: Re: [RFC PATCH 1/3] mm: support hugetlb free page reporting
Date: Wed, 23 Dec 2020 11:42:12 +0800 [thread overview]
Message-ID: <CA+2MQi_ajOZge-_1S0pAt+o-beT6QQru9ogYBcwzAs+tWqrPcQ@mail.gmail.com> (raw)
In-Reply-To: <52a6cb93-1fed-dfd7-d21e-f14197a9c9dc@oracle.com>
> On 12/22/20 11:59 AM, Alexander Duyck wrote:
> > On Mon, Dec 21, 2020 at 11:47 PM Liang Li <liliang.opensource@gmail.com> wrote:
> >> +
> >> + if (huge_page_order(h) > MAX_ORDER)
> >> + budget = HUGEPAGE_REPORTING_CAPACITY;
> >> + else
> >> + budget = HUGEPAGE_REPORTING_CAPACITY * 32;
> >
> > Wouldn't huge_page_order always be more than MAX_ORDER? Seems like we
> > don't even really need budget since this should probably be pulling
> > out no more than one hugepage at a time.
>
> On standard x86_64 configs, 2MB huge pages are of order 9 < MAX_ORDER (11).
> What is important for hugetlb is the largest order that can be allocated
> from buddy. Anything bigger is considered a gigantic page and has to be
> allocated differently.
>
> If the code above is trying to distinguish between huge and gigantic pages,
> it is off by 1. The largest order that can be allocated from the buddy is
> (MAX_ORDER - 1). So, the check should be '>='.
>
> --
> Mike Kravetz
Yes, you're right! thanks
Liang
next prev parent reply other threads:[~2020-12-23 3:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 7:46 [RFC PATCH 1/3] mm: support hugetlb free page reporting Liang Li
2020-12-22 19:59 ` Alexander Duyck
2020-12-22 22:55 ` Mike Kravetz
2020-12-23 3:42 ` Liang Li [this message]
2020-12-23 3:38 ` Liang Li
2020-12-23 16:39 ` Alexander Duyck
2020-12-24 0:45 ` Liang Li
2020-12-22 22:30 ` Mike Kravetz
2020-12-23 3:57 ` Liang Li
2020-12-23 18:47 ` Mike Kravetz
2020-12-24 1:31 ` Liang Li
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=CA+2MQi_ajOZge-_1S0pAt+o-beT6QQru9ogYBcwzAs+tWqrPcQ@mail.gmail.com \
--to=liliang324@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=jasowang@redhat.com \
--cc=liliangleo@didiglobal.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).