From: Minchan Kim <minchan@kernel.org>
To: zhouxianrong <zhouxianrong@huawei.com>
Cc: "Huang, Ying" <ying.huang@intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"mhocko@suse.com" <mhocko@suse.com>,
"rientjes@google.com" <rientjes@google.com>,
"mingo@kernel.org" <mingo@kernel.org>,
"vegard.nossum@oracle.com" <vegard.nossum@oracle.com>,
"aaron.lu@intel.com" <aaron.lu@intel.com>,
Zhouxiyu <zhouxiyu@huawei.com>,
"Duwei (Device OS)" <weidu.du@huawei.com>,
fanghua <fanghua3@huawei.com>, hutj <hutj@huawei.com>,
Won Ho Park <won.ho.park@huawei.com>
Subject: Re: 答复: [PATCH] mm: extend reuse_swap_page range as much as possible
Date: Thu, 2 Nov 2017 13:22:23 +0900 [thread overview]
Message-ID: <20171102042223.GA26523@bbox> (raw)
In-Reply-To: <AE94847B1D9E864B8593BD8051012AF36E13E3BE@DGGEMA505-MBS.china.huawei.com>
On Thu, Nov 02, 2017 at 02:09:57AM +0000, zhouxianrong wrote:
> <zhouxianrong@huawei.com> writes:
>
> > From: zhouxianrong <zhouxianrong@huawei.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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: zhouxianrong <zhouxianrong@huawei.com>
Cc: "Huang, Ying" <ying.huang@intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"mhocko@suse.com" <mhocko@suse.com>,
"rientjes@google.com" <rientjes@google.com>,
"mingo@kernel.org" <mingo@kernel.org>,
"vegard.nossum@oracle.com" <vegard.nossum@oracle.com>,
"aaron.lu@intel.com" <aaron.lu@intel.com>,
Zhouxiyu <zhouxiyu@huawei.com>,
"Duwei (Device OS)" <weidu.du@huawei.com>,
fanghua <fanghua3@huawei.com>, hutj <hutj@huawei.com>,
Won Ho Park <won.ho.park@huawei.com>
Subject: Re: 答复: [PATCH] mm: extend reuse_swap_page range as much as possible
Date: Thu, 2 Nov 2017 13:22:23 +0900 [thread overview]
Message-ID: <20171102042223.GA26523@bbox> (raw)
In-Reply-To: <AE94847B1D9E864B8593BD8051012AF36E13E3BE@DGGEMA505-MBS.china.huawei.com>
On Thu, Nov 02, 2017 at 02:09:57AM +0000, zhouxianrong wrote:
> <zhouxianrong@huawei.com> writes:
>
> > From: zhouxianrong <zhouxianrong@huawei.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.
next prev parent reply other threads:[~2017-11-02 4:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 10:51 [PATCH] mm: extend reuse_swap_page range as much as possible zhouxianrong
2017-11-01 10:51 ` zhouxianrong
2017-11-02 1:42 ` Huang, Ying
2017-11-02 1:42 ` Huang, Ying
2017-11-02 2:09 ` 答复: " zhouxianrong
2017-11-02 4:22 ` Minchan Kim [this message]
2017-11-02 4:22 ` Minchan Kim
2017-11-02 7:49 ` Michal Hocko
2017-11-02 7:49 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102042223.GA26523@bbox \
--to=minchan@kernel.org \
--cc=aaron.lu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=fanghua3@huawei.com \
--cc=hutj@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=rientjes@google.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vegard.nossum@oracle.com \
--cc=weidu.du@huawei.com \
--cc=won.ho.park@huawei.com \
--cc=ying.huang@intel.com \
--cc=zhouxianrong@huawei.com \
--cc=zhouxiyu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.