Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1409825rdb; Fri, 16 Feb 2024 15:19:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwoRwSBAc6NyLfQ34SV4BHf0QcoIXoiGgFUf3cb61L+UZDHYVi1BF5MXk8mCJyi+om5RDVRs4ErWV2IzbsuRF+rW1qHMNI+rXB5ozNmA== X-Google-Smtp-Source: AGHT+IGDhKMXmLa9sSATl880jW3Be5gz1ELaWUPScrhJ9+JkeA66g35xi9GrdqWGYA9UoWJmJpTi X-Received: by 2002:a2e:868a:0:b0:2d0:9b1c:649e with SMTP id l10-20020a2e868a000000b002d09b1c649emr3833513lji.31.1708125566042; Fri, 16 Feb 2024 15:19:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708125566; cv=pass; d=google.com; s=arc-20160816; b=HwMcC7X0hMSug/f7Is+6aautHa/jeEJ95YcalLeDkdEFi9z9TXfHQxM4iv8/J6xOu3 rG8aOlo3P+W0QV23V2SmkI1njXNWALU7j3Q6lMeK2/OH0PzMgpXMlBtZuFfQpxwg6csc wTrNcxUjt5MvIr2hFW+4+QSHmcmEFPRbHUdkpVIibr0nBa9mf4CqHymVm0hSxqKjSB0X +bNYikyw5Xldd2bVmHyAFWWQDA11sOMpU63VEILf6z08ZNUwf+mVmO2DoobLApBQHgwf Q24h2tgcqsjsDx/RgafG6jqylvb6AR2huRbmrQxIggwyEmUu5IQLI0lewzOTQ/zIL3IN m+QQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GHk08+9Qr2abvfFoZHWP0gAwqgSKn3bFiclZzT/m3D8=; fh=dWiF9yA75H1aqs9gWsUd3EBPP3Gm973tCc8eTJiqNVE=; b=HiF7KL0axgUfdQAY8VM6sXaNjuqNqZ+8Iwyi3UhkO3eM7KWelc4cEki7Gg62P4gv8N nPTPGnlJ+TYrUGJdR84dIa1GdkndBrgFi1zEmeA+U0D59PL9uAzD5TWXrxdS5sGBra6D 1Ahc6HeQQ8W3mK8NssVWpaAcwjuErZBXdPNxB/oK+PaR7MHHrcxAOmw2+fHf8Zw/N1Bm BWpTMaJw1IfSlaV16Xly0LepYjM2zW+4UcXGVc9WwbZuSVQoTpWvSbEtFMeALxJf92AP BaZsz7OV3EO/B/xMqlDdOZlaK/iGaJH2TjyN7AXYAAfFpOW4zdWPhZaOkTIoKsZCi8j5 o7mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SRGQ6I5N; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-69472-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69472-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b100-20020a509f6d000000b00563ed661b4fsi359518edf.486.2024.02.16.15.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 15:19:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69472-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SRGQ6I5N; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-69472-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69472-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C086F1F2185B for ; Fri, 16 Feb 2024 23:19:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8E371487F6; Fri, 16 Feb 2024 23:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SRGQ6I5N" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 70C2217BC4 for ; Fri, 16 Feb 2024 23:19:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708125552; cv=none; b=PDRQR99/0LQJvkxnn+Ih1uCqtQEHUubBmWB74wsTaMojwhWOIMRck3RYWy60WFGdCZMIIckM0gev0DgoxuED+UcTNi/6GxL2MvunMTUHtno4F1jHbddzaDcgTiQBVgIv9U5oL2uqT8SeaQiHt3qEI+INkhrB6P2Fe+1v5uwXAEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708125552; c=relaxed/simple; bh=+0tVT7b1fxqTxgx0N4I95PE69+poGgPKlWQA0oDaDX8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TH0iIVhiqDuSy460Zta7aG0sv3Ov7cdTZmJ4cLV1XXimqR+FmJfyjCqZTjb3O5svmdI6oNvRzc0ASGdMf/Lww37yBgHEaMU3B/d8BXcwww+CXoxbwwsLRBQ2HHozuUD2fd7k8QPfVr7AF9tZUqwVG8OT8Bmr+igwOhtZ2ea38b4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=SRGQ6I5N; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GHk08+9Qr2abvfFoZHWP0gAwqgSKn3bFiclZzT/m3D8=; b=SRGQ6I5N1G03NQ6vP4wxMnClZn THcmHjIQNAwBdcbLWQGtRr+3kCticVuyeY3k/kKPNGY1NKj4FUwb3Ly9NEWBKOYBdR7Bkg6Zbwpqg VxkTGowlfryva2I7GeU45K0oJAhFMv+MoEVs5k07IxrGijqOgelK6w1rhaI/5WlP7Xmpxt9p6Q/7a jVHV3Q7BpwI1FWnMNdNDLM56KDOaFEht0IQQAQTxKSeXdfwoCU/QOetet+MvssFKs2XgYYmBp0pg9 4PKK2ubTgI9DmkbjfHTvkoVe09IKsCyDGpWnf/1NrpNBmAZBOQSB9PUymTs0WAJ8+2SEqBhBoYzes P0Do0m1Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rb7U1-00000005uni-0Zym; Fri, 16 Feb 2024 23:19:05 +0000 Date: Fri, 16 Feb 2024 23:19:05 +0000 From: Matthew Wilcox To: Sidhartha Kumar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, apopple@nvidia.com Subject: Re: [PATCH v2 4/6] mm/migrate_device: convert __migrate_device_pages() to folios Message-ID: References: <20240216211320.222431-1-sidhartha.kumar@oracle.com> <20240216211320.222431-4-sidhartha.kumar@oracle.com> <71db0ad0-a385-8572-7bea-bb11f76a6345@oracle.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: <71db0ad0-a385-8572-7bea-bb11f76a6345@oracle.com> On Fri, Feb 16, 2024 at 02:00:31PM -0800, Sidhartha Kumar wrote: > On 2/16/24 1:55 PM, Matthew Wilcox wrote: > > On Fri, Feb 16, 2024 at 01:13:18PM -0800, Sidhartha Kumar wrote: > > > Use migrate_pfn_to_folio() so we can work with folios directly in > > > __migrate_device_pages(). > > > > i don't understand why this would be correct if we have multipage > > folios. > > > > Alistair mentioned that he is working on order > 0 device page support so I > was under the impression that currently device pages are only order 0. That might well be true, but I'm *very* uncomfortable with doing a folio conversion in core MM that won't work with large folios. We need to consider what will happen with large device folios. (for filesystems, I am less bothered. Individual filesystems control whether they see large folios or not, and for lesser filesystems it may never be worth converting them to support large folios)