Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp456050pxb; Thu, 12 Aug 2021 21:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqZxjbkYPVJbuAKBgRC9LGfPD1Rntg6d5BMZ6NZh4boaQ4i3K2mFs3XwDGf/EkEVBwxViX X-Received: by 2002:a05:6602:24d9:: with SMTP id h25mr592238ioe.11.1628830325038; Thu, 12 Aug 2021 21:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628830325; cv=none; d=google.com; s=arc-20160816; b=ZbanSOjRduXaLD3TD3rJyZQtVaePLDi4tHg/30fRufbMIzAR9dT+tVXbhpG9jY7Oq6 no3KdXD4/wzzIjZ+6NZQxNWz3zcNsR6UZke+0byPNK4wqHQ/qub3h5mSBwB3YPFlob3X BnfdQE01hQp03dv6NOREd5EsMXQnAx6z47MzhkUrQC2z7jJqFIIFurAFoBvhQBxez9fS iO6FmL7a0ZWGiCB7V6EaXRa5xIOSTSNt0Zohve9EhISugfR3GRVEy/1eZTAMAbqXpU/P Z2k9P4KjhlUq6n1DVXchx/UCn54ThO877y1vbSthoHiEInI1ShIq4cA7ONJxhghjamhi nhaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y3X3sVuY3L2FWlXGWvS23PeS1/gxpP+T9Fv+274OjwQ=; b=tFckI/3jHGtF3+AgiYbzihZ014rTaK010vzMX1MMxNXxt9u6CejzAveib1fDRsCH+9 JWXdJI+i0vc+pIRQyutVv31yfeucfa1SzagjpbX7UKgwhdEiZBV57IVVXf0Kkt7YZun6 tApHdYIjzVPpMFydIsZf2QE5Lt0NzAwyEUztRwl/DV9NO5PVRl5kRUu6vbzDWO0fIZZH yWtXaji3ZXd9Cn0lk0L7zEQ7Ct3rC6yharShckXsjIKQVlDlDd6eLzLAA62O7hE0KJ6x bDozny0+4K838Fy6PmEQcRJxJ6g/G71qjVyL97EyEDAFgGD1Yp6mVbGlDrkpYpo1O00b /SwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jYyxgMzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si312822jal.26.2021.08.12.21.51.53; Thu, 12 Aug 2021 21:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jYyxgMzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234031AbhHMERS (ORCPT + 99 others); Fri, 13 Aug 2021 00:17:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbhHMERR (ORCPT ); Fri, 13 Aug 2021 00:17:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF07FC061756; Thu, 12 Aug 2021 21:16:51 -0700 (PDT) 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=y3X3sVuY3L2FWlXGWvS23PeS1/gxpP+T9Fv+274OjwQ=; b=jYyxgMzfWOQo+Hrse33LD/l0b7 nQq/CeYf/jACRw9Z0bVKWTY6/czLjNvVAThT5svKXzaod41mg4cW/ONz2GemN0+sza0zjwSUcLvE1 x0VV35IYX/v6vwlpn9p+UA1v44PpBFl2AI5H6fSP+PWH+qZIK/ADPC3e38qg4+mBznVxhEgIiNJmC hU3OYQfDEXqnZ4FXEmGbq9FH2YEpNDUtl9DNORCm8eOu0mLtPTMWJS6+FGz5SxPgoedYKajpCMd5W KiNVWytYJDFoxuGY0+2MEcyQGfL5AdPZnTdE3n9Qomz1atbKv4XZZTDVD4bESR8ZbUrnkUIeJYzRp /Si23TJQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mEOcM-00FIVR-6R; Fri, 13 Aug 2021 04:16:33 +0000 Date: Fri, 13 Aug 2021 05:16:26 +0100 From: Matthew Wilcox To: Vlastimil Babka Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v14 062/138] mm/migrate: Add folio_migrate_copy() Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-63-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 01:56:24PM +0200, Vlastimil Babka wrote: > On 7/15/21 5:35 AM, Matthew Wilcox (Oracle) wrote: > > This is the folio equivalent of migrate_page_copy(), which is retained > > as a wrapper for filesystems which are not yet converted to folios. > > Also convert copy_huge_page() to folio_copy(). > > > > Signed-off-by: Matthew Wilcox (Oracle) > > Acked-by: Vlastimil Babka > > The way folio_copy() avoids cond_resched() for single page would IMHO deserve a > comment though, so it's not buried only in this thread. I think folio_copy() deserves kernel-doc. /** * folio_copy - Copy the contents of one folio to another. * @dst: Folio to copy to. * @src: Folio to copy from. * * The bytes in the folio represented by @src are copied to @dst. * Assumes the caller has validated that @dst is at least as large as @src. * Can be called in atomic context for order-0 folios, but if the folio is * larger, it may sleep. */