From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 B51843F4DD0 for ; Tue, 15 Sep 2026 13:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789480013; cv=none; b=SO6I7u0rboMPUZQBFtw5NYVE+zTPK/8kiuP7YrqAlr6rs651dphbf4rwNFfKqH0Ks8iCktT0k6JOxKBMbR8FeoTfNsLTD1I4L82yfJk/214smIAVnq7Pa+AxiTbC5UxK5sK1sdsd5HcusfxZosk6UEX1e7owQit9qMNPeMjOAZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789480013; c=relaxed/simple; bh=UkVfNVIy7sENgVo7iJcaggTxO1qWFNozi+Zn81xR2PY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eNZ6+s+/QLcx3trEfHSYin4T9Bk3v1UnDZwlZBBKBhcPEhPCf8XnRl+724D5y7Bx218Roz6PpeSrEct01iuafhnABWBYTu78P9XQE8j0MkedDap591PcRrYTjzINB7dR3OKUHwL+ezeMHaH1Sq/81Y4XAc1oPs8xgdqJW0libBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=AgV6t3hp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Y6V3Zpeq; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="AgV6t3hp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y6V3Zpeq" Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id B71531D00285; Tue, 15 Sep 2026 09:46:48 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Tue, 15 Sep 2026 09:46:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1789480008; x= 1789566408; bh=hLr8f1y6OpCVlFZxNEDzkoNAdcjT5mP0qSfI00lGolU=; b=A gV6t3hpNgBBM/0P7KIfeQzhPefkDLArILyqAZJqtGPohuNmIb3pqNuebuH8TG5gw 0ThVd119vrssfi7xWCMcw05Ik7AgphgpuroqZUacbs3fCnDjfuMukSDBpvBWWxkd X7Tvdm2cONPF8fZFdqmeF+0uhyl3LxxWZB2Z9+/iezqsHv8fUy8XtI7RwIzS2TaN +T1vX/KOpVTuK4yVUP1hXxPyKyO5zMzUOCrXb/bEga4qoabLbW4xSqxv5HwBMyzH SVNEbO7dkcUQJteu4Rt+mrJTjag9xNaA73pQMUme1Jvcu9Mi0WxiADR/lBS+i6FW lkM18/u1lRFDoK0vamKDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1789480008; x=1789566408; bh=hLr8f1y6OpCVl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ONgocgb+Y+FhJ5QfH1Ytadyibt6g X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Sep 2026 09:46:47 -0400 (EDT) Date: Tue, 15 Sep 2026 14:46:46 +0100 From: Kiryl Shutsemau To: Baolin Wang Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Vlastimil Babka , Jann Horn Subject: Re: [PATCH v2 08/12] mm/collapse: separate scanning a PTE table from collapsing it Message-ID: References: <20260910120238.2529819-1-kirill@shutemov.name> <20260910120238.2529819-9-kirill@shutemov.name> <1e91c48c-cfdf-4a40-bf1c-88d8e0295c5a@linux.alibaba.com> 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: <1e91c48c-cfdf-4a40-bf1c-88d8e0295c5a@linux.alibaba.com> On Tue, Sep 15, 2026 at 07:09:06PM +0800, Baolin Wang wrote: > > + if (!file) > > + return mthp_collapse(mm, addr, cc->scan_referenced, > > + cc->scan_unmapped, cc, cc->scan_orders); > > You already record scan_referenced, scan_unmapped, and scan_orders in 'cc'. > It looks like simply passing 'cc' as a parameter should be enough. Fair enough. Will do in v3. The same applies to collapse_huge_page() one level down. -- Kiryl Shutsemau / Kirill A. Shutemov