Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp138517lqs; Thu, 13 Jun 2024 06:18:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7jPNzr6A2oGvK8e3hEJ/qui46Riysy2N+YRcCJNc1fPR0A5jTF52LVFt5NFewMaG4R3It5kBdm6dXecE5q1dd0nrd5JvKjtzHTPkXuw== X-Google-Smtp-Source: AGHT+IF2pUM1BloFlzA+TOPhMEovWlf+1RE1ZhGzXEDXuVK7anz3M7ubGHW7DHwUt4DO6MNrLK/N X-Received: by 2002:a05:6402:3086:b0:57c:677a:a941 with SMTP id 4fb4d7f45d1cf-57caaac68e0mr2151236a12.40.1718284713685; Thu, 13 Jun 2024 06:18:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718284713; cv=pass; d=google.com; s=arc-20160816; b=xL6LeCTNxwnwdqil40Ec0A9X36KjkMZzvkOaSPPh2dwjzrGSMdFwmgFwCTgV+B04PF 2q+rjZRRyIx1fT2a11vl8yg3M+0v0j/pe33KHI5g0AWL8CVR13P4yyQaHp4M2qqmSHGq Wv0lCEBYuO9Ol4VQTnEpRHMA7muNcJC6Z5lK+pBb1bqz08zuNFOfptT7RranvlivkAVv GwrQn5/IxQ0qZqUoQAy9TT9WaNLo3zVvhOuJHoKfo8nvTFQOuZB5keBNSo/v0orqdNEL 0jyGchFNOTzrDN1xnXsKozSN54Kjl9OBi37xhVOlM49n1S7AAXNPqFAoGDw6Lq/L5LgY 6gAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vkLVLR7lzzPMBnbyfxFYyYGebPismruQB5Ra8PgByho=; fh=3neK+uwM3aj45LO7wtdYM3yjEndz5CATkfR1g3LvkT4=; b=tz3IZFnpE9lL0ZeJn92fqM/3O9FiZFrnHTjnADjr4J0nlApEj6nszsXfIkE3mHutgs oAFXQTDZt4jiXcLm+UtLswtAITYyiS6+BxNRLaBliiUtDx28pXat7xMav9iWIqW7ubLp hLKifMHULy1HN9sJn9QZF34gynbieQWg1ZN0rFqiAXlO0zITpQbYawb/Cd2LYxErp6Uv f4DQzYI9CuiUT+CCC/m1IpJdFlPNNZye002Zm2DeBYQ6ve3aqVf5IJHRwWd/CtjM3nRx ttDuD4WPUPpfBj3AhcF8gb8/aOTsCaWOFcj8eY2ucoy39OD0Y9S+WG72riAWYGadA61q 2SwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-213280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213280-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb747925asi695543a12.666.2024.06.13.06.18.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-213280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213280-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6583B1F21CEE for ; Thu, 13 Jun 2024 13:18:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1306D144D0B; Thu, 13 Jun 2024 13:18:14 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62A81A94D; Thu, 13 Jun 2024 13:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284693; cv=none; b=sIDYQT3FMw4QGpWVgqZaLe4WEu3z7V8TV4rT7CiRfnnEca8BAUfw7SU5jzCo78Hfo/3F3+rMGKbXfzNDXzGu0Ashs0m3fqSNTtn1hUla9d+CHd0Fy2trGAYVk4TWLo52aePIGtIdln+DM5n+JFw5mtb9+dkSfxDbiO8/dSnzzdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284693; c=relaxed/simple; bh=XvF3onmWBMWQWugNW8Z1iLXXDxXiy19uPxMTn7rLCYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d6wreatQygo7jHrQWIXFTbmsHqlgFjBjE5dz5RFHEEHpLiq2Sn7WUl5mTaoi6qdqa1/dcTRIJaxpSDYNvWbD2Uq+YiAgL4q285YOet8MHwEjUuQPZKRxxe03cI0Z8hfo4rqd0aF1kE7jThjYw3PgepiDRiWulYhySx4YifWj308= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d6dff70000001748-30-666af18dbc35 From: Honggyu Kim To: SeongJae Park , damon@lists.linux.dev Cc: Andrew Morton , Masami Hiramatsu , Mathieu Desnoyers , Steven Rostedt , Gregory Price , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, 42.hyeyoo@gmail.com, art.jeongseob@gmail.com, kernel_team@skhynix.com, Honggyu Kim Subject: [PATCH 2/8] mm: rename alloc_demote_folio to alloc_migrate_folio Date: Thu, 13 Jun 2024 22:17:33 +0900 Message-ID: <20240613131741.513-3-honggyu.kim@sk.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20240613131741.513-1-honggyu.kim@sk.com> References: <20240613131741.513-1-honggyu.kim@sk.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsXC9ZZnkW7vx6w0gzXXZCwm9hhYzFm/hs3i /oPX7BZP/v9mtWhoesRicXnXHDaLe2v+s1ocWX+WxWLz2TPMFouXq1ns63jAZHH46xsmBx6P paffsHnsnHWX3aNl3y12j02rOtk8Nn2axO5xYsZvFo8Xm2cyemz8+J/d4/MmuQDOKC6blNSc zLLUIn27BK6Ml4u7WQvu8VXc3fiarYFxDU8XIyeHhICJxNktB5hh7MdnFrGD2GwCahJXXk5i 6mLk4BARsJKYtiO2i5GLg1lgA7PEpHMvmEBqhAU8JRov94HVswioSixb2Aw2h1fAVOL+t5Us EDM1JR5v/wlWwylgJrHu231GEFsIqKbj/zOoekGJkzOfgNUzC8hLNG+dDXXPczaJ0/+MIGxJ iYMrbrBMYOSfhaRlFpKWBYxMqxiFMvPKchMzc0z0MirzMiv0kvNzNzECY2BZ7Z/oHYyfLgQf YhTgYFTi4fV4lpUmxJpYVlyZe4hRgoNZSYR31kKgEG9KYmVValF+fFFpTmrxIUZpDhYlcV6j b+UpQgLpiSWp2ampBalFMFkmDk6pBsaYmXzCRzMbSz63NCgZpNjkaOsou3aX2HtqSy2ZVenY qMbsa+WRJKVhGHjdctIUi3WlFpNkp/j5d/htVp9ikLg20Sv+cpqQz6xnyxLkv5n2z7Y04jn/ v/Xf43VHZKKm7RUy/FF8uDRx3noV+VvFRb/4lmRksTYsmng9v/9h9eL5u7b9sAuercRSnJFo qMVcVJwIAPglvkF9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsXCNUNLT7f3Y1aawYlz3BYTewws5qxfw2Zx /8Frdosn/3+zWjQ0PWKx+PzsNbPF4bknWS0u75rDZnFvzX9WiyPrz7JYbD57htli8XI1i30d D5gsDn99w+TA57H09Bs2j52z7rJ7tOy7xe6xaVUnm8emT5PYPU7M+M3i8WLzTEaPjR//s3t8 u+3hsfjFByaPz5vkArijuGxSUnMyy1KL9O0SuDJeLu5mLbjHV3F342u2BsY1PF2MnBwSAiYS j88sYgex2QTUJK68nMTUxcjBISJgJTFtR2wXIxcHs8AGZolJ514wgdQIC3hKNF7uA6tnEVCV WLawmRnE5hUwlbj/bSULxExNicfbf4LVcAqYSaz7dp8RxBYCqun4/wyqXlDi5MwnYPXMAvIS zVtnM09g5JmFJDULSWoBI9MqRpHMvLLcxMwcU73i7IzKvMwKveT83E2MwCBfVvtn4g7GL5fd DzEKcDAq8fB6PMtKE2JNLCuuzD3EKMHBrCTCO2shUIg3JbGyKrUoP76oNCe1+BCjNAeLkjiv V3hqgpBAemJJanZqakFqEUyWiYNTqoExy3Iyi+vNoHLmLeGyyTmWH7Y/d1wb8jc0eNaSpR7X nz+dG+FeOHHHv8KlU5T2fTNbvs88wOZW86wYlksbczL23fnCMF2SbZeZ3X6Ju9ohvstMdp/e 7bbz3l0LQSfN0x2Ox5ZVhhY2hv62jZQT/nimQIVr9/GHZ1lrde9oXmTbw26gcFzK5d5uJZbi jERDLeai4kQAO1n+524CAAA= X-CFilter-Loop: Reflected The alloc_demote_folio can also be used for general migration including both demotion and promotion so it'd be better to rename it from alloc_demote_folio to alloc_migrate_folio. Signed-off-by: Honggyu Kim --- mm/internal.h | 2 +- mm/vmscan.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index b3ca996a4efc..9f967842f636 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1052,7 +1052,7 @@ extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long, unsigned long, unsigned long); extern void set_pageblock_order(void); -struct folio *alloc_demote_folio(struct folio *src, unsigned long private); +struct folio *alloc_migrate_folio(struct folio *src, unsigned long private); unsigned long reclaim_pages(struct list_head *folio_list); unsigned int reclaim_clean_pages_from_list(struct zone *zone, struct list_head *folio_list); diff --git a/mm/vmscan.c b/mm/vmscan.c index 2f4406872f43..f5414b101909 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -916,7 +916,7 @@ static void folio_check_dirty_writeback(struct folio *folio, mapping->a_ops->is_dirty_writeback(folio, dirty, writeback); } -struct folio *alloc_demote_folio(struct folio *src, unsigned long private) +struct folio *alloc_migrate_folio(struct folio *src, unsigned long private) { struct folio *dst; nodemask_t *allowed_mask; @@ -979,7 +979,7 @@ static unsigned int demote_folio_list(struct list_head *demote_folios, node_get_allowed_targets(pgdat, &allowed_mask); /* Demotion ignores all cpuset and mempolicy settings */ - migrate_pages(demote_folios, alloc_demote_folio, NULL, + migrate_pages(demote_folios, alloc_migrate_folio, NULL, (unsigned long)&mtc, MIGRATE_ASYNC, MR_DEMOTION, &nr_succeeded); -- 2.34.1