Re: [rvm-research] [PATCH] enlarge org.mmtk.utility.heap.layout.Mmapper()'s second

Lingyu Zhu <[email protected]> Fri, 15 Dec 2017 18:03:45 +0800
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CACFGcbaVr6YsrU_QpTUpQaqSHYtrrtp6K7nMvdijZJfPzQ-DVQ@mail.gmail.com>
I single-stepped org.mmtk.harness.Main. When I stepped into
Plan.processOptions(), I mannually enabled Options.eagermmapSpaces, and
finally I ran into Space.eagerlyMmapMMTkContiguousSpaces().
In 64-bit VM, all spaces' extends are 2^41 pages, in which case it will
lead to overflow.

Also, Conversions.bytesToPagesUP(space.extent)) is correct.

On Fri, Dec 15, 2017 at 2:32 AM, Erik Brangs <[email protected]> wrote:

> Hi,
>
> On 06.12.2017 03:50, Lingyu Zhu wrote:
> > This method's second parameter 'pages' is of type int, which can not fit
> 64-bit VM.
>
> but it counts memory pages, which are usually >= 2^12 bytes. I suppose you
> could use more than 2^32 pages but do you actually have an approach for
> testing this?
>
> > diff --git a/MMTk/src/org/mmtk/policy/Space.java
> b/MMTk/src/org/mmtk/policy/Space.java
> > index cddf3a8..c9bca2c 100644
> > --- a/MMTk/src/org/mmtk/policy/Space.java
> > +++ b/MMTk/src/org/mmtk/policy/Space.java
> > @@ -653,7 +653,7 @@ public abstract class Space {
> >            Log.write("->");
> >            Log.writeln(space.start.plus(space.extent.minus(1)));
> >          }
> > -        HeapLayout.mmapper.ensureMapped(space.start,
> space.extent.toInt() >> LOG_BYTES_IN_PAGE);
> > +        HeapLayout.mmapper.ensureMapped(space.start,
> space.extent.toLong() >> LOG_BYTES_IN_PAGE);
>
> This line is in fact incorrect. I suppose it ought to be
>
> HeapLayout.mmapper.ensureMapped(space.start, Conversions.bytesToPagesUp(
> space.extent));
>
>
> Speaking of pages, a problem with pages that MMTk really does have is that
> it assumes a fixed page size at compile time. Page size is only known at
> runtime. Unfortunately, that's not easy to fix (see
> https://xtenlang.atlassian.net/browse/RVM-816 ).
>
>
> Kind regards,
>
> Erik Brangs
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers