NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/59897: NetBSD virtual memory subsystem should support larger page sizes



The following reply was made to PR kern/59897; it has been noted by GNATS.

From: Sad Clouds <cryintothebluesky%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost
Subject: Re: kern/59897: NetBSD virtual memory subsystem should support
 larger page sizes
Date: Thu, 8 Jan 2026 14:32:18 +0000

 The time difference I recorded previously looked too good to be true.
 It may have been a runtime FreeBSD kernel quirk, after I rebooted the
 system and repeated the same test I got more reasonable metrics.
 
 On amd64 FreeBSD-15 going from 4 KiB to 2 MiB pages results in around
 2.7X speed up.
 
 On sparc Solaris-11 going from 8 KiB to 4 MiB pages results in around
 3.3X speed up.
 
 So I think it is reasonable to expect NetBSD to get around 3X speed up
 with larger page sizes. I'm not sure how much effort it would be to
 make the required changes, but it would be good to look into
 implementing Solaris getpagesizes() function and may be some form of
 static preallocation for a pool of large pages to be requested via
 mmap()?
 
 In the future it may be worth implementing dynamic transparent pages.
 Solaris seems to do this by default and according to "pmap -sx" it
 tends to use 4 MiB pages on sparc. This feature is much more relevant
 now with modern hardware supporting GBs and TBs of memory.
 


Home | Main Index | Thread Index | Old Index