Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2009 13:17:11 -0800
From:      Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
To:        freebsd-hackers@freebsd.org
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, Alan Cox <alc@cs.rice.edu>
Subject:   Re: large pages (amd64)
Message-ID:  <200906291317.12040.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>
In-Reply-To: <4A47FFBD.3070900@cs.rice.edu>
References:  <alpine.BSF.2.00.0906281933580.1809@wojtek.tensor.gdynia.pl> <alpine.BSF.2.00.0906290024540.37501@wojtek.tensor.gdynia.pl> <4A47FFBD.3070900@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 28 June 2009 15:41:49 Alan Cox wrote:
> Wojciech Puchar wrote:

> > how can i check how much (or maybe - what processes) 2MB pages are
> > actually allocated?
>
> I'm afraid that you can't with great precision.  For a given program
> execution, on an otherwise idle machine, you can only estimate the
> number by looking at the change in the quantity "promotions + mappings -
> demotions" before, during, and after the program execution.
>
> A program can call mincore(2) in order to determine if a virtual address
> is part of a 2 or 4MB virtual page.

Would it be possible to expose the super page count as kve_super in the 
kinfo_vmentry struct so that procstat can show this information? If only to 
determine if one is using the feature and possibly benefiting from it.

It looks like sys/kern/kern_proc.c could call mincore around the loop at line 
1601 (rev 194498), but I know nothing about the vm subsystem to know the 
implications or locking involved. There's still 16 bytes of spare to consume, 
in the kve_vminfo struct though ;)
-- 
Mel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906291317.12040.mel.flynn%2Bfbsd.hackers>