From: Hushijie <hushijie3@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Nixiaoming <nixiaoming@huawei.com>,
"wangxu (AE)" <wangxu72@huawei.com>,
"Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@huawei.com>,
yangerkun <yangerkun@huawei.com>,
"Wangle (RTOS FAE)" <wangle6@huawei.com>,
"Chengang (L)" <cg.chen@huawei.com>
Subject: Re [PATCH] [RFC]hugetlbfs: Get unmapped area below TASK_UNMAPPED_BASE for hugetlbfs
Date: Tue, 28 Apr 2020 11:49:32 +0000 [thread overview]
Message-ID: <2f7fcfd8d66d4df7ac0c972fd9c3abc1@huawei.com> (raw)
On 4/28/20 6:46 AM, Mike Kravetz wrote:
>Just curious. Have you actually seeing a problem with this code, or is
>the reason for the proposed change just the result of code inspection? I ask
>because many architectures have their own version of hugetlb_get_unmapped_area.
>So, if you are seeing this issue it would be interesting to know what
>architecture you are running.
Thanks for your reply.
We actually found this problem on arm64 architecture, running a 32-bit
program. When the address space below TASK_UNMAPPED_BASE is completely
exhausted, shmat() for huge pages will return ENOMEM, but shmat() for
normal pages can still success.
>The routine hugetlb_get_unmapped_area has not changed much since this first
>git version. I suspect this is because it is mostly unused.
>
>I noticed that hugetlb_get_unmapped_area is one of only a few places in arch
>independent code calling vm_unmapped_area(). The other callers are arch
>independent fall back routines for arch_get_unmapped_area* routines. If we
>move forward with changes to this routine, would it make more sense to use
>the arch_get_unmapped_area* routines instead of calling vm_unmapped_area
>directly? This would take advantage of any arch specific if it exists.
I totally agree with you.
It is more appropriate to implementing hugetlb_get_unmapped_area() for a
specific architecture, instead of chaging common hugetlb_get_unmapped_area()
interface at "fs/hugetlbfs/inode.c".
I will submit another patch just for specific architectures (arm64) later.
Thanks for your reply and advise.
reply other threads:[~2020-04-28 11:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2f7fcfd8d66d4df7ac0c972fd9c3abc1@huawei.com \
--to=hushijie3@huawei.com \
--cc=cg.chen@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=nixiaoming@huawei.com \
--cc=wangkefeng.wang@huawei.com \
--cc=wangle6@huawei.com \
--cc=wangxu72@huawei.com \
--cc=yangerkun@huawei.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