[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175ae3a0-2760-4ec7-869f-46a634ce321d@default>
Date: Thu, 28 Feb 2013 11:50:58 -0800 (PST)
From: Dan Magenheimer <dan.magenheimer@...cle.com>
To: Dan Magenheimer <dan.magenheimer@...cle.com>,
Seth Jennings <sjenning@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nitin Gupta <ngupta@...are.org>,
Minchan Kim <minchan@...nel.org>,
Konrad Wilk <konrad.wilk@...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@...ux.vnet.ibm.com>,
Joe Perches <joe@...ches.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Cody P Schafer <cody@...ux.vnet.ibm.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: RE: [PATCHv6 4/8] zswap: add to mm/
> From: Dan Magenheimer
> Sent: Thursday, February 28, 2013 11:13 AM
> To: Seth Jennings; Andrew Morton
> Cc: Greg Kroah-Hartman; Nitin Gupta; Minchan Kim; Konrad Rzeszutek Wilk; Dan Magenheimer; Robert
> Jennings; Jenifer Hopper; Mel Gorman; Johannes Weiner; Rik van Riel; Larry Woodman; Benjamin
> Herrenschmidt; Dave Hansen; Joe Perches; Joonsoo Kim; Cody P Schafer; linux-mm@...ck.org; linux-
> kernel@...r.kernel.org; devel@...verdev.osuosl.org
> Subject: RE: [PATCHv6 4/8] zswap: add to mm/
>
> > From: Seth Jennings [mailto:sjenning@...ux.vnet.ibm.com]
> > Subject: [PATCHv6 4/8] zswap: add to mm/
> >
> > +/*
> > + * Maximum compression ratio, as as percentage, for an acceptable
> > + * compressed page. Any pages that do not compress by at least
> > + * this ratio will be rejected.
> > +*/
> > +static unsigned int zswap_max_compression_ratio = 80;
> > +module_param_named(max_compression_ratio,
> > + zswap_max_compression_ratio, uint, 0644);
>
> Unless this is a complete coincidence, I believe that
> the default value "80" is actually:
>
> (100 * (1L >> ZS_MAX_ZSPAGE_ORDER)) /
> ((1L >> ZS_MAX_ZSPAGE_ORDER)) + 1)
Doh! If it wasn't obvious, those should be left
shift operators, not right shift. So....
(100 * (1L << ZS_MAX_ZSPAGE_ORDER)) /
((1L << ZS_MAX_ZSPAGE_ORDER)) + 1)
Sorry for that.
--
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