RE: [PATCHv6 4/8] zswap: add to mm/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCHv6 4/8] zswap: add to mm/
> 
> > From: Seth Jennings [mailto:sjenning@xxxxxxxxxxxxxxxxxx]
> > 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]