Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp140813lqs; Thu, 13 Jun 2024 06:22:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWWUwUY98JGfcx7/MZRfxNMUi2gkRAQUKXEUi7PZq2r9B3CyxuDOfuA++pL7FPRODH/+9yO0bJmG14Ze5dyCvrd2AJD086Irb/V1fyxw== X-Google-Smtp-Source: AGHT+IEXipPzmpsVzLHb4gWlf694/m8dztqFLtqjXyv0NaalZAQUSSGKeVu00s6ZZvuapbDKGiaE X-Received: by 2002:a17:906:c795:b0:a6f:4bc1:276d with SMTP id a640c23a62f3a-a6f4bc127ffmr275047966b.12.1718284925900; Thu, 13 Jun 2024 06:22:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718284925; cv=pass; d=google.com; s=arc-20160816; b=WscgXC17FJl/kYKJPiCSAsV7rSPacPA9RezEv6z40nanzh+ZbpEWH0ucu5NRzhj8La 31MGrhxgzPocaX1kCQm86PrSeZywoPQWHDUGU8KuQhtIcRnrZLB3dBMNC0Xgg9yyO86U 2eQqmtcvdYoSd0IZtjaKIWnpst7nFyBaVV3au/HvJ+LkxTkSC0flEfv1DDZVqrP5cTRm rpE6ktSQnVReF/QcTJ6Xw/Oc+iv7OdvlC8mQN0KoKeOutsnuYApLzNbxqjiZtmbi41C/ dK52+yxoRJ4Ee0HdTHzlU49AG60bjNzrCbjVKXXk2V4+0O0ZieXmXI4IUA1kpeo+kdFf uHAg== 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=Rl5E73uGRRcKTVvOfVp8xwFRVoPsVjC9ryzV00Kphw8=; fh=3neK+uwM3aj45LO7wtdYM3yjEndz5CATkfR1g3LvkT4=; b=BKbPQEqcuC6pab4th6mr29oIK26EcXn81Qa3sgKAri3yLcKKnAyQZoyTt/vzPXqSMY s5b5dRxsZh0PhO6dTfwGN/kMhCJNvc7Tcz429bgH3EIHMMeHuk4qFUAycRL/+Kun9t3h 1pCznsCTprxg3ClapxkfLBmAlVs1JmaUDLC6Zq7lJvQRvgNfi8in1yzfDmcWTXrckhv9 cdIZLYbKyX+ZYzwpV2y91d8Nkb9rhjz20PFDz+CwONiRTGS0cBQRiMQPoen2ECzKQzJO lg3CFyzOXYtekIbCFV02OlwoWwryfW5KsTxBPY2Z/EG8yz9gkOd3Z/1za3hgRETKcoEJ jGqw==; 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-213292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213292-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 a640c23a62f3a-a6f56dd6051si69686766b.303.2024.06.13.06.22.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:22:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213292-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-213292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213292-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 2B5711F21B25 for ; Thu, 13 Jun 2024 13:22:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45BD7145A11; Thu, 13 Jun 2024 13:21:15 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB57D1448DD; Thu, 13 Jun 2024 13:21:12 +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=1718284874; cv=none; b=fhkfh+9B9n9AmIVdl646oQIW3SRpBrKxwrvqXJNcsdBhypMzyZaOiGxUSndhtQL8SWuD1m5VTz29KwvWyhimK1NHNjJ2cx5ZcmC31+AmiOfL9cNsC43Mh4GBO5oH+luHf8FJxoElm97PYwhYAHC7xkhX7KbxH8s3X3ZYAypwY1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284874; c=relaxed/simple; bh=zH9/26bCnqQ1D4kgrGaATCsRHHQL0Yv8+lKkx1Ua+NQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kc78AY/dDtlDa2oX/CYSGFqWT+M/MyIG9/NBtFyu1c68zSkopzBSWQfDbPKSuWQMFeki6jqy4NnML8jxyPY60cbXAvU7sdcA6cvHmGNeKJ5bLVYAN8rKTieDosX13QLs4wnXNdds5BclVqOjj9Z4Kw4bmk0m75dI7050VED5Gq4= 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-39-666af2465f9e 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 v5 1/8] mm: make alloc_demote_folio externally invokable for migration Date: Thu, 13 Jun 2024 22:20:48 +0900 Message-ID: <20240613132056.608-2-honggyu.kim@sk.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20240613132056.608-1-honggyu.kim@sk.com> References: <20240613132056.608-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+NgFnrFLMWRmVeSWpSXmKPExsXC9ZZnoa7bp6w0gz9t2hYTewws5qxfw2Zx /8Frdosn/3+zWjQ0PWKxuLxrDpvFvTX/WS2OrD/LYrH57Blmi8XL1Sz2dTxgsjj89Q2TA4/H 0tNv2Dx2zrrL7tGy7xa7x6ZVnWwemz5NYvc4MeM3i8eLzTMZPTZ+/M/u8XmTXABnFJdNSmpO Zllqkb5dAlfGlNMHmQs6uSv+Tl3N3sA4n7OLkZNDQsBEYsG+LkYYu3n+AVYQm01ATeLKy0lM XYwcHCICVhLTdsR2MXJxMAtsYJaYdO4FE0iNsECYxP2rq8B6WQRUJZbfeMUGUs8rYCrxdW4A xEhNicfbf7KD2JwCZhKP5oKUcHIIAZXM+HGVGcTmFRCUODnzCQuIzSwgL9G8dTYzyC4Jgdds Eht+bYC6TVLi4IobLBMY+Wch6ZmFpGcBI9MqRqHMvLLcxMwcE72MyrzMCr3k/NxNjMAYWFb7 J3oH46cLwYcYBTgYlXh4PZ5lpQmxJpYVV+YeYpTgYFYS4Z21ECjEm5JYWZValB9fV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Qy3mouJEAAuC0cFtAgAA X-CFilter-Loop: Reflected The alloc_demote_folio can be used out of vmscan.c so it'd be better to remove static keyword from it. Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park --- mm/internal.h | 1 + mm/vmscan.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index b2c75b12014e..b3ca996a4efc 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1052,6 +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); 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 2e34de9cd0d4..2f4406872f43 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -916,8 +916,7 @@ static void folio_check_dirty_writeback(struct folio *folio, mapping->a_ops->is_dirty_writeback(folio, dirty, writeback); } -static struct folio *alloc_demote_folio(struct folio *src, - unsigned long private) +struct folio *alloc_demote_folio(struct folio *src, unsigned long private) { struct folio *dst; nodemask_t *allowed_mask; -- 2.34.1