Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE
@ 2020-02-13  4:31 Yang Shi
  2020-02-13 17:26 ` Minchan Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Shi @ 2020-02-13  4:31 UTC (permalink / raw)
  To: minchan, anshuman.khandual, akpm; +Cc: yang.shi, linux-mm, linux-kernel

The commit 98fa15f34cb3 ("mm: replace all open encodings for
NUMA_NO_NODE") did the replacement across the kernel tree, but we got
some more in vmscan.c since then.

Cc: Minchan Kim <minchan@kernel.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
---
 mm/vmscan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index c05eb9e..567864a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2096,7 +2096,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
 
 unsigned long reclaim_pages(struct list_head *page_list)
 {
-	int nid = -1;
+	int nid = NUMA_NO_NODE;
 	unsigned long nr_reclaimed = 0;
 	LIST_HEAD(node_page_list);
 	struct reclaim_stat dummy_stat;
@@ -2111,7 +2111,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
 
 	while (!list_empty(page_list)) {
 		page = lru_to_page(page_list);
-		if (nid == -1) {
+		if (nid == NUMA_NO_NODE) {
 			nid = page_to_nid(page);
 			INIT_LIST_HEAD(&node_page_list);
 		}
@@ -2132,7 +2132,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
 			putback_lru_page(page);
 		}
 
-		nid = -1;
+		nid = NUMA_NO_NODE;
 	}
 
 	if (!list_empty(&node_page_list)) {
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE
  2020-02-13  4:31 [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE Yang Shi
@ 2020-02-13 17:26 ` Minchan Kim
  2020-02-14 20:27 ` David Rientjes
  2020-02-15  4:58 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2020-02-13 17:26 UTC (permalink / raw)
  To: Yang Shi; +Cc: anshuman.khandual, akpm, linux-mm, linux-kernel

On Thu, Feb 13, 2020 at 12:31:38PM +0800, Yang Shi wrote:
> The commit 98fa15f34cb3 ("mm: replace all open encodings for
> NUMA_NO_NODE") did the replacement across the kernel tree, but we got
> some more in vmscan.c since then.
> 
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks, Yang!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE
  2020-02-13  4:31 [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE Yang Shi
  2020-02-13 17:26 ` Minchan Kim
@ 2020-02-14 20:27 ` David Rientjes
  2020-02-15  4:58 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2020-02-14 20:27 UTC (permalink / raw)
  To: Yang Shi; +Cc: minchan, anshuman.khandual, akpm, linux-mm, linux-kernel

On Thu, 13 Feb 2020, Yang Shi wrote:

> The commit 98fa15f34cb3 ("mm: replace all open encodings for
> NUMA_NO_NODE") did the replacement across the kernel tree, but we got
> some more in vmscan.c since then.
> 
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>

Acked-by: David Rientjes <rientjes@google.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE
  2020-02-13  4:31 [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE Yang Shi
  2020-02-13 17:26 ` Minchan Kim
  2020-02-14 20:27 ` David Rientjes
@ 2020-02-15  4:58 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2020-02-15  4:58 UTC (permalink / raw)
  To: Yang Shi, minchan, akpm; +Cc: linux-mm, linux-kernel



On 02/13/2020 10:01 AM, Yang Shi wrote:
> The commit 98fa15f34cb3 ("mm: replace all open encodings for
> NUMA_NO_NODE") did the replacement across the kernel tree, but we got
> some more in vmscan.c since then.
> 
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  4:31 [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE Yang Shi
2020-02-13 17:26 ` Minchan Kim
2020-02-14 20:27 ` David Rientjes
2020-02-15  4:58 ` Anshuman Khandual

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git