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

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

 



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

(though the constant ZS_MAX_ZSPAGE_ORDER is not currently
defined outside of zsmalloc.c) because pages that compress
less efficiently than this always require a full pageframe
in zsmalloc.  True?

If this change were made, is there any real reason for this
to be a user-selectable parameter, i.e. given the compression
internals knowledge necessary to understand what value should
be selected, would any mortal sysadmin ever want to change it
or know what would be a reasonable value to change it to?
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux