From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F209D18A6A8 for ; Thu, 16 Jan 2025 22:51:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737067908; cv=none; b=fyyuanDwkYA7TMr7tA/uaXjXEAgUcLC2fgM7jU8ajuCUVGNYe8wZSeDcEKewPZJqBDdufdsItyAEy3mIn+2ndA5kT8mzkdJJXMKdSHjPXRQ9SxVjytVl3trbo9zO2TGDdYqfs1mEjWxg0wEbzQBsSKAe42Oygggmk96AAq4WYgI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737067908; c=relaxed/simple; bh=UHtiTDd6xaQRfIgQ57YquWqcElaI32LJCbCLPDMS3jQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FXrUuvKMt/p7wVRJxyefkX7ggu8GHLKwlrD3EAcf135PUM4KMq/eq0Yfx/jJR6LM/Yh2PwBGWJRunw78FoCvInC5Jdu8zt0f6OwxpFrZ8iRfn2/zrq/UiDMlZHjEIgCDIMkYKoUTaTp1Z1WXf+0dtF3w1jzIiDCgdZzN9KBL3QY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wf+7EXGV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wf+7EXGV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77550C4CED6; Thu, 16 Jan 2025 22:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737067907; bh=UHtiTDd6xaQRfIgQ57YquWqcElaI32LJCbCLPDMS3jQ=; h=From:To:Cc:Subject:Date:From; b=Wf+7EXGVxByE81NPI+mS3saroji8sENNnWGl+7OcH0pNIBo+B6eeueg1LOT1OHEWN 197c5Xby4hhfpm5bdqj3jw/eSfyjMC6eDtmWAx7T5Rrwg2NWMYoTBYv8A4dsTEaUkT 4nNB5yuQZjGSR+1VSXvSGpbM+YrYMkZJUFO7+I12atYudLDE04kFVYKzq3Fbdgqo1k DiPJ2JBDBLMKP3Db8h2r6SdEDiLOBPs5BDOJyzGmN1r1HZF/NdA6RJZzrEY/2EHMjI lOms0FRKTzbZ3vN6mTJfuIbhSyteTGZ3hEpi+WSeGWd/BEbYrS2SEB+ofubqwlipfH z27x371iIdsQA== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 0/2 v5 RESEND] add ioctl/sysfs to donate file-backed pages Date: Thu, 16 Jan 2025 22:51:05 +0000 Message-ID: <20250116225143.2208852-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.48.0.rc2.279.g1de40edade-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If users clearly know which file-backed pages to reclaim in system view, they can use this ioctl() to register in advance and reclaim all at once later. Change log from v4: - fix range handling Change log from v3: - cover partial range Change log from v2: - add more boundary checks - de-register the range, if len is zero Jaegeuk Kim (2): f2fs: register inodes which is able to donate pages f2fs: add a sysfs entry to request donate file-backed pages Documentation/ABI/testing/sysfs-fs-f2fs | 7 +++ fs/f2fs/debug.c | 3 ++ fs/f2fs/f2fs.h | 14 +++++- fs/f2fs/file.c | 65 +++++++++++++++++++++++++ fs/f2fs/inode.c | 14 ++++++ fs/f2fs/shrinker.c | 27 ++++++++++ fs/f2fs/super.c | 1 + fs/f2fs/sysfs.c | 8 +++ include/uapi/linux/f2fs.h | 7 +++ 9 files changed, 145 insertions(+), 1 deletion(-) -- 2.48.0.rc2.279.g1de40edade-goog