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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2017 13:22:23 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     zhouxianrong <zhouxianrong@...wei.com>
Cc:     "Huang, Ying" <ying.huang@...el.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "vegard.nossum@...cle.com" <vegard.nossum@...cle.com>,
        "aaron.lu@...el.com" <aaron.lu@...el.com>,
        Zhouxiyu <zhouxiyu@...wei.com>,
        "Duwei (Device OS)" <weidu.du@...wei.com>,
        fanghua <fanghua3@...wei.com>, hutj <hutj@...wei.com>,
        Won Ho Park <won.ho.park@...wei.com>
Subject: Re: 答复: [PATCH] mm: extend
 reuse_swap_page range as much as possible

On Thu, Nov 02, 2017 at 02:09:57AM +0000, zhouxianrong wrote:
> <zhouxianrong@...wei.com> writes:
> 
> > From: zhouxianrong <zhouxianrong@...wei.com>
> >
> > origanlly reuse_swap_page requires that the sum of page's mapcount and 
> > swapcount less than or equal to one.
> > in this case we can reuse this page and avoid COW currently.
> >
> > now reuse_swap_page requires only that page's mapcount less than or 
> > equal to one and the page is not dirty in swap cache. in this case we 
> > do not care its swap count.
> >
> > the page without dirty in swap cache means that it has been written to 
> > swap device successfully for reclaim before and then read again on a 
> > swap fault. in this case the page can be reused even though its swap 
> > count is greater than one and postpone the COW on other successive 
> > accesses to the swap cache page later rather than now.
> >
> > i did this patch test in kernel 4.4.23 with arm64 and none huge 
> > memory. it work fine.
> 
> Why do you need this?  You saved copying one page from memory to memory
> (COW) now, at the cost of reading a page from disk to memory later?
> 
> yes, accessing later does not always happen, there is probability for it, so postpone COW now.

So, it's trade-off. It means we need some number with some scenarios
to prove it's better than as-is.
It would help to drive reviewers/maintainer.

Thanks.

Powered by blists - more mailing lists