Re: 答复: [PATCH] mm: extend reuse_swap_page range as much as possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 02-11-17 13:22:23, Minchan Kim wrote:
> On Thu, Nov 02, 2017 at 02:09:57AM +0000, zhouxianrong wrote:
> > <zhouxianrong@xxxxxxxxxx> writes:
> > 
> > > From: zhouxianrong <zhouxianrong@xxxxxxxxxx>
> > >
> > > 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux