lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131107143832.GA27283@router-fw-old.local.net-space.pl>
Date:	Thu, 7 Nov 2013 15:38:32 +0100
From:	Daniel Kiper <dkiper@...-space.pl>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:	Bob Liu <bob.liu@...cle.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	xen-devel@...ts.xenproject.org, david.vrabel@...rix.com,
	linux-kernel@...r.kernel.org, daniel.kiper@...cle.com
Subject: Re: [Xen-devel] [PATCH] xen/balloon: Set balloon's initial state to number of existing RAM pages

On Wed, Nov 06, 2013 at 08:25:04PM -0500, Konrad Rzeszutek Wilk wrote:
> Bob Liu <bob.liu@...cle.com> wrote:
> >
> >On 11/07/2013 04:37 AM, Boris Ostrovsky wrote:
> >> Currently balloon's initial value is set to max_pfn which includes
> >> non-RAM ranges such as MMIO hole. As result, initial memory target
> >> (specified by guest's configuration file) will appear smaller than
> >> what balloon driver perceives to be the current number of available
> >> pages. Thus it will balloon down "extra" pages, decreasing amount of
> >> available memory for no good reason.
> >>
> >
> >This fix the strange behavior I mentioned yesterday, every time after
> >guest started balloon driver will be triggered unreasonably.
> >
> >> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> >> ---
> >>  drivers/xen/balloon.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> >> index b232908..1b62304 100644
> >> --- a/drivers/xen/balloon.c
> >> +++ b/drivers/xen/balloon.c
> >> @@ -641,7 +641,7 @@ static int __init balloon_init(void)
> >>
> >>  	balloon_stats.current_pages = xen_pv_domain()
> >>  		? min(xen_start_info->nr_pages - xen_released_pages, max_pfn)
> >> -		: max_pfn;
> >> +		: get_num_physpages();
> >
> >By the way, should the other places using max_pfn also be changed with
> >get_num_physpages()?
>
> No. In PV that calculation is correct as it gets the amount of RAM pages - which is a exactly what you need.

What about PCI passthrough case?

Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ