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 307D0C5AE59 for ; Thu, 5 Jun 2025 05:24:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C14C86B015B; Thu, 5 Jun 2025 01:24:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC58A6B015C; Thu, 5 Jun 2025 01:24:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ADB826B015E; Thu, 5 Jun 2025 01:24:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 889186B015B for ; Thu, 5 Jun 2025 01:24:05 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2601E5FC0D for ; Thu, 5 Jun 2025 05:24:05 +0000 (UTC) X-FDA: 83520205650.23.DAE7F9F Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf12.hostedemail.com (Postfix) with ESMTP id 880CC40003 for ; Thu, 5 Jun 2025 05:24:03 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=lNJRtVHh; dmarc=none; spf=pass (imf12.hostedemail.com: domain of akpm@linux-foundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749101043; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OGD/VqygOAwfNj57cMUibqiSTMSfUgNwIeHL5/daXrA=; b=71VttR50JCRnZccq03xs9ePiJFgGl5HoYQzz28SiMGBu6o49sktFKV4FOl5PVITIIEyqQ3 gGcnZMjr2zACPTQxcOxQSBJdbt6bd9ret+ECoSoxT3iUyIze16HiOaqeef5yRJbevzp63j PIR1AwCBRYgVNehBAyFYLHNIXV7OayQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749101043; a=rsa-sha256; cv=none; b=8Ey9cnze/2eRS8ZP7amtb/Aq8eDs4PpHcCSN/PG3LhSgukNMcyZSSS/kYMjNpZWBdLDOg0 o/dKgxNWU8E+kfY/kl70hCeOxVSoFm79XiNXzHUf/Pdfbu+bDp0X5nacVrF1MMDocxPrT3 UaKCQVXG4rba6C+9i4I5Pd+k6mVK3AQ= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=lNJRtVHh; dmarc=none; spf=pass (imf12.hostedemail.com: domain of akpm@linux-foundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 2FA6A44203; Thu, 5 Jun 2025 05:24:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3374C4CEE7; Thu, 5 Jun 2025 05:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1749101042; bh=CZDeq+zUBIlx9SSAEqsUxOQKyUy2jcu6QFtDsZAPNDg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lNJRtVHh2E+FGF5dlIa1C06EUkGQzCI7y5pQGEx4k+SHydyKQdn5R3hDv2g6ombH7 THOggm4mXRx6WsvFWE4RwYkYgW6z699GKFyNo0Dx5fb2EQDxdDz/2PyM1sx/zcrrtw tGwC3N0mLF8Di+4UvOJpY/2KgaAkGsCIE7cQhkv0= Date: Wed, 4 Jun 2025 22:24:00 -0700 From: Andrew Morton To: Hyesoo Yu Cc: janghyuck.kim@samsung.com, zhaoyang.huang@unisoc.com, jaewon31.kim@gmail.com, david@redhat.com, Jason Gunthorpe , John Hubbard , Peter Xu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm: gup: avoid CMA page pinning by retrying migration if no migratable page Message-Id: <20250604222400.63203f9b10ae5b4c25f6de0b@linux-foundation.org> In-Reply-To: <20250605051131.GA3407065@tiffany> References: <20250605033210.3184521-1-hyesoo.yu@samsung.com> <20250605033210.3184521-3-hyesoo.yu@samsung.com> <20250604204323.95a646ae67f6800069a11e36@linux-foundation.org> <20250605051131.GA3407065@tiffany> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 880CC40003 X-Stat-Signature: un6spn1m6sixbn4ombyde9bkb7t76mux X-Rspam-User: X-HE-Tag: 1749101043-415175 X-HE-Meta: U2FsdGVkX1+oqZHx1TahyIPwx0W7kg/aOo9cAmk+5p5emlTPSj04GBuT8ClhW8I0uA+xyb9i3scmyBtj5IQsBp87QHIIPVH72U83UdxparDmJBAgHP4injofK2z8q7zT8sVW3DIKsBaVhhhrnF6X1nR/eCKHBJehS3PP1IacGFb/8nCWjSDt6Dap6m2t4bZbn5tHbr43Zw3/YqEBFWC99SvtwRRPY6LrusVneCU6gigmdZ1kA0juvKsM69Q7iSxduqyFHsIEp/lahrSSkXIhopi2j/Vjgcj1jQJI6NrGaQm93BAVmR1nCgYn3hzXbps4dbxD4efc0A4ucV4dSBYpPIE/nT4dISS2r1Uy5mRXXC3B+OKpHVJfqXj0oRH9yLPm6APfg8FNDYzEUfRdDRD6rrwwU74crnpeQT7gw0kqbORMjJdo1vy7QzpIj0VbcueXVqEZkbCl2ffUdxNW5QOYpnGxH8rhLno9Z4ObP35kgR7uwcPmpKRapkCmAAjrQ8kgmgPfWcqhhCq75ucv6zGAQwu4UONfFI7FE5Xgy3Xe3QzHEoleLynSkVm3oNX//q8UAgTR2m4G0IndmgY7vXdAx8xKhORKv16MfJAzpLir39TRQxMZt/76DNEJI5mXgsBx4ZNVZ/jryVUauliU90u4JlizEMT2TFOYO+0gguqqR3rFLdW8Nx+MbL6qX7wPitwszc636zP2rR4BLD6pnuW2AhTrWYQFV90gnWx5qrFo3DmASKuWWohm7GYpBmU+9AhkycFLZGGPpaRuTiNDXFSdL6bH1B2ys0pnWiaJYloaQRBck744q35+Z/UyNsO6MQbspZkvGE9SRKk+C75cac7MWPPPhLgTTOs6m4F2ujbzTnDRwjfL7wSUtYQdM/BFHRtqElahPypN7a8rAtoniF3AqAu9+tBpGAbCCw9t4EYdsVjAFMQjBJE80Cnzs8L0v9YoaHnCjgMGSdey6/YAXUq Zj8e/o5r WMzbeC0L8K1WQ7undpx8tJyHALQ== 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: On Thu, 5 Jun 2025 14:11:31 +0900 Hyesoo Yu wrote: > We have confirmed that this regression causes CMA pages to be pinned > in our kernel 6.12-based environment. > > In addition to CMA allocation failures, we also observed GUP longterm > failures in cases where the same VMA was accessed repeatedly. > > Specifically, the first GUP longterm call would pin a CMA page, and a second > call on the same region would fail the migration due to the cma page already > being pinned. > > After reverting commit 1aaf8c122918, the issue no longer reproduced. > > Therefore, this fix is important to ensure reliable behavior of GUP longterm > and CMA-backed memory, and should be backported to stable. Great, thanks. Please add this to the patch's changelog. The problem is, this series combines a non-urgent cleanup with an important, backportable regression fix. We shouldn't backport the cleanup into earlier kernels - that just adds undesirable noise. So can I ask you to prepare a single standalone fix for the regression against current -linus and to later propose the cleanup patch for 6.17-rc1? In other words, pleas reverse the patching order, send the patches separately and test the regression fix without the presence of the cleanup? (I could do these manipulations locally but then what I have for the regression fix wasn't standalone tested by yourself). Thanks.