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: <20100323181422.GC5870@csn.ul.ie>
Date:	Tue, 23 Mar 2010 18:14:22 +0000
From:	Mel Gorman <mel@....ul.ie>
To:	Christoph Lameter <cl@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Adam Litke <agl@...ibm.com>, Avi Kivity <avi@...hat.com>,
	David Rientjes <rientjes@...gle.com>,
	Minchan Kim <minchan.kim@...il.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH 05/11] Export unusable free space index via
	/proc/unusable_index

On Tue, Mar 23, 2010 at 12:31:35PM -0500, Christoph Lameter wrote:
> On Tue, 23 Mar 2010, Mel Gorman wrote:
> 
> > +/*
> > + * Return an index indicating how much of the available free memory is
> > + * unusable for an allocation of the requested size.
> > + */
> > +static int unusable_free_index(unsigned int order,
> > +				struct contig_page_info *info)
> > +{
> > +	/* No free memory is interpreted as all free memory is unusable */
> > +	if (info->free_pages == 0)
> > +		return 1000;
> 
> 
> Is that assumption correct? If you have no free memory then you do not
> know about the fragmentation status that would result if you would run
> reclaim and free some memory.

True, but reclaim and the freeing of memory is a possible future event.
At the time the index is being measured, saying "there is no free memory" and
"of the free memory available, none if it is usable" has the same end-result -
an allocation attempt will fail so the value makes sense.

If it returned zero, it would be a bit confusing. As memory within the zone
gets consumed, the value for high-orders would go towards 1 until there was
no free memory when it would suddenly go to 0. If you graphed that over
time, it would look a bit strange.

> Going into a compaction mode would not be
> useful. Should this not return 0 to avoid any compaction run when all
> memory is allocated?
> 

A combination of watermarks and fragmentation_index is what is used in
the compaction decision, not unusable_free_index.

> Otherwise
> 
> Reviewed-by: Christoph Lameter <cl@...ux-foundation.org>
> 

Thanks

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--
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