Re: [PATCH 3/3] mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks

2020-07-01 Thread David Rientjes
On Wed, 1 Jul 2020, Dave Hansen wrote: > On 7/1/20 1:04 PM, Ben Widawsky wrote: > >> +static inline bool node_reclaim_enabled(void) > >> +{ > >> + /* Is any node_reclaim_mode bit set? */ > >> + return node_reclaim_mode & (RECLAIM_ZONE|RECLAIM_WRITE|RECLAIM_UNMAP); > >> +} > >> + > >> extern

Re: [PATCH 3/3] mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks

2020-07-01 Thread Dave Hansen
On 7/1/20 1:04 PM, Ben Widawsky wrote: >> +static inline bool node_reclaim_enabled(void) >> +{ >> +/* Is any node_reclaim_mode bit set? */ >> +return node_reclaim_mode & (RECLAIM_ZONE|RECLAIM_WRITE|RECLAIM_UNMAP); >> +} >> + >> extern void check_move_unevictable_pages(struct pagevec

Re: [PATCH 3/3] mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks

2020-07-01 Thread Ben Widawsky
On 20-07-01 13:03:01, David Rientjes wrote: > On Wed, 1 Jul 2020, Dave Hansen wrote: > > > diff -puN include/linux/swap.h~mm-vmscan-node_reclaim_mode_helper > > include/linux/swap.h > > --- a/include/linux/swap.h~mm-vmscan-node_reclaim_mode_helper > > 2020-07-01 08:22:13.650955330 -0700 >

Re: [PATCH 3/3] mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks

2020-07-01 Thread David Rientjes
On Wed, 1 Jul 2020, Dave Hansen wrote: > diff -puN include/linux/swap.h~mm-vmscan-node_reclaim_mode_helper > include/linux/swap.h > --- a/include/linux/swap.h~mm-vmscan-node_reclaim_mode_helper 2020-07-01 > 08:22:13.650955330 -0700 > +++ b/include/linux/swap.h2020-07-01 08:22:13.659955330

[PATCH 3/3] mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks

2020-07-01 Thread Dave Hansen
From: Dave Hansen RECLAIM_ZONE was assumed to be unused because it was never explicitly used in the kernel. However, there were a number of places where it was checked implicitly by checking 'node_reclaim_mode' for a zero value. These zero checks are not great because it is not obvious what