From patchwork Thu Dec 19 18:37:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13915519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEC97E7718A for ; Thu, 19 Dec 2024 18:38:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F5716B007B; Thu, 19 Dec 2024 13:38:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A5536B0082; Thu, 19 Dec 2024 13:38:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 094156B0083; Thu, 19 Dec 2024 13:38:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id DE83F6B007B for ; Thu, 19 Dec 2024 13:38:16 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 89780C01C8 for ; Thu, 19 Dec 2024 18:38:16 +0000 (UTC) X-FDA: 82912566996.01.E8D138E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id A5D59140018 for ; Thu, 19 Dec 2024 18:37:49 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=blZtwZn4; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734633479; a=rsa-sha256; cv=none; b=XGEBlcqrwGxxyvzX+nDzENhKh/lUNo5rjzKAPouemL2OcoKzdAdHYyRRirftxe73Z3iVwl li2mclphUgly1kCLiWe86x5BFFOBJx9tk+TccMk+Plaxyo9qjcOmi8h4yUDm0BuvEKedgW jtDGHfqGnHDV2whMzM4HxW0ZGlBJkp0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=blZtwZn4; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734633479; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=dM3pFhYQNscXGJym6fbeXXTT/XLQpGf/EZqu1zrgGa0=; b=F2aX2PHo6mIB2EC7SMOedPnapDGhr9nxLjgVaiFyUMewzHoBNphYvl5NqW2dMyrDO7o87q srkD+bIkyvsN1gCRlGBVrysuXaM0/oOCDREqIlqH37U+JYikmTGfYasFmR5/aUZE0V6P33 YJrVr4l6YTFOnDok2dkh6z8YIPkTBXQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 088885C6260; Thu, 19 Dec 2024 18:37:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C541C4CED0; Thu, 19 Dec 2024 18:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734633493; bh=AinezoE30M/6qvvfLweOvIkk+vvNTOtlQBV9j6TFnG0=; h=From:To:Cc:Subject:Date:From; b=blZtwZn4IwZf6P9w1o5xqcbGYsyk9Kmh3vwbKmewNPsZVadDvt2mLBle7nT+aoVsC dD3nlNAp8YnFFbSsZn4fBKWh1s/w22bwkg5E0hnl6/lnB61doBiK9Ej7WNvBOBhUQs EEgsggZ1zoMJG6Ov4rQi5+WcFITaR3tdRZ6iGSE+0whF56U8IOZ5VvVAYjSSxEIjX0 mkJpNhx0eASBo8UMyAIi2G54poPZe2TZvcp0DCQ/Y5JcpGJOQKKgsm8epq/ve8I6Hx b4O6bSKkR0pf+V1jmV/FdOYYyWNSwa6aNgoFEwqRiR+EvOl/1au0ZorBvZKxdQ9aSm 9Pzm/yglEnBJQ== From: SeongJae Park To: yangge , Andrew Morton Cc: SeongJae Park , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH mm-unstable] mm/hugetlb: define replace_free_hugepage_folios() on CONFIG_HUGETLB_PAGE=n as static inline Date: Thu, 19 Dec 2024 10:37:53 -0800 Message-Id: <20241219183753.62922-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A5D59140018 X-Stat-Signature: 3t1a7gfnnhtywe8ny3wurkccdyts4jsq X-HE-Tag: 1734633469-669680 X-HE-Meta: U2FsdGVkX18FDGjsgQ3/VE3ICAq2vZU9Sum8M7WktdJy/grfbTBnNMpqa2wSgxvj4aMErinZSRuACla0dF1MrGeuIUitY6p52azLZgEf9AqfZv86K2490ILaNTbcv5iUVIEgAxiYOTZaJabq0Y3rmy2hV0kDVHve211tnFtPA+pRxcShUbp//mAXi0TxxioGgNFb0QxebRyykx0bVKM6HiVFsq0pb9o+A/Fs+JIwr59Z/UgW8vdjtBmF7EtaIzK3DcZgxFnN2u6D9DLJCOSDuWqtAB6efYsUelBhuJNitGCwbZmMxkKWMgo+WoPZVbGEtwUpfwiGUsgU0sK+zWgxWdpudLy6IyVjgZvk0KjhXQWp+V42HxW5Gf69lF8VNoG2KU/RYE7Vj9ZZEwPp/NPdqiuJnUYNhNtZU1As1lUwAZ/vcRB4Xbu9q636QCqA5xP04CmD/3bS4ePdzj/s6QBu9SKBSbHFPmsUBDHM4N0KrKhb4ajV4P34gVrznoK+xm9hT5i7iaWEkZYpZbT2a7pnI2dII2VglzRC2ZxUBsgA3HhiHjFbmMVWl8PMvXcHyuq0z7xTaHq1EFAc8Wi3uqbFFeDBlNC3HvIvP0vakNi2FqWSDzwNVkdg1ulepfeAbhBIuB/uoD44YojIgYMrXt/n6BtvaGZDQ7OiP3gQhUs3lRdPESL0adNAnPiluhkAtEZGU2/T4sIagNy/kF4kB4oJkwoJq2q4exv8w5G2kcGyxrxwX4Fb6598tqgaulAEm1sCsEZzZ6P845Howk+5UYPYqgV+CpCEDZIkQICpJWfFQLGCEylTDLOn11MQ7ydlkCdHg1Sa52u6ftE1Fc9rVNd9MPT+FHoEKaW7+vLdYrFoPfaWqz3BJB6H46Rh4Csg0WboNCj9vSvWEx4KRD7nU8mvwRC55LcidLKzfgIZnvwORxrElgSdYcBdyjsYPDfQ3CQVe97K5NQ/KYFzzC6Wq/o zlppxFWp aSS4cLKOxxzp46oRAzNEpE20AkCRJIPMdDKtXsg/ViT1JqGShLUnGmRcqc/n/QXcWhkeaM0Cr6B0gVrHweOo3CISu0+HEWonxey82du7un5MDWve5Igxl0Gy0NFcp7EBinlZDIpznJGZcUAmtfMGdSqQARdllezZ2QDXh3s4/Z1N1/YdA6CkfG1P1v5kmBSa/lrwTwo6gEtib/CG1CZOifON286nZQHXbkQSCJiM7c+h3aNHbXFKWPIA/uczH3ZJcFQOm33NwMHR0sh4+ftOHWvMlkIbtL6UR+QC4mtxeiG7yU2ESO3D7irrm4q9JE5zvzSsRB+sNxYBPwyPEikAnJhnSqg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit fba5261e0039 ("mm: replace free hugepage folios after migration") on mm-unstable that also available at https://lkml.kernel.org/r/1734503588-16254-1-git-send-email-yangge1116@126.com breaks build when CONFIG_HUGETLB_PAGE=n as below, since replace_free_hugepage_folios() is defined on the header as non-inline. Fix it. ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests --build_dir ../kunit.out [...] ld: io_uring/rsrc.o: in function `replace_free_hugepage_folios': rsrc.c:(.text+0x160): multiple definition of `replace_free_hugepage_folios'; kernel/fork.o:fork.c:(.text+0xc30): first defined here [...] make: *** [Makefile:251: __sub-make] Error 2 Fixes: fba5261e0039 ("mm: replace free hugepage folios after migration") Signed-off-by: SeongJae Park --- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 7d36ac8df97f..10faf42ca96a 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -1060,7 +1060,8 @@ static inline int isolate_or_dissolve_huge_page(struct page *page, return -ENOMEM; } -int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn) +static inline int replace_free_hugepage_folios(unsigned long start_pfn, + unsigned long end_pfn) { return 0; }