Re: [[repost]RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-05-06 Thread Zhaoyang Huang
On Mon, May 6, 2019 at 10:57 PM Johannes Weiner wrote: > > On Sun, Apr 28, 2019 at 03:44:34PM +0800, Zhaoyang Huang wrote: > > From: Zhaoyang Huang > > > > this patch introduce timestamp into workingset's entry and judge if the > > page is > > active or inactive via active_file/refault_ratio ins

Re: [[repost]RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-05-06 Thread Johannes Weiner
On Sun, Apr 28, 2019 at 03:44:34PM +0800, Zhaoyang Huang wrote: > From: Zhaoyang Huang > > this patch introduce timestamp into workingset's entry and judge if the page > is > active or inactive via active_file/refault_ratio instead of refault distance. > > The original thought is coming from th

[[repost]RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-28 Thread Zhaoyang Huang
From: Zhaoyang Huang this patch introduce timestamp into workingset's entry and judge if the page is active or inactive via active_file/refault_ratio instead of refault distance. The original thought is coming from the logs we got from trace_printk in this patch, we can find about 1/5 of the fil

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-23 Thread Zhaoyang Huang
rebase the commit to latest mainline and update the code. @Matthew, with regarding to your comment, I would like to say the algorithm doesn't change at all. I do NOT judge the page's activity via an absolute time value, but still the refault distance. What I want to fix is the scenario which drop l

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Matthew Wilcox
On Wed, Apr 17, 2019 at 08:26:22PM +0800, Zhaoyang Huang wrote: [quoting Johannes here] > As Matthew says, you are fairly randomly making refault activations > more aggressive (especially with that timestamp unpacking bug), and > while that expectedly boosts workload transition / startup, it comes

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Michal Hocko
On Wed 17-04-19 20:26:22, Zhaoyang Huang wrote: > repost the feedback by under Johannes's comment Please follow up in the original email thread. Fragmenting the discussion is exactly what I wanted... -- Michal Hocko SUSE Labs

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Zhaoyang Huang
repost the feedback by under Johannes's comment When something like a higher-order allocation drops a large number of file pages, it's *intentional* that the pages that were evicted before them become less valuable and less likely to be activated on refault. There is a finite amount of in-memory LR

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Michal Hocko
On Wed 17-04-19 19:36:21, Zhaoyang Huang wrote: > sorry for the confusion. What I mean is the basic idea doesn't change > as replacing the refault criteria from refault_distance to timestamp. > But the detailed implementation changed a lot, including fix bugs, > update the way of packing the timest

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Zhaoyang Huang
sorry for the confusion. What I mean is the basic idea doesn't change as replacing the refault criteria from refault_distance to timestamp. But the detailed implementation changed a lot, including fix bugs, update the way of packing the timestamp, 32bit/64bit differentiation etc. So it makes sense

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Michal Hocko
On Wed 17-04-19 18:55:15, Zhaoyang Huang wrote: > fix one mailbox and update for some information > > Comparing to > http://lkml.kernel.org/r/1554348617-12897-1-git-send-email-huangzhaoy...@gmail.com, > this commit fix the packing order error and add trace_printk for > reference debug information

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Zhaoyang Huang
fix one mailbox and update for some information Comparing to http://lkml.kernel.org/r/1554348617-12897-1-git-send-email-huangzhaoy...@gmail.com, this commit fix the packing order error and add trace_printk for reference debug information. For johannes's comments, please find bellowing for my fee

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Michal Hocko
Hi, I do not see http://lkml.kernel.org/r/1554348617-12897-1-git-send-email-huangzhaoy...@gmail.com discussion reaching a conlusion to change the current workingset implementation. Therefore is there any reason to post a new version of the patch? If yes it would be really great to see a short summ

Re: [RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Zhaoyang Huang
add Johannes and answer his previous question. @Johannes Weiner Yes. I do agree with you about the original thought of sacrificing long distance access pages when huge memory demands arise. The problem is what is the criteria of the distance, which you can find from what I comment in the patch, th

[RFC PATCH] mm/workingset : judge file page activity via timestamp

2019-04-17 Thread Zhaoyang Huang
From: Zhaoyang Huang This patch introduce timestamp into workingset's entry and judge if the page is active or inactive via active_file/refault_ratio instead of refault distance. The original thought is coming from the logs we got from trace_printk in this patch, we can find about 1/5 of the fil