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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46BAAC4338F for ; Fri, 13 Aug 2021 04:17:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C859660FD7 for ; Fri, 13 Aug 2021 04:17:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C859660FD7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 632506B006C; Fri, 13 Aug 2021 00:17:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E28F8D0001; Fri, 13 Aug 2021 00:17:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D1646B0072; Fri, 13 Aug 2021 00:17:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id 303676B006C for ; Fri, 13 Aug 2021 00:17:01 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CDB831AEEF for ; Fri, 13 Aug 2021 04:17:00 +0000 (UTC) X-FDA: 78468747000.14.EA94463 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 60CC4504BEF3 for ; Fri, 13 Aug 2021 04:17:00 +0000 (UTC) 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: X-Rspamd-Queue-Id: 60CC4504BEF3 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=jYyxgMzf; dmarc=none; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam04 X-Stat-Signature: o3ifubnd6uyg6s5gtf88t38ncuszhh5q X-HE-Tag: 1628828220-288989 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: 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. */