From mboxrd@z Thu Jan 1 00:00:00 1970 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 1BA4CC5B543 for ; Wed, 4 Jun 2025 09:55:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A92E48D000D; Wed, 4 Jun 2025 05:55:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6AD18D0007; Wed, 4 Jun 2025 05:55:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9809A8D000D; Wed, 4 Jun 2025 05:55:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7A2178D0007 for ; Wed, 4 Jun 2025 05:55:50 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0C010160DD1 for ; Wed, 4 Jun 2025 09:55:50 +0000 (UTC) X-FDA: 83517261660.24.472F059 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by imf03.hostedemail.com (Postfix) with ESMTP id 5144820005 for ; Wed, 4 Jun 2025 09:55:46 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="er/OM2G+"; spf=pass (imf03.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.33 as permitted sender) smtp.mailfrom=hyesoo.yu@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749030948; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oKuSv61Q4z7VjwtuTsGF4WxjYypPJLFFeAxEkBkW4r0=; b=5G04j549wb6AjaO/E2bCUtxSDw7NDaA8+yHwE+30p5T7WmluSB4rw28aFCKCHxk/D1R0c1 9+NWMeShH74EFNNc0CbfIYLOWFq3h52ZFa5TtWGvustUK+huKfdY79XlGjOGuTlTs6MdQ8 xY8MBHHAmPlT0uMmd4PCPX26bKaGXxQ= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="er/OM2G+"; spf=pass (imf03.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.33 as permitted sender) smtp.mailfrom=hyesoo.yu@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749030948; a=rsa-sha256; cv=none; b=6Ilv0FWqnVQ2P23F4V9/PlovNDr26j9W6rbGTl5nRb+OCNTtgVvM29DBNVAxw6OHn4cDkM C9fauaOcwwJltj8OC7dLnEqy3ITNbgAXizWhcYmRkEvswwlr+ZlqiBsWRQ6ccoTkGj/PwI iIS7h+B6oPQ3uwn21lgzZFXWRGP2D8Q= Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20250604095544epoutp03cc9f3b50d93b342bd6e58ba658722904~FzmCDoFeN2118121181epoutp03E for ; Wed, 4 Jun 2025 09:55:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20250604095544epoutp03cc9f3b50d93b342bd6e58ba658722904~FzmCDoFeN2118121181epoutp03E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1749030944; bh=oKuSv61Q4z7VjwtuTsGF4WxjYypPJLFFeAxEkBkW4r0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=er/OM2G+gPTMpnqou4Y+JFhxdDJL/YSHyO7DVd/Btw8JvMpNw3/X9tQpn6ZSt/gTd WBpFSoJeJQiR1DXfQUdFKHcnGQXJl4kGl0LPwXZ/l1KjGvFzL1m+5C4Vyk3MZb0gwq 9mzdpZJ9waP7F3xeOwRoFMqAotblSbRBxTtQf1CQ= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPS id 20250604095543epcas2p342c8571fe62b015e03364d19c53df965~FzmBfwsLa2447524475epcas2p3L; Wed, 4 Jun 2025 09:55:43 +0000 (GMT) Received: from epcas2p4.samsung.com (unknown [182.195.36.70]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4bC2yR0bL0z3hhT7; Wed, 4 Jun 2025 09:55:43 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20250604095542epcas2p3f3d2d6fc17115547981a7173215a09d1~FzmAU6QvD2448524485epcas2p3z; Wed, 4 Jun 2025 09:55:42 +0000 (GMT) Received: from tiffany (unknown [10.229.95.142]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20250604095542epsmtip13994485e7de2eb48b56062b122dc1c2b~FzmARwA-J0541405414epsmtip1h; Wed, 4 Jun 2025 09:55:42 +0000 (GMT) Date: Wed, 4 Jun 2025 18:53:54 +0900 From: Hyesoo Yu To: David Hildenbrand Cc: Zhaoyang Huang , jaewon31.kim@samsung.com, John Hubbard , "zhaoyang.huang@unisoc.com" , "surenb@google.com" , "Steve.Kang@unisoc.com" , Jaewon Kim , "linux-mm@kvack.org" , Jang-Hyuck Kim Subject: Re: reply: [RFC] pin_user_pages_fast failure count increased Message-ID: <20250604095354.GA4051972@tiffany> MIME-Version: 1.0 In-Reply-To: <060a72dd-5928-4e7b-bafd-534cbd95b748@redhat.com> X-CMS-MailID: 20250604095542epcas2p3f3d2d6fc17115547981a7173215a09d1 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_28bd2_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P cpgsPolicy: CPGSC10-234,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250604095542epcas2p3f3d2d6fc17115547981a7173215a09d1 References: <20250528012329.GA1545287@tiffany> <20250528033626.GA1607193@tiffany> <223cf8fc-7743-497f-893c-37ac689af002@redhat.com> <060a72dd-5928-4e7b-bafd-534cbd95b748@redhat.com> X-Stat-Signature: m7qs8cweds8fnuzg4nnyxbtyrogfsi7o X-Rspamd-Queue-Id: 5144820005 X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1749030946-575792 X-HE-Meta: U2FsdGVkX1+teAk9bZsB0vXMu5riSApJzuqg9Sfyu2ncXkNbDUfSYPoZRnCgYEOgJGvrA5PE31VG7exSw2zlNgUd6dQRwdTfHgybb8aZ0ChtmlZHY7A71AvItua7WzPCjb/fKgViQeqEdrYTMjS5zTcq7l1BBrjgF/wiVeoYyG4D2AnxPGiU/GOcwWnjmWa3y/wO85tokfYx33ViAxfIJDOflyoOchllXbHWZ8wRaFIhZuPoPTIy37NXvawmE2I/StPjxw3wbxhvV0Dz8SQf3mWuoGnbepSaw9woRndla5eYVhUAEmN4bb4+VKi4mwK752gPKf98sMAOjaiMdSc12/1T3w66hrgjdvsQZo2SFMo3hWNOEoIbchsFdErglhAbSg59I56ErqzatyAhOtlFgzA439YHxfU6nXMohDpkSStT+V9dzHhEN10VX5aS6/LDy3ghN/TqBG9ivqOLWEe6bv335K5VktmzNJ0gqlpvBj8n4f2514R7RkKA5x97n0cqtK46hcFsSZVvhtMnLVrR0cC5v47f+RLyaYyyNhj3/LZg2Wq69s2fLCUsmYb431m1OFggk+xLFpSpnCqcOKnEJPgem8z/MOTAn4yXeO/9vUGYeRPC6nLwx3lE43OSlKCicJYFVWjDz5ECugD5Hfe6D59HmC1r8O/0XM3u99xg0lrjYqSHRw41w73UtHais1DesfCtcncBakkDM8OuoK6V2JdXhZBaO95ltj9xErdNEqmzV4P6E6RX1uctyjDzMwXREEcfjIPq7r8Jvdb6Shw+zI0ldu24baYFRZdmlIJuIRLGDuw88nY1Eaq8ULC82LTRObC1dLkpyMp2XYOixtNoBoKt06V1Zb5z/CfmXRDEfg4keQgNjj1dp4oB88ru9DJ289G+s36ihZ6u0Y0XFOcZzYH8PJ9YLgdzevX9q7dbS1Qpf/c6YqPPrZyIy+G8DTp4G1qO+Ut3klTNR37HCST KNRQJTQE cH86klq0B1KSPob9JF2u12BDgUfyPzvhG8WobkEaAjMpmozKQmWAb1Y5zpPSIVk/vszhw1RLv4rt63VWQUckxNPhzDm5Z+XuaczAxA8MeBE/WRufk45PpuZ5TB45r2xsbYeq9RBPzH6LZ/AOzA1qoWfsPhf6ebwDwZtYxECkDBmUORcg7YxMkWGNTdh9ZZUy292oEakK3lNvxCqcI3Nf7k0KHAcNZxhCwWxFor9YFWw00jT9A/+we8ZTTR8D+bCPopbRd64VQaAb+xnN8d063CI8OQ1sexj/wLSHtuhOb76iSfwhHcmRL0Mx6gHTbvDFko4pI3XjmRnjeUALwEXDcrXW3smI1mVt8beFb 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: ------bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_28bd2_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Wed, Jun 04, 2025 at 11:48:54AM +0200, David Hildenbrand wrote: > > > > > > > > > > > So, what's the status of that? We should fix it upstream (*not* caring > > > > > about controversial out-of-tree pkvm issues). > > > > Leaving aside the pkvm issue, we should also care about the CMA pages > > > > mapping to VM by special driver which are intended to be long term > > > > pinned (actually they are fetched by cma_alloc and then mapped to VM > > > > instead of alloc_pages during normal page fault). > > > > > > Is there any such "special driver" in the tree? > > Not that I know of. However, pin_user_pages is exported symbol which > > could be used for ko, should we make it be capable of dealing with > > this scenario? > > We have the tendency to not go above and beyond of adding features that we > cannot even test without OOT drivers. > > Note that we export symbols so other in-tree drivers that are built as a > module can make use of them. > > > > > > > > Could we distinguish > > > > them by the patch below based on 1aaf8c122, that is, this kind of > > > > pages is not on page cache and have equaled refcnt to mapcount > > > > > > No, not like that. We'd need some proper indication that this page was > > > allocated by the CMA area owner, and that owner agrees that the folio > > > can be long-term pinned (maybe that agreement is by mapping it into user > > > space, tbd). > > I think the key point is to distinguish the cma pages which are > > allocated from fallback of GFP_MOVABLE during common page faults from > > the ones which got from cma_alloc within the special driver's > > vm_ops->fault. > > Yes. Using typed pages in the future might work. For now, this is not > possible yet because the page type overlays page->mapcount. > > Hm. > > > > > > > Will you send the fix or should I do it? Discussing about broken use > > > cases that do no apply upstream is not particularly helpful when we're > > > dealing with a real upstream bug. > > I would like to ask for your help on this since I have no further ideas. Thanks > > Okay, let me send a fix for the original commit. > I have prepared a patch and just sent it out. I'd appreciate it if you could take a look and share your feedback. Thanks, Regards. > -- > Cheers, > > David / dhildenb > > ------bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_28bd2_ Content-Type: text/plain; charset="utf-8" ------bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_28bd2_--