[PATCH] mm/page_alloc: fix documentation error

2020-06-24 Thread Joel Savitz
Cc: Andrew Morton Cc: Matthew Wilcox Cc: Rafael Aquini Cc: Fabrizio D'Angelo Cc: linux...@kvack.org Cc: triv...@kernel.org When I increased the upper bound of the min_free_kbytes value in ee8eb9a5fe863, I forgot to tweak the above comment to reflect the new value. This patch fixes that mistake

Re: [PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Matthew Wilcox
On Wed, Jun 24, 2020 at 10:26:26AM -0400, Rafael Aquini wrote: > Joel's approach, however, makes sense if you consider it's generally a > good practice to get rid of the unnamed magic numbers anti-pattern. But I don't. I care about how easy it is to understand the code, not conforming to some bu

Re: [PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Rafael Aquini
On Wed, Jun 24, 2020 at 03:09:58PM +0100, Matthew Wilcox wrote: > On Wed, Jun 24, 2020 at 10:07:27AM -0400, Rafael Aquini wrote: > > On Wed, Jun 24, 2020 at 12:12:55PM +0100, Matthew Wilcox wrote: > > > On Tue, Jun 23, 2020 at 11:27:12PM -0400, Joel Savitz wrote: > > > > In addition, this patch rep

Re: [PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Matthew Wilcox
On Wed, Jun 24, 2020 at 10:07:27AM -0400, Rafael Aquini wrote: > On Wed, Jun 24, 2020 at 12:12:55PM +0100, Matthew Wilcox wrote: > > On Tue, Jun 23, 2020 at 11:27:12PM -0400, Joel Savitz wrote: > > > In addition, this patch replaces the magic number bounds with symbolic > > > constants to clarify t

Re: [PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Rafael Aquini
On Wed, Jun 24, 2020 at 12:12:55PM +0100, Matthew Wilcox wrote: > On Tue, Jun 23, 2020 at 11:27:12PM -0400, Joel Savitz wrote: > > In addition, this patch replaces the magic number bounds with symbolic > > constants to clarify the logic. > > Why do people think this kind of thing makes the code ea

Re: [PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Matthew Wilcox
On Tue, Jun 23, 2020 at 11:27:12PM -0400, Joel Savitz wrote: > In addition, this patch replaces the magic number bounds with symbolic > constants to clarify the logic. Why do people think this kind of thing makes the code easier to read? It actually makes it harder. Unless the constants are used

[PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-23 Thread Joel Savitz
When I increased the upper bound of the min_free_kbytes value in ee8eb9a5fe863, I forgot to tweak the above comment to reflect the new value. This patch fixes that mistake. In addition, this patch replaces the magic number bounds with symbolic constants to clarify the logic. Suggested-by: John Hu