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 37CBBC5B543 for ; Thu, 5 Jun 2025 07:01:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD0226B00CA; Thu, 5 Jun 2025 03:01:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA7616B00CB; Thu, 5 Jun 2025 03:01:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BD956B00CC; Thu, 5 Jun 2025 03:01:56 -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 7C8A66B00CA for ; Thu, 5 Jun 2025 03:01:56 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F2CA3121AF0 for ; Thu, 5 Jun 2025 07:01:55 +0000 (UTC) X-FDA: 83520452190.14.BF6959B Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 22161C000E for ; Thu, 5 Jun 2025 07:01:52 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=YlLpWaYF; spf=pass (imf10.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.34 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=1749106914; 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=juWpwMCYYA8ie+48ojJr38xgptZSqgOPV6ZW7qY+lwk=; b=oFc/hBsZSIjMYEZ76ul6Zu93CNuHWJ3ULSyAQIE9y4Vp4+mzEGRY6DMl0vn7rL/RG+MW++ zYA5gmmqgRA20nlvW/d+z/3XdCYVPaNOpVTRlIzuElpFpVbJWmQmgTwrww/kR0h2zbn8TI +rAL7o5bE31I4c1weOv/WWtFR9qY+g0= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=YlLpWaYF; spf=pass (imf10.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.34 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=1749106914; a=rsa-sha256; cv=none; b=gj4jW0qrC8Jkgx7FXrcsyoMO8JW2UXXPUZ0d/CQEAC/u+nmz72DDtzZcyzcgE/eS+P4fjT 6zopU9vF4GodaQ5bYW43ZSkAZYh89JpROHcv7PJ2myoa9XpYYlV0Jv9u38kKkzCYASzIdo Ll1pBv02OGxwvzTzVHXfPjMTNCm+Zno= Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20250605070149epoutp04d67cb0edb73dcc5132cfbae37fc23a61~GE3eafN6i1907519075epoutp04k for ; Thu, 5 Jun 2025 07:01:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20250605070149epoutp04d67cb0edb73dcc5132cfbae37fc23a61~GE3eafN6i1907519075epoutp04k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1749106909; bh=juWpwMCYYA8ie+48ojJr38xgptZSqgOPV6ZW7qY+lwk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YlLpWaYFfCe4vauaYh0dYgf/8ZzfCf2INW443F9trN082QaDRkfxM1XhSmeYsL5bU tzJRc0dyzT517W58/ciSyjlr6Cpm15yGUz1+Yf91gBsBUpOn5d9Dc3NTD0hp8sduxU ceTL/EViQO0JWv+k6KFt2GgvSouEDoUiXA734oLU= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPS id 20250605070149epcas2p3d0c1eb806235acac945eb32c3c6127e9~GE3d6wXbV2972529725epcas2p3n; Thu, 5 Jun 2025 07:01:49 +0000 (GMT) Received: from epcas2p4.samsung.com (unknown [182.195.36.92]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4bCb3J41bZz6B9mT; Thu, 5 Jun 2025 07:01:48 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20250605070147epcas2p3cafdf3d7a160ba01b763449873a3d2c4~GE3cgZ7_T2972529725epcas2p3g; Thu, 5 Jun 2025 07:01:47 +0000 (GMT) Received: from tiffany (unknown [10.229.95.142]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20250605070147epsmtip2db1c635974005d8dd679fbff9654e5e7~GE3ccv0Jr2418224182epsmtip28; Thu, 5 Jun 2025 07:01:47 +0000 (GMT) Date: Thu, 5 Jun 2025 15:59:59 +0900 From: Hyesoo Yu To: Andrew Morton 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: <20250605065959.GA3678683@tiffany> MIME-Version: 1.0 In-Reply-To: <20250604222400.63203f9b10ae5b4c25f6de0b@linux-foundation.org> X-CMS-MailID: 20250605070147epcas2p3cafdf3d7a160ba01b763449873a3d2c4 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_3385f_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P cpgsPolicy: CPGSC10-234,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250605033432epcas2p4c024a9d05246b18c217f3562b3f53551 References: <20250605033210.3184521-1-hyesoo.yu@samsung.com> <20250605033210.3184521-3-hyesoo.yu@samsung.com> <20250604204323.95a646ae67f6800069a11e36@linux-foundation.org> <20250605051131.GA3407065@tiffany> <20250604222400.63203f9b10ae5b4c25f6de0b@linux-foundation.org> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 22161C000E X-Stat-Signature: nj6am76mmu9tocwjd33pjwc9e84fe8fz X-Rspam-User: X-HE-Tag: 1749106912-520632 X-HE-Meta: U2FsdGVkX1986pb+ru0AFrLkddt1ulAtEV7OhzNGTih2kDer/EvgISAQaI2NFa5ehH89hRBWneokV4PuqKYRRl2/ZWRNtJnt5esUAoAhSXDDFYUbzho/kjqaKaYdpQ0mX9s1Py3FwuPQUE93483PSWNk32WrvEKi81XHzPBsJ/t/9UpP5s8Y0OHGoPVQYR52/krDGoxfU4CCDp8fN9PTcahsqMO5c1EU4oobBf9jJ51ZW4WFLzZ/bDhgn4o/fPpUgQYAi8tiUpxoLpJNP///Jb9XHaRk+IkNckPtW0w/0m2CHXH1VNb56wvD0XG86aEB54EFhYYc5O1yfT5CY0o4oOEriPI3AF2hdvIOonYqhVFGHJu5Y4rwtsrkGABtZxlnCR/0jBu2HxvCPUVvr+Fm5uE4feat/j/ygk/Ub1vA81St1A1DmTAIstirV0GQ+ZlJR8QsmwfrGGF56lZ7+ISw2Q5pytNywFs2BhWhbQ5RfZw9GQMZSG5b0jrg94ad/YhriLPpPW5wEqDM97ya+JYF3xUOpij2k8k8TkNoaK4gG6kGELqc5Bc7C2Qaz2wm5T9nLWpFcfKzTFikclV94RxAvdDdTQBgdsl6svXA78pRjt7AqhoQ15SNLRsELTGLHGyW72+kX2aR9Ip3yzCMdoLyr8+q69+TsS+U77hTZEO3EqazePuNNW7zDvsZ1lWDpJAWG5sMTSLqiWuarLk5VjVqdpGq8Ah5tSEFPfBlST1gVApt5pYH/O+rX0VN3hTgTQMQ6h450OxnnwdVPIGMw3j2HbGF/Jw7Vu22Kwxfx4S7KElj6W2AbdqkDlNjAHVu9l3/O3WN79d42cD2x5aBZtHw6TFZqin3Vb0sJt/V6KaID9whimW/am/tqOIZt04ZZDFLMYDnW/+E3jKOvPIkUULej5x502ruwYoQNMneqfigcUziSBqtgJYXDUNJhKwQc/wzkbaUG5jbVgkTBjKfiOJ 58uM1BiS DCQs03mALOGInR00Fc1gTD+ZsG0xXmsYmHXjxWMlStL5Qnxc4CtyI5ma+Hfbn4ww5Y74Md9+UjPwsAgvHyhf1FGn/LZj+/fW2S4SlyAaTy+JRIZobNmOx8KhfQ59UrR7HKKTI0r9aMO3OjZGBOHm+1s+EF62ET99OYW1b450w6J0RDmI= 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=_3385f_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Wed, Jun 04, 2025 at 10:24:00PM -0700, Andrew Morton wrote: > 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. > Thanks for the clarification. I'll prepare a standalone v3 patch with just the fix, and send the cleanup separately for 6.17-rc1 as suggested. Thanks, Regards. ------bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_3385f_ Content-Type: text/plain; charset="utf-8" ------bfByJ-ZIY6BJv7sVO1BMUP1RgQAR8Q.m4BWNyUsw_2ev9GnZ=_3385f_--