Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1222973iof; Tue, 7 Jun 2022 00:46:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzClDjGW2Pkj4sGemsxowYPj6dJS6iM3uSCHuL/95V81zgw/8wOemJisGQdNscMgERaAzfw X-Received: by 2002:a17:902:f612:b0:14c:e978:f99e with SMTP id n18-20020a170902f61200b0014ce978f99emr28093052plg.23.1654587965903; Tue, 07 Jun 2022 00:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654587965; cv=none; d=google.com; s=arc-20160816; b=Gxozo4sGz2bt4Kqm3i/hPfTeTXpMlw3dA9Wpbn2Om0sWBGLL/HlZfLaCKr92R8Z8bH rCUStDlyf2J98V1Ad9VcrA1dmdVXmqI91tszCfogEfVoub/nNv/9KTHZIa3Rmkn+ML0L AWy0GFrdwWgQePBlupNNjUuivLG/RR1QJEmKb1XWy/TSSWD6jv263+B5AAFGB+BoV4jp CCtuHLnPDedTZAhYOO0+fMcHmTruehquWPlxi1YIiEcaS22p79fkFFo1sQTTKjALdkwP ovIKjUhgBtWDsp69OYct9mE2fnWq+Urldec9af81oTM7MEzURvt32zm5zwaRvQnsKnz2 9ktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=poSLf3SQpSQVqGAvfY9ZUAc4mDsdNw09sPQoA12+Xn0=; b=yvO3IRAvzcvB8CthdE1A9XjqgUFsJt1xY2//qmWG+L19iEzvJMDHyoxs/dYAkt8sst NJ7EHn0ZZqSed1EcoExAeXMRZg7fFAUTi7/yBgZKoby8laVu67jGENUDMosVtOmVKVdn Qh3gG0++oQjq1+HUQiGPzTuYtZh7Rp+W6TaVncoM4QopTYuGPe+M2X8CJ6sGXQyF6qEO Ugw1cWG5ECIzlhvAFV8BGnsTECqM9BZIyqFoUf4qxOnMu2EHk9LuhCYrx647JsIuoGlC ocfgQvcBzCkD5eNRpjWQQZdv63mZvataQ/9+NrKRKF1UuH7sOzoajKRIuKNtT9AvZPRo yMvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hfSm24hA; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a656a83000000b003fb1476fa3bsi24664435pgu.363.2022.06.07.00.45.49; Tue, 07 Jun 2022 00:46:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hfSm24hA; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236710AbiFGHg3 (ORCPT + 99 others); Tue, 7 Jun 2022 03:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231790AbiFGHg2 (ORCPT ); Tue, 7 Jun 2022 03:36:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 38CDB69CF5 for ; Tue, 7 Jun 2022 00:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654587386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=poSLf3SQpSQVqGAvfY9ZUAc4mDsdNw09sPQoA12+Xn0=; b=hfSm24hAkAxOtxAdK5RtalOFpv2znDhW0w8uprj18UcuDvaE1104doT8gg0EGQRE7IVVae Iv9ibPBqibKHQJSPOIOBqaEpuEYNNXoxMCplEm6QKG0vQjt/Q4MwCr3NAXeroafSH4Hism Hc6SSzDGX6eaNpnk8i7CZOns7zf1qCw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-2ahEMljFOY-Irj5WiVftLw-1; Tue, 07 Jun 2022 03:36:25 -0400 X-MC-Unique: 2ahEMljFOY-Irj5WiVftLw-1 Received: by mail-wr1-f72.google.com with SMTP id h14-20020adfa4ce000000b00218518b622eso270625wrb.4 for ; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=poSLf3SQpSQVqGAvfY9ZUAc4mDsdNw09sPQoA12+Xn0=; b=dYZwEC17k4FhIApGFLQSKaambAloi05hoL71/Px+T0U+7dc4+pp24a2GmKnyGKYGSq ZmrDst4YM0AfiCrHqNR4DXuoAYuXwxNEDjw81YMAXPqyMgpRmU4Yvoi1ShyajyRHUzWj BTzUl83M6hDn0kNiM4SoOsn+RZ78HqC8GuvPmvxyfcJtyni0A+GH/e0XpOeyPYNBeeg4 +lt0vd9jPQlu0cvtoqjgHQ1P86ia41Y05S0ZGnw/MC3kmWPBcoLUaYi1Ztm78eXAdTnt VCc+MNkg+Qsz829/G4MDqQzqrUaEzmrcrrKe4juSB/cnPmFQ87zrT6H4TY0d/KCnsTa6 IT8Q== X-Gm-Message-State: AOAM533SUC40jPYJQIPUbLfhX0/qqlFxPt86onLeclAUVzuT4dFd/k+N iJa6y2e3v/TSBSJ1sS8xUFWeTq7OssvGcCipaHZC71iTyBIk+BGkgxJH9X6XWI/uUf9mD3bmXUO Lqnj824Av7/kMaGTkXd9W7g== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010316wmq.169.1654587384021; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010293wmq.169.1654587383789; Tue, 07 Jun 2022 00:36:23 -0700 (PDT) Received: from ?IPV6:2003:cb:c709:500:4c8d:4886:f874:7b6f? (p200300cbc70905004c8d4886f8747b6f.dip0.t-ipconnect.de. [2003:cb:c709:500:4c8d:4886:f874:7b6f]) by smtp.gmail.com with ESMTPSA id j37-20020a05600c1c2500b0039c235fb6a5sm19943141wms.8.2022.06.07.00.36.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jun 2022 00:36:22 -0700 (PDT) Message-ID: Date: Tue, 7 Jun 2022 09:36:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 15/20] balloon: Convert to migrate_folio Content-Language: en-US To: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-aio@kvack.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, linux-mtd@lists.infradead.org, virtualization@lists.linux-foundation.org References: <20220606204050.2625949-1-willy@infradead.org> <20220606204050.2625949-16-willy@infradead.org> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220606204050.2625949-16-willy@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 06.06.22 22:40, Matthew Wilcox (Oracle) wrote: > This is little more than changing the types over; there's no real work > being done in this function. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/balloon_compaction.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c > index 4b8eab4b3f45..3f75b876ad76 100644 > --- a/mm/balloon_compaction.c > +++ b/mm/balloon_compaction.c > @@ -230,11 +230,10 @@ static void balloon_page_putback(struct page *page) > > > /* move_to_new_page() counterpart for a ballooned page */ > -static int balloon_page_migrate(struct address_space *mapping, > - struct page *newpage, struct page *page, > - enum migrate_mode mode) > +static int balloon_migrate_folio(struct address_space *mapping, > + struct folio *dst, struct folio *src, enum migrate_mode mode) > { > - struct balloon_dev_info *balloon = balloon_page_device(page); > + struct balloon_dev_info *balloon = balloon_page_device(&src->page); > > /* > * We can not easily support the no copy case here so ignore it as it > @@ -244,14 +243,14 @@ static int balloon_page_migrate(struct address_space *mapping, > if (mode == MIGRATE_SYNC_NO_COPY) > return -EINVAL; > > - VM_BUG_ON_PAGE(!PageLocked(page), page); > - VM_BUG_ON_PAGE(!PageLocked(newpage), newpage); > + VM_BUG_ON_FOLIO(!folio_test_locked(src), src); > + VM_BUG_ON_FOLIO(!folio_test_locked(dst), dst); > > - return balloon->migratepage(balloon, newpage, page, mode); > + return balloon->migratepage(balloon, &dst->page, &src->page, mode); > } > > const struct address_space_operations balloon_aops = { > - .migratepage = balloon_page_migrate, > + .migrate_folio = balloon_migrate_folio, > .isolate_page = balloon_page_isolate, > .putback_page = balloon_page_putback, > }; I assume you're working on conversion of the other callbacks as well, because otherwise, this ends up looking a bit inconsistent and confusing :) Change LGTM. -- Thanks, David / dhildenb