From: Michal Hocko <mhocko@kernel.org>
To: Minchan Kim <minchan@kernel.org>
Cc: zhouxianrong <zhouxianrong@huawei.com>,
"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>,
"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 08:49:17 +0100 [thread overview]
Message-ID: <20171102074917.y4uvfrzshtr7jahi@dhcp22.suse.cz> (raw)
In-Reply-To: <20171102042223.GA26523@bbox>
On Thu 02-11-17 13:22:23, Minchan Kim wrote:
> 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.
this is not an appropriate justification
> > 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.
Absolutely agreed. We definitely need some numbers for different set of
workloads.
--
Michal Hocko
SUSE Labs
--
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>
prev parent reply other threads:[~2017-11-02 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 10:51 zhouxianrong
2017-11-02 1:42 ` Huang, Ying
2017-11-02 2:09 ` 答复: " zhouxianrong
2017-11-02 4:22 ` Minchan Kim
2017-11-02 7:49 ` Michal Hocko [this message]
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=20171102074917.y4uvfrzshtr7jahi@dhcp22.suse.cz \
--to=mhocko@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=minchan@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox