From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>,
linux-mm@kvack.org, alex.williamson@redhat.com,
aarcange@redhat.com, rientjes@google.com,
mgorman@techsingularity.net, mhocko@suse.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: page_mapped: don't assume compound page is huge or THP
Date: Mon, 3 Dec 2018 14:28:49 +0300 [thread overview]
Message-ID: <20181203112849.jonqywnd4rx2wpe7@kshutemo-mobl1> (raw)
In-Reply-To: <35a664c0-6dab-bb32-811e-65250200d195@redhat.com>
On Mon, Dec 03, 2018 at 11:23:58AM +0100, Laszlo Ersek wrote:
> Totally uninformed side-question:
>
> how large can the return value of compound_order() be? MAX_ORDER?
>
> Apparently, MAX_ORDER can be defined as CONFIG_FORCE_MAX_ZONEORDER.
>
> "config FORCE_MAX_ZONEORDER" is listed in a number of Kconfig files.
> Among those, "arch/mips/Kconfig" permits "ranges" (?) that extend up to
> 64. Same applies to "arch/powerpc/Kconfig" and "arch/sh/mm/Kconfig".
>
> If we left-shift "1" -- a signed int, which I assume in practice will
> always have two's complement representation, 1 sign bit, 31 value bits,
> and 0 padding bits --, by 31 or more bit positions, we get undefined
> behavior (as part of the left-shift operation).
>
> Is this a practical concern?
Not really.
Assuming 4k PAGE_SIZE, compound_order() == 31 means 8 TiB pages. I doubt
we will see such allocation requests any time soon.
Even with 1k base page size, it's still 2 TiB.
We will see other limitations in page allocaiton path before the compund
order type will be an issue.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2018-12-03 11:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 21:53 [PATCH] " Jan Stancek
2018-11-30 10:19 ` Kirill A. Shutemov
2018-11-30 12:06 ` [PATCH v2] " Jan Stancek
2018-11-30 12:18 ` Michal Hocko
2018-11-30 12:36 ` Kirill A. Shutemov
2018-11-30 12:45 ` Michal Hocko
2018-11-30 12:55 ` Kirill A. Shutemov
2018-11-30 15:53 ` David Hildenbrand
2018-12-03 10:23 ` Laszlo Ersek
2018-12-03 11:28 ` Kirill A. Shutemov [this message]
2019-01-04 21:56 ` Andrea Arcangeli
2019-02-04 14:38 ` Lars Persson
2019-02-05 7:14 ` Jan Stancek
2019-02-18 13:43 ` Lars Persson
2019-02-18 13:50 ` Michal Hocko
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=20181203112849.jonqywnd4rx2wpe7@kshutemo-mobl1 \
--to=kirill@shutemov.name \
--cc=aarcange@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jstancek@redhat.com \
--cc=lersek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=rientjes@google.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