Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2797785rdb; Mon, 12 Feb 2024 18:03:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUQqsvwlrYLElbE45qL5ToMbuSGxqZg9vr9byb0uGhn8hwFQjDavE0HxQXTzmVZ2PNUuztuIZStO/3EbNt6fmHByzii6sDtAhhYImGjsw== X-Google-Smtp-Source: AGHT+IHnBuhkDTO7M6IhLZIoOyxsktTYI8IKX1TnNxU5JKJ2vkRnRFKtyN6ng5l07Ey1bgSiOAe7 X-Received: by 2002:a92:904:0:b0:363:ccfb:f95c with SMTP id y4-20020a920904000000b00363ccfbf95cmr8642761ilg.24.1707789805386; Mon, 12 Feb 2024 18:03:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707789805; cv=pass; d=google.com; s=arc-20160816; b=cGhgXai5C9Ce/uahStkwEZtpIbMNSsDlFYHiBJZ4pKRH+XclF92VqnAYzpRqhjqvdh A/fhlS1dntTYaHtkt7a1+EZH75LEm12rKtKMkApwCgjMeKXWwWA21bZDdW6XWE5GJ1Tp Cr2rWaBAJMa6pVxv6Jw2TUOf+1Bf4I6K7tAlDv0/47CmuX6JYf2BMD88bw1RbkbtFoET dvUEciR2Rqtc6WcDmDVhalqaAX5aQTWECVNDpxY3auX9815h5vyjVD+ci2+wRzsLquQo MUmQYSvegVLPxIw8T9LWFmMXc5kmiDaQEbwM5V1xr1eZVe0LvvQDYIUxxca0Ckzv9F1Z AFgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=LPHeGLOgYVCBd1+TJxW9U/qO0rzZc3ebWvEd3IZdzmQ=; fh=7A4wvvMq17wCJs0a+92LZzHihsgUcnAPIxHCOS4vVZA=; b=KNWoyrf5EB6B3d4Znw3ACrEabty7gQIemM4Vq7Et69VfVI/1VEYbcVlSo3yh+7ZN+V WYnnolfVYq/lA2aHa/q3XdVhXlOHnMTZvAudIlJ8YVIw8NHVwLyR83GhP16fUs9GFF9H zrM8TsuGV82k84C0wV08JFQZy5avyLJi9tq96HbN0xk5244+bZWX2U12ZJ18X2bYapzp JVKo/7GM//ji2kt2s2bk6xucMm575ev3w10zXSuP+tLkEVYdb1WJ1Rc0tz3iK6xpIxrD 97/9beswDQpS9fIU7txt5WmpmF3gdepmPxSgVTaOqbCtoNbiEf2a3m2UUjtOXaoQ9st4 KPAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-62879-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62879-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVZnc1quGCw21puqXf9Xqjgt9B10U54P/NmfTuj7kFRgYtSapysS+q+c1CDq08ZfUsF2eFTalGt/fO72QezDhKG3znAuT0zffVdD+x9VA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l19-20020a656813000000b005dc7e971180si994803pgt.543.2024.02.12.18.03.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 18:03:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62879-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-62879-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62879-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E6D7B2873E2 for ; Tue, 13 Feb 2024 02:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ECEE23A0; Tue, 13 Feb 2024 02:03:19 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D757317CD for ; Tue, 13 Feb 2024 02:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707789799; cv=none; b=rdKSRo8qUrEEzLhCa4wVnKX2wjhaXfGtpe8PNcLPrlm4E8piICf97eKrvYSn1FO4FaONlGWo4xqYdR/o4f+WRqYrT0k106gcl6S3061EuyAILz7pz/2FTDwy4+x5IFW5m/7cmqHw8zpuZCr+/8nRGKcyFnPg08PFNk9Plp/qiL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707789799; c=relaxed/simple; bh=TrndH2YEXm9cuhg5WiMMAjXYVFYGXVdqHqKueUif6IU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LW8IGOgwnsHxJC2TtTVRinHB8BEpNf2RBwXRyw76qmoOnb7Ii2yLuE4Nvgmkq+wkDw5FKt3ELQFs43xkK4QXwCfUBDP85Lz32RXkun7xhM3EKY/DPvWW1Ot7yrT8GDAVDW4UDTNcYL0N3D1nCoJS0inU5Yt3TH0hMSEcJ/O16sQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d85ff70000001748-87-65cacde0032d Date: Tue, 13 Feb 2024 11:03:07 +0900 From: Byungchul Park To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, ying.huang@intel.com, namit@vmware.com, vernhao@tencent.com, mgorman@techsingularity.net, hughd@google.com, willy@infradead.org, david@redhat.com, peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, rjgolo@gmail.com Subject: Re: [RESEND PATCH v7 6/8] mm: Add APIs to free a folio directly to the buddy bypassing pcp Message-ID: <20240213020307.GC4147@system.software.com> References: <20240208062608.44351-1-byungchul@sk.com> <20240208062608.44351-7-byungchul@sk.com> <20240208124919.a0e1707fefc29c2f4213e509@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240208124919.a0e1707fefc29c2f4213e509@linux-foundation.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRmVeSWpSXmKPExsXC9ZZnoe6Ds6dSDW5vVraYs34Nm8XnDf/Y LF5saGe0+Lr+F7PF0099LBaXd81hs7i35j+rxflda1ktdizdx2Rx6cACJovrux4yWhzvPcBk Mf/eZzaLzZumMlscnzKV0eL3D6COk7MmszgIenxv7WPx2DnrLrvHgk2lHptXaHks3vOSyWPT qk42j02fJrF7vDt3jt3jxIzfLB7zTgZ6vN93lc1j6y87j8ap19g8Pm+S83g3/y1bAH8Ul01K ak5mWWqRvl0CV0b7jo2sBZ/YKk4vfsLUwLiDtYuRk0NCwERi9eoNjDD29AttzCA2i4CqxLq/ z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bceZJjDyzkLSPAtJ8yyE5gWMzKsYRTLzynITM3NM9YqzMyrzMiv0kvNzNzECY21Z7Z+J Oxi/XHY/xCjAwajEw5ugcipViDWxrLgy9xCjBAezkgjvpRknUoV4UxIrq1KL8uOLSnNSiw8x SnOwKInzeoWnJggJpCeWpGanphakFsFkmTg4pRoYjzfwbYwPFZ/6f//fKcUGc14/VVgVcEZ+ 9+nrs41Mbnul/kle6iVy7OAyDke9ZlGdJdomTf1S0Q+E3LYJGsod4tYuswhudJ4sVz9n4bEO bZdtGiUht7un97AcUtv1M6r+1bWiBc9F50ufz7K6mZm5oSkosSH5RsCqoir7RSezUuxd/u9f VPJTiaU4I9FQi7moOBEAUNF3KrECAAA= X-CFilter-Loop: Reflected On Thu, Feb 08, 2024 at 12:49:19PM -0800, Andrew Morton wrote: > On Thu, 8 Feb 2024 15:26:06 +0900 Byungchul Park wrote: > > > This is a preparation for migrc mechanism that frees folios at a better > > The term "migrc" appears in various places but I don't think we're told > what is actually means? > > > time later, rather than the moment migrating folios. The folios freed by > > migrc are too old to keep in pcp. > > How do we define "too old" and what causes you to believe this is the case? Migrc defers folio_put() for source folios of migration that would be unlikely used and frees a bunch of folios at once later. However, it pollutes pcp, which means fresher folios might get free_pcppages_bulk()ed and makes the effort to keep the best amount of pcp get unstable. So I didn't want to make this situation happen. Byungchul