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: <426367E2313C2449837CD2DE46E7EAF930E39F5B@SN2PRD0310MB382.namprd03.prod.outlook.com>
Date:	Mon, 12 Nov 2012 21:36:10 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	David Rientjes <rientjes@...gle.com>
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>,
	"mhocko@...e.cz" <mhocko@...e.cz>,
	"hannes@...xchg.org" <hannes@...xchg.org>,
	"yinghan@...gle.com" <yinghan@...gle.com>
Subject: RE: [PATCH 1/1] mm: Export a function to read vm_committed_as



> -----Original Message-----
> From: KY Srinivasan
> Sent: Sunday, November 11, 2012 4:24 AM
> To: 'David Rientjes'
> 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; mhocko@...e.cz; hannes@...xchg.org;
> yinghan@...gle.com
> Subject: RE: [PATCH 1/1] mm: Export a function to read vm_committed_as
> 
> 
> 
> > -----Original Message-----
> > From: David Rientjes [mailto:rientjes@...gle.com]
> > Sent: Saturday, November 10, 2012 9:35 PM
> > 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; mhocko@...e.cz; hannes@...xchg.org;
> > yinghan@...gle.com
> > Subject: Re: [PATCH 1/1] mm: Export a function to read vm_committed_as
> >
> > On Sat, 10 Nov 2012, K. Y. Srinivasan wrote:
> >
> > > diff --git a/mm/mmap.c b/mm/mmap.c
> > > index 2d94235..e527239 100644
> > > --- a/mm/mmap.c
> > > +++ b/mm/mmap.c
> > > @@ -89,6 +89,17 @@ int sysctl_max_map_count __read_mostly =
> > DEFAULT_MAX_MAP_COUNT;
> > >  struct percpu_counter vm_committed_as ____cacheline_aligned_in_smp;
> > >
> > >  /*
> > > + * A wrapper to read vm_committed_as that can be used by external
> > modules.
> > > + */
> > > +
> > > +unsigned long read_vm_committed_as(void)
> > > +{
> > > +	return percpu_counter_read_positive(&vm_committed_as);
> > > +}
> > > +
> > > +EXPORT_SYMBOL_GPL(read_vm_committed_as);
> > > +
> > > +/*
> > >   * Check that a process has enough memory to allocate a new virtual
> > >   * mapping. 0 means there is enough memory for the allocation to
> > >   * succeed and -ENOMEM implies there is not.
> >
> > This is precisely what I didn't want to see; I was expecting that this
> > function was going to have some name that would describe what a hypervisor
> > would use it for, regardless of its implementation and current use of
> > vm_committed_as.  read_vm_committed_as() misses the entire point of the
> > suggestion and a few people have mentioned that they think this
> > implementation will evolve over time.
> >
> > Please think of what you're trying to determine in the code that will
> > depend on this and then convert the existing user in
> > drivers/xen/xen-selfballoon.c.
> 
> David,
> 
> Thanks for the prompt response. For the Linux balloon driver for Hyper-V, I need
> access
> to the metric that reflects the system wide memory commitment made by the
> guest kernel.
> In the Hyper-V case, this information is one of the many metrics used to drive the
> policy engine
> on the host. Granted, the interface name I have chosen here could be more
> generic; how about
> read_mem_commit_info(void). I am open to suggestions here.
> 
> With regards to making changes to the Xen self ballooning code, I would like to
> separate that patch
> from the patch that implements the exported mechanism to access the memory
> commitment information.
> Once we settle on this patch, I can submit the patch to fix the Xen self ballooning
> driver to use this new
> interface along with the Hyper-V balloon driver that is currently blocked on
> resolving this issue.

David,

I want to finalize this ASAP. Please give me your feedback so I can move this forward.

Regards,

K. Y


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