linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alex Ghiti <alex@ghiti.fr>
To: Palmer Dabbelt <palmer@sifive.com>, mike.kravetz@oracle.com
Cc: mingo@kernel.org, aou@eecs.berkeley.edu, catalin.marinas@arm.com,
	ndesaulniers@google.com, aghiti@upmem.com, atish.patra@wdc.com,
	linux-riscv@lists.infradead.org, akpm@linux-foundation.org
Subject: Re: [PATCH 0/3] Hugetlbfs support for riscv
Date: Thu, 10 Jan 2019 07:33:38 +0000	[thread overview]
Message-ID: <e553f2a6-a487-e205-2e10-edad4618c3ec@ghiti.fr> (raw)
In-Reply-To: <mhng-fc16a975-cefa-45b3-b3d0-2d763cdd9614@palmer-si-x1c4>


On 1/9/19 10:15 PM, Palmer Dabbelt wrote:
> On Wed, 09 Jan 2019 11:23:22 PST (-0800), mike.kravetz@oracle.com wrote:
>> On 12/9/18 10:21 PM, Alexandre Ghiti wrote:
>>> This series introduces hugetlbfs support for both riscv 32/64. Riscv32
>>> is architecturally limited to huge pages of size 4MB whereas riscv64 
>>> has
>>> 2MB/1G huge pages support. Transparent huge page support is not
>>> implemented here, I will submit another series later.
>>
>> Thanks for doing this.
>>
>> Since patches only touch riscv specific code, I did not look too closely
>> and do not feel qualified to offer an opinion as to whether they are 
>> correct
>> for the architecture.o
>
> Sorry about that.  These appear to have missed by inbox somehow. I 
> think they did manage to get caught by patchwork
>
>    https://patchwork.kernel.org/cover/10720635/
>
> I'll take a look...
>

No problem Palmer :)

Thanks,


>> With that said, the patches do look reasonable with a few comments 
>> below.
>>
>>> CMA or (MEMORY_ISOLATION && COMPACTION) must be enabled so that boot
>>> reserved gigantic pages can be freed: indeed, one can reduce the number
>>> of huge pages by calling free_gigantic_pages which in turn calls
>>> free_contig_range, defined only with those configs defined.
>>> However I don't see any strong dependency between free_contig_range
>>> and those configs, maybe we could allow hugetlbfs users to free boot
>>> reserved hugepages without those configs activated, I will propose
>>> something if Mike Kravetz agrees.
>>
>> Yes, that should be modified.  I think it would be a simple matter of 
>> moving
>> free_contig_range out of that ifdef block.  If you would like, I can 
>> submit
>> a patch for that.
>>
>> Somewhat related, I do not think your patches enable dynamic 
>> allocation of
>> gigantic pages.  Not sure if that was an oversight or conscious 
>> decision.
>> I am not sure this is a highly used feature, but if you can do it on 
>> riscv
>> then why not?
>>
>> Another 'missing feature' in your patches is PMD sharing.  This 
>> feature if
>> only of value for BIG shared hugetlbfs mappings.  DB folks like it.  As
>> mentioned above, I do not know much about riscv so I do not know if this
>> might be of use to potential users.
>>
>>> - libhugetlbfs testsuite on riscv64/1G:
>>>   - brk_near_huge triggers an assert in malloc.c, does not on x86.
>>>   - mmap-gettest, mmap-cow: testsuite passes the number of default free
>>>     pages as parameters and then fails for 1G which is not the default.
>>>     Otherwise succeeds when given the right number of pages.
>>>   - map_high_truncate_2 fails on x86 too: 0x60000000 is not 1G aligned
>>>     and fails at line 694 of fs/hugetlbfs/inode.c.
>>>   - heapshrink on 1G fails on x86 too, not investigated.
>>>   - counters.sh on 1G fails on x86 too: alloc_surplus_huge_page returns
>>>     NULL in case of gigantic pages.
>>>   - icache-hygiene succeeds after patch #3 of this series which lowers
>>>     the base address of mmap.
>>>   - fallocate_stress.sh on 1G never ends, on x86 too, not investigated.
>>
>> In general, libhugetlbfs tests seem to have issues with anything besides
>> default huge page size.  You encountered that and noted that tests break
>> for 1G pages on x86 as well.  Cleaning all that up has been on my 
>> todo list
>> for years, but there always seems to be something of higher priority. :(
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-01-10  7:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  6:21 [PATCH 0/3] Hugetlbfs support for riscv Alexandre Ghiti
2018-12-10  6:21 ` [PATCH 1/3] riscv: Introduce huge page support for 32/64bit kernel Alexandre Ghiti
2019-01-11  6:18   ` Paul Walmsley
2019-01-11 13:58     ` Alexandre Ghiti
2019-01-15 16:11   ` Christoph Hellwig
2019-01-15 18:52     ` Alex Ghiti
2018-12-10  6:21 ` [PATCH 2/3] riscv: Fix wrong comment about task size for riscv64 Alexandre Ghiti
2019-01-15 15:58   ` Christoph Hellwig
2019-01-15 18:53     ` Alex Ghiti
2019-02-07 12:52       ` Alexandre Ghiti
2018-12-10  6:21 ` [PATCH 3/3] riscv: Adjust mmap base address at a third of task size Alexandre Ghiti
2019-01-15 16:02   ` Christoph Hellwig
2019-01-15 18:54     ` Alex Ghiti
2019-01-25 19:02       ` Palmer Dabbelt
2019-01-26  9:23         ` Alex Ghiti
2019-01-27 16:57           ` Alex Ghiti
2019-01-28 11:17             ` Alexandre Ghiti
2019-01-07 17:57 ` [PATCH 0/3] Hugetlbfs support for riscv Alex Ghiti
2019-01-07 21:52   ` Paul Walmsley
2019-01-08  9:26     ` Alexandre Ghiti
2019-01-09 18:26   ` Palmer Dabbelt
2019-01-09 19:23 ` Mike Kravetz
2019-01-09 22:15   ` Palmer Dabbelt
2019-01-10  7:33     ` Alex Ghiti [this message]
2019-01-10  8:09   ` Alex Ghiti
2019-01-10 18:28     ` Mike Kravetz
2019-01-12  1:09       ` Alex Ghiti
2019-01-15 16:04   ` Christoph Hellwig
2019-01-15 18:56     ` Alex Ghiti
2019-01-15 19:25     ` Mike Kravetz
2019-01-15 20:52       ` Christoph Hellwig
2019-01-16 13:18         ` Alexandre Ghiti

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=e553f2a6-a487-e205-2e10-edad4618c3ec@ghiti.fr \
    --to=alex@ghiti.fr \
    --cc=aghiti@upmem.com \
    --cc=akpm@linux-foundation.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@wdc.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mike.kravetz@oracle.com \
    --cc=mingo@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=palmer@sifive.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;
as well as URLs for NNTP newsgroup(s).