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-next>] [day] [month] [year] [list]
Message-ID: <1480062313-7361-1-git-send-email-zhuhui@xiaomi.com>
Date:   Fri, 25 Nov 2016 16:25:11 +0800
From:   Hui Zhu <zhuhui@...omi.com>
To:     <minchan@...nel.org>, <ngupta@...are.org>,
        <sergey.senozhatsky.work@...il.com>, <dan.j.williams@...el.com>,
        <jthumshirn@...e.de>, <akpm@...ux-foundation.org>,
        <zhuhui@...omi.com>, <re.emese@...il.com>,
        <andriy.shevchenko@...ux.intel.com>, <vishal.l.verma@...el.com>,
        <hannes@...xchg.org>, <mhocko@...e.com>,
        <mgorman@...hsingularity.net>, <vbabka@...e.cz>,
        <vdavydov.dev@...il.com>, <kirill.shutemov@...ux.intel.com>,
        <ying.huang@...el.com>, <yang.shi@...aro.org>,
        <dave.hansen@...ux.intel.com>, <willy@...ux.intel.com>,
        <vkuznets@...hat.com>, <vitalywool@...il.com>,
        <jmarchan@...hat.com>, <lstoakes@...il.com>, <geliangtang@....com>,
        <viro@...iv.linux.org.uk>, <hughd@...gle.com>, <riel@...hat.com>,
        <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>
CC:     <teawater@...il.com>
Subject: [RFC 0/2] Add interface let ZRAM close swap cache

SWAP will keep before swap cache before swap space get full.  It will
make swap space cannot be freed.  It is harmful to the system that use
ZRAM because its space use memory too.

This two patches will add a sysfs switch to ZRAM that open or close swap
cache without check the swap space.
I got good result in real environment with them.  And following part is
the record with vm-scalability case-swap-w-rand and case-swap-w-seq in
a Intel(R) Core(TM)2 Duo CPU, 2G memory and 1G ZRAM swap machine:
4.9.0-rc5 without the patches:
case-swap-w-rand
1129809600 bytes / 2149155959 usecs = 513 KB/s
1129809600 bytes / 2150796138 usecs = 512 KB/s
case-swap-w-rand
1124808768 bytes / 1973130450 usecs = 556 KB/s
1124808768 bytes / 1975142661 usecs = 556 KB/s
case-swap-w-rand
1130677056 bytes / 2154714972 usecs = 512 KB/s
1130677056 bytes / 2157542507 usecs = 511 KB/s
case-swap-w-seq
1117922688 bytes / 6596049 usecs = 165511 KB/s
1117922688 bytes / 6715711 usecs = 162562 KB/s
case-swap-w-seq
1115869824 bytes / 6909262 usecs = 157718 KB/s
1115869824 bytes / 7099283 usecs = 153496 KB/s
case-swap-w-seq
1116472896 bytes / 6451638 usecs = 168996 KB/s
1116472896 bytes / 6647963 usecs = 164005 KB/s
4.9.0-rc5 with the patches:
case-swap-w-rand
1127272896 bytes / 2060906184 usecs = 534 KB/s
1127272896 bytes / 2063671365 usecs = 533 KB/s
case-swap-w-rand
1131846912 bytes / 2097038264 usecs = 527 KB/s
1131846912 bytes / 2100148465 usecs = 526 KB/s
case-swap-w-rand
1129139136 bytes / 2038769367 usecs = 540 KB/s
1129139136 bytes / 2041411431 usecs = 540 KB/s
case-swap-w-seq
1129622976 bytes / 5910625 usecs = 186638 KB/s
1129622976 bytes / 6313311 usecs = 174733 KB/s
case-swap-w-seq
1130053248 bytes / 6771182 usecs = 162980 KB/s
1130053248 bytes / 6666061 usecs = 165550 KB/s
case-swap-w-seq
1126484928 bytes / 6555923 usecs = 167799 KB/s
1126484928 bytes / 6642291 usecs = 165617 KB/s

Hui Zhu (2):
SWAP: add interface to let disk close swap cache
ZRAM: add sysfs switch swap_cache_not_keep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ