Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-20 Thread Hui Su
On Tue, Nov 17, 2020 at 05:59:00PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:56:58AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > > > On Tue, Nov 17, 2020 at 05:41:17PM

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:59:00PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:56:58AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > > > On Tue, Nov 17, 2020 at 05:41:17PM

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > > lru_list lru bit 0 can tell whether the list is > > avtive lru-list or not. > > lru_list lru bit 1 can tell whether the list is > > file lru-list or not. > > > > And fix

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Matthew Wilcox
On Wed, Nov 18, 2020 at 01:56:58AM +0800, Hui Su wrote: > On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > > On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > > > > On Wed, Nov 18, 2020 at 01:12:42AM

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Tue, Nov 17, 2020 at 05:47:27PM +, Matthew Wilcox wrote: > On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > > On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > > > On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > > > > lru_list lru bit 0 can tell whether

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Matthew Wilcox
On Wed, Nov 18, 2020 at 01:46:33AM +0800, Hui Su wrote: > On Tue, Nov 17, 2020 at 05:41:17PM +, Matthew Wilcox wrote: > > On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > > > lru_list lru bit 0 can tell whether the list is > > > avtive lru-list or not. > > > lru_list lru bit 1 can

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Matthew Wilcox
On Wed, Nov 18, 2020 at 01:12:42AM +0800, Hui Su wrote: > lru_list lru bit 0 can tell whether the list is > avtive lru-list or not. > lru_list lru bit 1 can tell whether the list is > file lru-list or not. > > And fix some define type in shrink_active_list() > and get_scan_count(). > > v1->v2: >

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Matthew Wilcox
On Wed, Nov 18, 2020 at 12:49:19AM +0800, Hui Su wrote: > page->lru bit 0 can tell whether the page is > avtive page or not. > page->lru bit 1 can tell whether the page is > file page or not. This is wrong. I'll let you figure out why.

[PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
lru_list lru bit 0 can tell whether the list is avtive lru-list or not. lru_list lru bit 1 can tell whether the list is file lru-list or not. And fix some define type in shrink_active_list() and get_scan_count(). v1->v2: correct the commit message, and fix the define type. Signed-off-by: Hui Su

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Wed, Nov 18, 2020 at 12:49:19AM +0800, Hui Su wrote: > page->lru bit 0 can tell whether the page is > avtive page or not. > page->lru bit 1 can tell whether the page is > file page or not. > > Signed-off-by: Hui Su > --- > include/linux/mmzone.h | 4 ++-- > 1 file changed, 2 insertions(+), 2

[PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
page->lru bit 0 can tell whether the page is avtive page or not. page->lru bit 1 can tell whether the page is file page or not. Signed-off-by: Hui Su --- include/linux/mmzone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h