Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp547710lqs; Thu, 13 Jun 2024 20:00:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWY4RJTTehVUARlZQKgJunyqWYbwI3DjGjGZO1wZHgD00maox7skxbQG51Vy89AOeM2Jc1N55GPXWCDGzKJp/qEQZhKxarhkhsFssrnxQ== X-Google-Smtp-Source: AGHT+IHF1+Sm+GJ1HzI7VVJ80qNxGAqrQfuwfrHu6hb/xrikryqHUObbVHghlrx6UneG4R9Rsh40 X-Received: by 2002:a50:9e43:0:b0:57c:60e8:c519 with SMTP id 4fb4d7f45d1cf-57cbd682d07mr1003595a12.16.1718334031775; Thu, 13 Jun 2024 20:00:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718334031; cv=pass; d=google.com; s=arc-20160816; b=oxyYIwdNm4/PeBIhluYunWNpPjSxHYNGo2evqgra3atFoCZd6MRnI6ddzsGiw5ywIK 0jVmVKxtgCYdoVMpS+oMyLx9eGq6Y+RU/c49C2OVijImvUAv9ZurQ4LaIhd1Fgo2rKdx 4wGCcXoh6GFJgeZhGcUcU7bdqHwyoOQASaZ3SBtBtMtaI+Xq09semKsCQjtABPGDVfW7 LSyJkDoiRlhORWpgQ+bRiwDaNwzpiJGWb8dFaI4wlaGpByx5elpOCISy6b26DCnZcDh8 Jr99TaXUcLIevWCYt5Ou0FstFEOLypKshA9yJw6YNP8DypAnzyYKUHfX29B0AuDv6z1N E8uw== 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=mee8OxeH0bTQZXwpqicfeLf4q1xsUANAbVORqYYURd2KnKR53TSyvRkfQH0q/mb0BW /ckp3B8BApf54iiWh3VZna7mqs8/cFn5HDNwG/iOA5ul2ZdPn4Mu0YENa6jbysfnUL9m Q255Ggec0cq0c9WsyBBTLSwrx29RpU4Q1hfdo6s6gGCWpmB63hOxtiMVRVvRjkN3gLpu eTLT0oxV5ECg8GSRr0rXEFPj1eeYP2nv6kkTf5bJFyl/xGdqZAtikrE4dgp0e0mtxeEm MeaQrPylfCBYxW4y5MOr0klfy7ZwcBwQlMCGalv/omRRPe1H4JQIC+MRrHTYkRPMRA/s OTqw==; 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-214278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214278-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb742c982si1323596a12.214.2024.06.13.20.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 20:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-214278-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214278-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 7837C1F23B7C for ; Fri, 14 Jun 2024 03:00:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C766A1836E2; Fri, 14 Jun 2024 03:00:23 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36D2314533F; Fri, 14 Jun 2024 03:00:19 +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=1718334023; cv=none; b=D+E9aqw+LkOWawf0t5G/wUJpXSikOKzGTKnyn6swUIMOAHKzFwrEjY/fCM+qxSfivy8lg4B1Qf619rEZFQBvtpAYRXkdzxoT4CyIWIqclQIa2tN784wHDA2NuLZwN3TI5eOWlxdp7/KwTouWi/nQ9hCP47Rlkx2MilR6F1ECPRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718334023; c=relaxed/simple; bh=zH9/26bCnqQ1D4kgrGaATCsRHHQL0Yv8+lKkx1Ua+NQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N4+HLK/WcWzsd3WYPcdgiKA+rgQvXZepmk4ZgJPH+tOjtMSdlnKdwyk7KInZETn9BdrtcaMJEDIVMyBTzaVqD7iW7VVqAwl4n60zXwchGetfP4W5nJ8F7x/c34rts3w6k9rxxr8anJ6uxuVCs6Z8MfsyQXR14SiTVyMb1d72Zaw= 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-d85ff70000001748-2a-666bb2426825 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 v6 1/7] mm: make alloc_demote_folio externally invokable for migration Date: Fri, 14 Jun 2024 12:00:03 +0900 Message-ID: <20240614030010.751-2-honggyu.kim@sk.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20240614030010.751-1-honggyu.kim@sk.com> References: <20240614030010.751-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+NgFnrFLMWRmVeSWpSXmKPExsXC9ZZnka7Tpuw0g0V3eS0m9hhYzFm/hs3i /oPX7BZP/v9mtWhoesRicXnXHDaLe2v+s1ocWX+WxWLz2TPMFouXq1ns63jAZHH46xsmBx6P paffsHnsnHWX3aNl3y12j02rOtk8Nn2axO5xYsZvFo8Xm2cyemz8+J/d4/MmuQDOKC6blNSc zLLUIn27BK6MKacPMhd0clf8nbqavYFxPmcXIyeHhICJxM7Zz5hg7BsT/rCC2GwCahJXXk4C inNwiAhYSUzbEdvFyMXBLLCBWWLSuRdg9cICYRIrNq4Eq2ERUJV4NzEZJMwrYCrxbMFZqJGa Eo+3/2QHsTkFzCSmH7sHFhcCqrlwZSsTRL2gxMmZT1hAbGYBeYnmrbOZQXZJCDxnk/i8/R3U IEmJgytusExg5J+FpGcWkp4FjEyrGIUy88pyEzNzTPQyKvMyK/SS83M3MQJjYFntn+gdjJ8u BB9iFOBgVOLh9XiWlSbEmlhWXJl7iFGCg1lJhHfWQqAQb0piZVVqUX58UWlOavEhRmkOFiVx XqNv5SlCAumJJanZqakFqUUwWSYOTqkGxmV6skvDt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mscan.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