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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130529125747.23a6a26cdcb013842bf31644@linux-foundation.org>
Date:	Wed, 29 May 2013 12:57:47 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Seth Jennings <sjenning@...ux.vnet.ibm.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Nitin Gupta <ngupta@...are.org>,
	Minchan Kim <minchan@...nel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Robert Jennings <rcj@...ux.vnet.ibm.com>,
	Jenifer Hopper <jhopper@...ibm.com>,
	Mel Gorman <mgorman@...e.de>,
	Johannes Weiner <jweiner@...hat.com>,
	Rik van Riel <riel@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Dave Hansen <dave@...1.net>, Joe Perches <joe@...ches.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Cody P Schafer <cody@...ux.vnet.ibm.com>,
	Hugh Dickens <hughd@...gle.com>,
	Paul Mackerras <paulus@...ba.org>,
	Heesub Shin <heesub.shin@...sung.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCHv12 3/4] zswap: add to mm/

On Wed, 29 May 2013 14:50:27 -0500 Seth Jennings <sjenning@...ux.vnet.ibm.com> wrote:

> On Wed, May 29, 2013 at 11:29:29AM -0700, Andrew Morton wrote:
> > On Wed, 29 May 2013 09:57:20 -0500 Seth Jennings <sjenning@...ux.vnet.ibm.com> wrote:
> > 
> > > > > +/*********************************
> > > > > +* helpers
> > > > > +**********************************/
> > > > > +static inline bool zswap_is_full(void)
> > > > > +{
> > > > > +	return (totalram_pages * zswap_max_pool_percent / 100 <
> > > > > +		zswap_pool_pages);
> > > > > +}
> > > > 
> > > > We have had issues in the past where percentage-based tunables were too
> > > > coarse on very large machines.  For example, a terabyte machine where 0
> > > > bytes is too small and 10GB is too large.
> > > 
> > > Yes, this is known limitation of the code right now and it is a high priority
> > > to come up with something better.  It isn't clear what dynamic sizing policy
> > > should be used so, until such time as that policy can be determined, this is a
> > > simple stop-gap that works well enough for simple setups.
> > 
> > It's a module parameter and hence is part of the userspace interface. 
> > It's undesirable that the interface be changed, and it would be rather
> > dumb to merge it as-is when we *know* that it will be changed.
> > 
> > I don't think we can remove the parameter altogether (or can we?), so I
> > suggest we finalise it ASAP.  Perhaps rename it to
> > zswap_max_pool_ratio, with a range 1..999999.  Better ideas needed :(
> 
> zswap_max_pool_ratio is fine with me.  I'm not entirely clear on the change
> though.  Would that just be a name change or a change in meaning?

It would be a change in behaviour.  The problem which I'm suggesting we
address is that a 1% increment is too coarse.

> Also, we can keep the tunable as I imagine there will always be some use for a
> manual override of the (future) dynamic policy.  When the dynamic policy is
> available, we can just say that zswap_max_pool_ratio = 0 means "use dynamic
> policy" and change the default to 0.  Does that sounds reasonable?

Sounds OK.

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