|
From: | Dave Hansen |
Subject: | Re: [Qemu-devel] [PATCH v2 repost 3/7] mm: add a function to get the max pfn |
Date: | Wed, 27 Jul 2016 15:52:06 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 07/27/2016 03:08 PM, Michael S. Tsirkin wrote: >> > +unsigned long get_max_pfn(void) >> > +{ >> > + return max_pfn; >> > +} >> > +EXPORT_SYMBOL(get_max_pfn); >> > + > > This needs a coment that this can change at any time. > So it's only good as a hint e.g. for sizing data structures. Or, if we limit the batches to 1GB like you suggested earlier, then we might not even need this exported. It would mean that in the worst case, we temporarily waste 28k out of the 32k allocation for a small VM that had <128MB of memory. That seems like a small price to pay for not having to track max_pfn anywhere.
[Prev in Thread] | Current Thread | [Next in Thread] |