linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on the five-level page table support patches
@ 2017-04-23 10:53 John Paul Adrian Glaubitz
  2017-04-24  5:11 ` Andy Lutomirski
  2017-04-24 16:19 ` Kirill A. Shutemov
  0 siblings, 2 replies; 9+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-04-23 10:53 UTC (permalink / raw)
  To: Kirill A. Shutemov, linux-kernel
  Cc: Andi Kleen, Dave Hansen, Andy Lutomirski, Michal Hocko,
	linux-arch, linux-mm

Hi Kirill!

I recently read the LWN article on your and your colleagues work to
add five-level page table support for x86 to the Linux kernel [1]
and I got your email address from the last patch of the series.

Since this extends the address space beyond 48-bits, as you may know,
it will cause potential headaches with Javascript engines which use
tagged pointers. On SPARC, the virtual address space already extends
to 52 bits and we are running into these very issues with Javascript
engines on SPARC.

Now, a possible way to mitigate this problem would be to pass the
"hint" parameter to mmap() in order to tell the kernel not to allocate
memory beyond the 48 bits address space. Unfortunately, on Linux this
will only work when the area pointed to by "hint" is unallocated which
means one cannot simply use a hardcoded "hint" to mitigate this problem.

However, since this trick still works on NetBSD and used to work on
Linux [3], I was wondering whether there are plans to bring back
this behavior to mmap() in Linux.

Currently, people are using ugly work-arounds [4] to address this
problem which involve a manual iteration over memory blocks and
basically implementing another allocator in the user space
application.

Thanks,
Adrian

> [1] https://lwn.net/Articles/717293/
> [2] https://lwn.net/Articles/717300/
> [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824449#22
> [4] https://hg.mozilla.org/mozilla-central/rev/dfaafbaaa291

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-04-25  7:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23 10:53 Question on the five-level page table support patches John Paul Adrian Glaubitz
2017-04-24  5:11 ` Andy Lutomirski
2017-04-24 13:03   ` Andi Kleen
2017-04-24 20:33     ` John Paul Adrian Glaubitz
2017-04-24 16:19 ` Kirill A. Shutemov
2017-04-24 20:37   ` John Paul Adrian Glaubitz
2017-04-24 22:01     ` Kirill A. Shutemov
2017-04-24 22:09     ` David Miller
2017-04-25  7:25       ` Jon Masters

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).