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]
Date:	Mon, 18 Mar 2013 15:08:36 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Michal Hocko <mhocko@...e.cz>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"apw@...onical.com" <apw@...onical.com>,
	"andi@...stfloor.org" <andi@...stfloor.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"kamezawa.hiroyuki@...il.com" <kamezawa.hiroyuki@...il.com>,
	"hannes@...xchg.org" <hannes@...xchg.org>,
	"yinghan@...gle.com" <yinghan@...gle.com>
Subject: RE: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations
 for ballooning



> -----Original Message-----
> From: Michal Hocko [mailto:mhocko@...e.cz]
> Sent: Monday, March 18, 2013 10:13 AM
> To: KY Srinivasan
> Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> andi@...stfloor.org; akpm@...ux-foundation.org; linux-mm@...ck.org;
> kamezawa.hiroyuki@...il.com; hannes@...xchg.org; yinghan@...gle.com
> Subject: Re: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for
> ballooning
> 
> On Mon 18-03-13 13:44:05, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Michal Hocko [mailto:mhocko@...e.cz]
> > > Sent: Monday, March 18, 2013 6:53 AM
> > > To: KY Srinivasan
> > > Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> > > devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> > > andi@...stfloor.org; akpm@...ux-foundation.org; linux-mm@...ck.org;
> > > kamezawa.hiroyuki@...il.com; hannes@...xchg.org;
> yinghan@...gle.com
> > > Subject: Re: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for
> > > ballooning
> > >
> > > On Sat 16-03-13 14:42:05, K. Y. Srinivasan wrote:
> > > > While ballooning memory out of the guest, attempt 2M allocations first.
> > > > If 2M allocations fail, then go for 4K allocations. In cases where we
> > > > have performed 2M allocations, split this 2M page so that we can free this
> > > > page at 4K granularity (when the host returns the memory).
> > >
> > > Maybe I am missing something but what is the advantage of 2M allocation
> > > when you split it up immediately so you are not using it as a huge page?
> >
> > The Hyper-V ballooning protocol specifies the pages being ballooned as
> > page ranges - start_pfn: number_of_pfns. So, when the guest balloon
> > is inflating and I am able to allocate 2M pages, I will be able to
> > represent 512 contiguous pages in one 64 bit entry and this makes the
> > ballooning operation that much more efficient. The reason I split the
> > page is that the host does not guarantee that when it returns the
> > memory to the guest, it will return in any particular granularity and
> > so I have to be able to free this memory in 4K granularity. This is
> > the corner case that I will have to handle.
> 
> Thanks for the clarification. I think this information would be valuable
> in the changelog.

Thanks Michal. I will resend the patches with the changes you have suggested. What is your
recommendation with regards which tree the mm patch needs to go through; the Hyper-V balloon
driver patch will go through Greg's tree.

Regards,

K. Y 
> --
> Michal Hocko
> SUSE Labs
> 


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