From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org,
Norbert Manthey <nmanthey@conp-solutions.com>,
Guillaume Morin <guillaume@morinfr.org>,
Siddhesh Poyarekar <siddhesh@sourceware.org>
Subject: Re: [PATCH v2 0/4] malloc: Improve Huge Page support
Date: Thu, 19 Aug 2021 14:27:00 -0300 [thread overview]
Message-ID: <2846325b-6903-2afc-0cd9-b38f00c1084a@linaro.org> (raw)
In-Reply-To: <20210819171703.GA10768@bender.morinfr.org>
On 19/08/2021 14:17, Guillaume Morin wrote:
> On 19 Aug 13:55, Adhemerval Zanella wrote:
>> On 19/08/2021 13:42, Guillaume Morin wrote:
>>> Are you planning on tackling using the same tunables to allocate
>>> additional heaps (in arena.c)?
>>>
>>> It's a little more subtle because of the calls to mprotect() which needs
>>> to be properly aligned for hugetlbfs, and probably for THP as well (to
>>> avoid un-necessary page splitting).
>>
>> What do you mean by additional heaps in this case?
>
> I mean what is done in new_heap() in arena.c.
Good catch, I haven't take in consideration the new_heap() code. I think
we should the same tunable to drive the hguepage usage in this case as
well.
>
>>> One additional thing to address is the case where mmap() fails with
>>> MAP_HUGETLB because HP allocation fails. Reverting to the default pages
>>> will match what libhugetlbfs does (i.e just call mmap() again without
>>> MAP_HUGETLB). But I see that Siddhesh and you have already been
>>> discussing this case.
>>
>> This is what I did in my patch, it follow the current default allocation
>> path.
>
> Yes, you are right. I misread. You've been discussing adding a tunable
> to decide if that should fail or not. My 2 cents as a user: it's hard
> for me to imagine that users would like malloc() to fail in this case.
> Even if the admin allows surplus pages (i.e create new HPs on the fly),
> this is far from guaranteed to succeed.
>
> Guillaume.
>
prev parent reply other threads:[~2021-08-19 17:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 14:19 Adhemerval Zanella
2021-08-18 14:19 ` [PATCH v2 1/4] malloc: Add madvise support for Transparent Huge Pages Adhemerval Zanella
2021-08-18 18:42 ` Siddhesh Poyarekar
2021-08-19 12:00 ` Adhemerval Zanella
2021-08-19 12:22 ` Siddhesh Poyarekar
2021-08-18 14:19 ` [PATCH v2 2/4] malloc: Add THP/madvise support for sbrk Adhemerval Zanella
2021-08-18 14:19 ` [PATCH v2 3/4] malloc: Move mmap logic to its own function Adhemerval Zanella
2021-08-19 0:47 ` Siddhesh Poyarekar
2021-08-18 14:20 ` [PATCH v2 4/4] malloc: Add Huge Page support for sysmalloc Adhemerval Zanella
2021-08-19 1:03 ` Siddhesh Poyarekar
2021-08-19 12:08 ` Adhemerval Zanella
2021-08-19 17:58 ` Matheus Castanho
2021-08-19 18:50 ` Adhemerval Zanella
2021-08-20 12:34 ` Matheus Castanho
2021-08-18 18:11 ` [PATCH v2 0/4] malloc: Improve Huge Page support Siddhesh Poyarekar
2021-08-19 11:26 ` Adhemerval Zanella
2021-08-19 11:48 ` Siddhesh Poyarekar
2021-08-19 12:04 ` Adhemerval Zanella
2021-08-19 12:26 ` Siddhesh Poyarekar
2021-08-19 12:42 ` Adhemerval Zanella
2021-08-19 16:42 ` Guillaume Morin
2021-08-19 16:55 ` Adhemerval Zanella
2021-08-19 17:17 ` Guillaume Morin
2021-08-19 17:27 ` Adhemerval Zanella [this message]
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=2846325b-6903-2afc-0cd9-b38f00c1084a@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=guillaume@morinfr.org \
--cc=libc-alpha@sourceware.org \
--cc=nmanthey@conp-solutions.com \
--cc=siddhesh@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).