Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2509627iof; Wed, 8 Jun 2022 06:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2bCsRl1gtDreNg7VjjE5VG5uil4LuBcXB+jTtbPhMWjqkLA0lQXyrnY93W3GZX0zP8Wad X-Received: by 2002:a17:902:d64e:b0:163:5074:c130 with SMTP id y14-20020a170902d64e00b001635074c130mr35055094plh.125.1654695079327; Wed, 08 Jun 2022 06:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654695079; cv=none; d=google.com; s=arc-20160816; b=kSZA2h93NqKczObWhlSJy7wLHEAMxqWLwMkxhPPmpR01ck0Twd2V2nEMUd9PNK3u1X l5KunDU/MPNtqbdc3V6U2ThdwU9o9iPv5qOcauACfWtKgVZOFysGDPiTjucT+j5bSf9+ Tn5VB2HP09INgQmEH5xDrM2uW5fWLsWYNhhmLptLIvz74bTMDlmjqnvAjrW/VUVNbbqm uyxgMN6/Sok0ml9dCni++6eaap1dveXK1D8EXQaZT4mMfwX9s8cbKTrU5f57v+4gJUHf dpSrkhKR+GwL/pwujbfZLyGDA0Yn1uB+o1vYmWW/N9GX5ineF7YDjCopwJNDvmnSs0ju fwnQ== 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=USUlEZ1UMdOAkVgNJKy6bNhyk03F1F+22jSwcfgVGi0=; b=Qx54S0QqXMkwahuv3ujKuxBT4Tp6rnGG178yAWuICu4yJSFk220lbD55loo/yYPM8v lqsMt5FWc1VxBecWkPYnFZrCP5zLu7KeJP9P0aYRQ20eRdEritjTuj/sRjyGr4TezvGA PYOqAq2YIhM4pw8ouEKrzg/R6uFH7gusRYQXis2Hv81HhONNi7noCxMLsWwdniKAmKD6 PgXgb1G4t/8jmLlkCq6tfviBo87QQcRFSiejRE1EgG1IWiD4EQwAmkU40dXJ5TYj/oJm tqU/0lLn3dNS40PoH13glERciQJRzcaUJvZWfBlfu+Z9W2atlrF7mrqwPF8GZEHkck2S 2nwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UoJHHshZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k189-20020a6384c6000000b003fe0f7baa87si5434205pgd.329.2022.06.08.06.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 06:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UoJHHshZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 03016136E84; Wed, 8 Jun 2022 06:06:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239915AbiFHNG1 (ORCPT + 99 others); Wed, 8 Jun 2022 09:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239872AbiFHNG0 (ORCPT ); Wed, 8 Jun 2022 09:06:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA21C1900EE for ; Wed, 8 Jun 2022 06:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654693582; 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: in-reply-to:in-reply-to:references:references; bh=USUlEZ1UMdOAkVgNJKy6bNhyk03F1F+22jSwcfgVGi0=; b=UoJHHshZaUShraxSBVjI9WRQAg6Q8lBYAs+8JFhFch1f8CMfyCw5VlBsPzd0X33miW+LTV n+tFAzMZNP2w2mf/RoLa1qgjKmsiAzj7xWGHz0ugiGJ3JHWu1q5zh2oMRdIe+6x9O6Sb7q dIDTMPpWOFo8ML+JcvJ3jH62YcKv8sA= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-333-fU0VOoHZMfuYN3PIvaYpMg-1; Wed, 08 Jun 2022 09:06:21 -0400 X-MC-Unique: fU0VOoHZMfuYN3PIvaYpMg-1 Received: by mail-qt1-f199.google.com with SMTP id a16-20020a05622a02d000b00304eb488a71so7350425qtx.1 for ; Wed, 08 Jun 2022 06:06:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=USUlEZ1UMdOAkVgNJKy6bNhyk03F1F+22jSwcfgVGi0=; b=4e5zE5YkZSOtr2sGbFycPxTIZiyW1/3KYdFsvW+2UwT3+mJ9L/ImEHLoEsb9IA/Y8H J8ziNTWLcj4lWJ73xOO+rAlfldWBpJJgs0rV7ebNg2ABR9rbx0jnQjDx5IiH3BBBdwWl f/TpYogVVksxICxbaZWhB43pjDd/sF/oPvo9KzGnkG7JlnoAG4mWtCKrXz7HXBDF26Dp jrOyDLarA9cGP4du+lp8pdDtEYNU2gA4kVekcFTl3UTq1oqLFd61D0Jt4j+C7IlSFEee T7vAt8SVTnMaqxFjTtxqg0x7AWrLw9Tx+ezx2ReTPdUtfTxOn4hajteSUtZ2NtehMDXy dQ8A== X-Gm-Message-State: AOAM533eJ8GMmpEdLucekNuC5QyU84UNWqVF3gs7NG/2eK712iL7jQcT INf2Mf+pGXxb++QQxi+7xNORTS1cXiLHc6pdBOeVHLsTDQ3SxMCra6N72GUVmQ+CdIyCoHXCwN0 vUqpBksuIzns1lh6gZB8S X-Received: by 2002:a05:622a:1013:b0:305:3c:232e with SMTP id d19-20020a05622a101300b00305003c232emr2957095qte.180.1654693580929; Wed, 08 Jun 2022 06:06:20 -0700 (PDT) X-Received: by 2002:a05:622a:1013:b0:305:3c:232e with SMTP id d19-20020a05622a101300b00305003c232emr2957043qte.180.1654693580507; Wed, 08 Jun 2022 06:06:20 -0700 (PDT) Received: from optiplex-fbsd (c-73-182-255-193.hsd1.nh.comcast.net. [73.182.255.193]) by smtp.gmail.com with ESMTPSA id v10-20020a05620a440a00b0069fc13ce217sm4216712qkp.72.2022.06.08.06.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 06:06:20 -0700 (PDT) Date: Wed, 8 Jun 2022 09:06:17 -0400 From: Rafael Aquini To: David Hildenbrand Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, 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, Minchan Kim Subject: Re: [PATCH 15/20] balloon: Convert to migrate_folio Message-ID: References: <20220606204050.2625949-1-willy@infradead.org> <20220606204050.2625949-16-willy@infradead.org> <36cc5e2b-b768-ce1c-fa30-72a932587289@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <36cc5e2b-b768-ce1c-fa30-72a932587289@redhat.com> X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-nfs@vger.kernel.org On Wed, Jun 08, 2022 at 11:59:31AM +0200, David Hildenbrand wrote: > On 07.06.22 21:21, Matthew Wilcox wrote: > > On Tue, Jun 07, 2022 at 03:24:15PM +0100, Matthew Wilcox wrote: > >> On Tue, Jun 07, 2022 at 09:36:21AM +0200, David Hildenbrand wrote: > >>> On 06.06.22 22:40, Matthew Wilcox (Oracle) wrote: > >>>> 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 :) > >> > >> My intention was to finish converting aops for the next merge window. > >> > >> However, it seems to me that we goofed back in 2016 by merging > >> commit bda807d44454. isolate_page() and putback_page() should > >> never have been part of address_space_operations. > >> > >> I'm about to embark on creating a new migrate_operations struct > >> for drivers to use that contains only isolate/putback/migrate. > >> No filesystem uses isolate/putback, so those can just be deleted. > >> Both migrate_operations & address_space_operations will contain a > >> migrate callback. > > That makes sense to me. I wonder if there was a design > decision/discussion behind that. CCing Rafael. > None that I recollect. If memory still serves me, I think the idea behind bda807d44454 and friends was to provide a generic way to allow page mobility for drivers without adding complexity to the page isolation / putback paths, and since the migration callback was already part of the aops struct those new callbacks just followed suit. -- Rafael