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]
Date:   Wed, 18 Oct 2017 16:33:43 +0300
From:   Timofey Titovets <nefelim4ag@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Srividya Desireddy <srividya.dr@...sung.com>,
        "sjenning@...hat.com" <sjenning@...hat.com>,
        "ddstreet@...e.org" <ddstreet@...e.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "penberg@...nel.org" <penberg@...nel.org>,
        Dinakar Reddy Pathireddy <dinakar.p@...sung.com>,
        SHARAN ALLUR <sharan.allur@...sung.com>,
        RAJIB BASU <rajib.basu@...sung.com>,
        JUHUN KIM <juhunkim@...sung.com>,
        "srividya.desireddy@...il.com" <srividya.desireddy@...il.com>
Subject: Re: [PATCH] zswap: Same-filled pages handling

2017-10-18 15:34 GMT+03:00 Matthew Wilcox <willy@...radead.org>:
> On Wed, Oct 18, 2017 at 10:48:32AM +0000, Srividya Desireddy wrote:
>> +static void zswap_fill_page(void *ptr, unsigned long value)
>> +{
>> +     unsigned int pos;
>> +     unsigned long *page;
>> +
>> +     page = (unsigned long *)ptr;
>> +     if (value == 0)
>> +             memset(page, 0, PAGE_SIZE);
>> +     else {
>> +             for (pos = 0; pos < PAGE_SIZE / sizeof(*page); pos++)
>> +                     page[pos] = value;
>> +     }
>> +}
>
> I think you meant:
>
> static void zswap_fill_page(void *ptr, unsigned long value)
> {
>         memset_l(ptr, value, PAGE_SIZE / sizeof(unsigned long));
> }
>
> (and you should see significantly better numbers at least on x86;
> I don't know if anyone's done an arm64 version of memset_l yet).
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

IIRC kernel have special zero page, and if i understand correctly.
You can map all zero pages to that zero page and not touch zswap completely.
(Your situation look like some KSM case (i.e. KSM can handle pages
with same content), but i'm not sure if that applicable there)

Thanks.
-- 
Have a nice day,
Timofey.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ