From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Date: Tue, 7 Jun 2022 09:36:21 +0200 Subject: [Cluster-devel] [PATCH 15/20] balloon: Convert to migrate_folio In-Reply-To: <20220606204050.2625949-16-willy@infradead.org> References: <20220606204050.2625949-1-willy@infradead.org> <20220606204050.2625949-16-willy@infradead.org> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DECD4C43334 for ; Tue, 7 Jun 2022 07:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbiFGHgh (ORCPT ); Tue, 7 Jun 2022 03:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236186AbiFGHgf (ORCPT ); Tue, 7 Jun 2022 03:36:35 -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 0D1F4674DC for ; Tue, 7 Jun 2022 00:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654587389; 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=AnwFfg7BdLSbFcs97gpTUo3tRJ6L222XQlmGjMQ7pEHlWI/L60/SbRsxlUk+X3hwbbILed 9g0vjy/xTeOZDQHUcSctAEuDpa5jR7Dr3eWgZOwZ3n8J/ZAku4RbFbJVQZZq7R2X9n/JWs aSjfDRl70naDPtEtS4IxmIyiorFAexI= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-47-kYZp5S9QMROH15v7f26IUQ-1; Tue, 07 Jun 2022 03:36:25 -0400 X-MC-Unique: kYZp5S9QMROH15v7f26IUQ-1 Received: by mail-wr1-f71.google.com with SMTP id m18-20020adff392000000b0021848a78a53so1043024wro.19 for ; Tue, 07 Jun 2022 00:36:25 -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=sVJ+8qyz2J3sqUv7E3GYuyaX5SucSBf74T0GY5VmBwDm6R8K9KShnDMYelraUHqOCy mOKETjP+4WIFvDSnUf3OvR4Nx2cYTCVOvvEHLXHKJUBYfSd2dfMDUzHX5nWgh3zcFG0F aQIWT3jFlvX/T7NBu418RZs23NhlYg3b2eFvr6suhZOlQehNkRAFZK5LYyn8PpdsA8Wn USC28FEJNu+8vvbnC645V8opymTk6CONElGcthQQ42T4oKev+ulUleAPIEOpm9NqPgQc msVijo2IQWIF/QZFWWEsE4UP/J9jRhvZFXpBBNzuoC6mBC5TCc7qc39Hi+vEyrQBgSYG n0Pw== X-Gm-Message-State: AOAM531RB+TCJsmrpjSqj4vfPiVENquDiYEty5d6hhqW2bAi58+T+kFk bqE24xC4fjaEgJMa4PibyDp38ylSbfWxZUcMVSDTLsUw0Up7hzveisYCALiZ9dQMGC7IV+FQ/6M yO71kLNoYCRj1wfnWCr5iqMU= X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010321wmq.169.1654587384025; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/TT1zDaD6ih4ST/0Z6l6/VJexv/LUjWrit9gRiSM2S633qB8aLjqIdjv8Hs+falCUt0H+YA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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 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 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE5C8C43334 for ; Tue, 7 Jun 2022 07:36:42 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nyTlX-0006TI-U8; Tue, 07 Jun 2022 07:36:40 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nyTlW-0006TB-4R for linux-f2fs-devel@lists.sourceforge.net; Tue, 07 Jun 2022 07:36:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=poSLf3SQpSQVqGAvfY9ZUAc4mDsdNw09sPQoA12+Xn0=; b=cipwIFo4w2r4Ri95Y98BhXKRTe dJMXlc/RcHtCAcITLNyEqZAmyK+bvOaUFvEFr5ZtsAw7qWXwxoCvW51/hwmOpNL25v81xCPsNjUia D6ytTTAJbVBp+JyyWMZ7Mgj0PWjjU8g4Z+XnzqYGpcEQmQCxTwRvfpAVg1ZXxmGaPs3E=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=poSLf3SQpSQVqGAvfY9ZUAc4mDsdNw09sPQoA12+Xn0=; b=WlEUh0OJcQNSg0c9+/JcHg3gSz UWrlFcNzzWdyr27DqCMO6y7/shZKRp9PZlkgxQtfRCfS9VlyPDL3Dd6gkA3lNWvEZJrJQHIfgm6Am SxLrvOoMePLZjUhHAai2TIfaJAH/zqqYf6uK8qNbKPbJ33v9lpZ1fhifKYxR3Jf/uuiA=; Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nyTlQ-0007qk-Al for linux-f2fs-devel@lists.sourceforge.net; Tue, 07 Jun 2022 07:36:38 +0000 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-616-EkWS5u0HM9ilRva_6NPadA-1; Tue, 07 Jun 2022 03:36:25 -0400 X-MC-Unique: EkWS5u0HM9ilRva_6NPadA-1 Received: by mail-wr1-f72.google.com with SMTP id o18-20020a5d4a92000000b00213b4eebc25so2930460wrq.21 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=QtslzK2N99DliqC/Lb/eSR7KwxRqtdGZYyf21arzcL4wzasECDQI475iYjLdeQpw9g kNnIG/3tFtNLrQ6wYzUZ5rQNmxuVoFhnYs4srJDT+uG0QweM2qwhup3cjvbXTUYHXmOR wz3wsBCXGYIBb5Qt2Lx3WOVHKdSO+IsFmzkbmwTUFD3sE+52REmM+BzSw0sRowejntmg 92kJhWOtZM+IBzRGc4CRvG62ZcgJ3VqTkADysk8KmpT9EOT7c/LpFfy6pXThCHmTQdWn 5RGxPY1h5bHbxoVpPpfZQHnwuu3eXyudKrr0Zd/c6udLk2ae+yIanzqMi08Rh0SejBwQ elPA== X-Gm-Message-State: AOAM53393W9upP73IVyFc9ON+TU5zirpUPb8bQYxOcnJdMxrSkxCnmVe /Fvx/KdY0F0isvlRtZ9Yr28Yz2KsuMHGonzl7Axqeyr8F2GnUSXMuWlENO8ULAW0iW55ei9lKng Goz+5AkyIks6libq9o0hbwYY6FgNhSS0mUxmzig== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010315wmq.169.1654587384019; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/TT1zDaD6ih4ST/0Z6l6/VJexv/LUjWrit9gRiSM2S633qB8aLjqIdjv8Hs+falCUt0H+YA== 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 To: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-Headers-End: 1nyTlQ-0007qk-Al Subject: Re: [f2fs-dev] [PATCH 15/20] balloon: Convert to migrate_folio X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-nfs@vger.kernel.org, cluster-devel@redhat.com, linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B3DFC43334 for ; Tue, 7 Jun 2022 07:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=infsMWt+MQbN/fOm0N076cgte5r/012zEJp/nh5xwIU=; b=v+VdQk2dUwZxWY IHtppK447r+x6/DXthmgur27Rh1hwSBpQJLqb8RJgwXXPLAFtGQ+lhgcoY2Od89+nWJsnEsKSWEwZ RcwyuOzDXJ1InXrjNJrnF0YsgkIsCDuYmWg+Q6fGVYkAcr9MzGJlwXjgPMLOGl5K6fKa9PAviyMMp fOZ5bO6heBbe0UPV4tgHSsPqDs7/FYf0CGKDl6P6Amo2Ib9L27sQ/qtdvKXqSP2JzaxujRHc84NBq bKOpYmmXLz+m54ORLrIAX6069DWFKRSqhW8VXb5G85caS2sz0S48MXEWZnApvTysJb0tE7iNhPTeP hdxGOINubfVKq0CGSjew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyTm6-005Un7-2m; Tue, 07 Jun 2022 07:37:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyTm3-005UjI-99 for linux-mtd@lists.infradead.org; Tue, 07 Jun 2022 07:37:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654587426; 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=Ei+tS59UADcqRz8t/v6zXFGm4EirBPntNruDT19yvMF9YHB0MHFhp3IEyb+cuD0A992nYg D39RQmqe/dt0C1JFN17d4H6Tw+rzmJJNiqBkd5Qr+Z2n5LKSvSi0fssMroXBAMVSEW6qnJ HECw1UpOfT6vHDEHvIqVFVk+w02e7rk= 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-499-evPXKXV5OnC4iFBq_tJw5w-1; Tue, 07 Jun 2022 03:36:25 -0400 X-MC-Unique: evPXKXV5OnC4iFBq_tJw5w-1 Received: by mail-wr1-f72.google.com with SMTP id o18-20020a5d4a92000000b00213b4eebc25so2930463wrq.21 for ; Tue, 07 Jun 2022 00:36:25 -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=tbi8WJoZ/VQ+X57IioZnFZhg9DKzn6M7s4FLQxolh/jSqp97Knd3ctMeVHRX3tyYhm v1RefKuLJ+2rFGhIGO/SYVyELbOFtvVe4fzot4Zp4aZCSu2uupDYTr8oFavzoJCnB0dz hyIPFC3Bsnos09olo8PNWPS8bqKxHoYwnUnHd5ANLQjXkYgicP1Qhfef179T2n9mnOeQ b1feG07aOx7V4wdz+W6W6umS/HW0Xir3tl4OLZN9UUAr22KRPmw8jxxFzwCNXto+7R2R /gjDDVeRoUqwTbFdwUCV/M3QeuesTyukCJC2wPXGIi3RnL2bixTePgHLb99fQq/FT3vv cOUw== X-Gm-Message-State: AOAM532PKS79co9U0y0oGN0tUN48mqBWR2K2+DHsnpl+AjB/LwtVoVh+ cnrW5/YgEVrf49/DrHHl8nUmXO3KO2seLC0QLbc9+Cda9NIT4mQP6M+Dlc6Mvn7T+w+pORsXiJO uq/Luy5ceg2Y5AD3VkI8gdkQUxw== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010313wmq.169.1654587384018; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/TT1zDaD6ih4ST/0Z6l6/VJexv/LUjWrit9gRiSM2S633qB8aLjqIdjv8Hs+falCUt0H+YA== 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 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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_003711_462131_BCC849B2 X-CRM114-Status: GOOD ( 20.79 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ 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 Received: from aib29ajc249.phx1.oracleemaildelivery.com (aib29ajc249.phx1.oracleemaildelivery.com [192.29.103.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 337D9C43334 for ; Tue, 7 Jun 2022 07:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=/cLPNy1jdnWW/77ByBwAQsEgimyXEUiV84gQMcJ5egM=; b=Y4FqlhWZrspk7sMdgS70gfn1z9y80xAzrd71ROoScww+h9uGTiOG1slGSytXC3+EabXEqNtVN2s3 UX+WGbBxKTJi8cib87KBN0RyGNO8YV0B2Ke/COjABoX3yK8LHYXXOZvUjvspRc0dFkODg6ErZHWF A5nWGbCvlBjvvMyA94ZC3r+4TJTP9EZ2OD991liKlhByDCtC+/KFpgJ/KaXjcCHQm2s6YO1uNt0s 4xAuKIdxjObzJZD4FaOvD/IfPFTJs7Qzyxdj5u3DQ8hZfzWEPNG65TTTfPiQcG1ZqtC9v4FjNcyx BHlrEjO07TukfWOTKVHEO4ZRPdB8AoCtCZ1YMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=/cLPNy1jdnWW/77ByBwAQsEgimyXEUiV84gQMcJ5egM=; b=p1IKTV1sRzN1IgnVspZLbC/uw6N4/9npZSMLByf5bmI8JFYMdph0c/uJ4MRzE30syjVINDuRwU7a 0ZgjBySn7xVSaLcnQv0q5PkljlPJjz3nfj+xRFMU3d1rWMC8ghjep3Ekk3+dA68QVfXyF8L6z5EO YRoBxVAsOaFQUqOG8ZA4GeW00VjTy23EP02DCngK7z+5RdieLPUnQ+Okc7coV0YTMCWM7BpiLYfY DFeL1Qp/IH5i1WwmhGhLshm0po7wkSzoxg+aD6l96GFXzhVk9nOlqOMYbLJejPXdA6Gqcx38Ug9F 3cSZykzCe1vFcva9tWxH3qQBvdDDg0YQGXCNMg== Received: by omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20220517 64bit (built May 17 2022)) with ESMTPS id <0RD300FV4JUH9420@omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 07 Jun 2022 07:37:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654587426; 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=Ei+tS59UADcqRz8t/v6zXFGm4EirBPntNruDT19yvMF9YHB0MHFhp3IEyb+cuD0A992nYg D39RQmqe/dt0C1JFN17d4H6Tw+rzmJJNiqBkd5Qr+Z2n5LKSvSi0fssMroXBAMVSEW6qnJ HECw1UpOfT6vHDEHvIqVFVk+w02e7rk= 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=vgS19nRUClkB36+OthC8gO1GAtL1Rh7+fQ8awLRSuzkzp1gx/VKJeqHWXMAxuwDoEX +v12dKntQbFx9iXnivnXArIEGza7DqBZThIewvBUrG3wR9tUcOP+Cy9tX/uX04v1Yt43 h67MsLacpNS28oFHYn1pFC08K7pIeda1D+nuwDESiJ+/U9JmntJ+LV3BVR7xjbg12ByS /d6+/4OtDAjRTXqljDt85kOMF/tZjL23hxY0DOymXFhBQ09YmrPTQzYfXV78LVyOQYFp AK+9hFIayIIbc9O54Hfw/SBzd3SrNOInW6vE49MF8N2FeHd5cEIYRQXV7z6t5dxM5m8f f2uQ== X-Gm-Message-State: AOAM530vJZnE8H0DmtmGXXbEZHRVKAY1VnvFhaCHN3+Pxcud2bUc3ExH ZCobYzHd0s07Fle0UhfF94Scz2rozxc1G2URVugn14njAiD0c/ZsUcTBidj/CttEDxcyFQDbVFh cCLADpMY2ifkEmI4Axaf3pA== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010312wmq.169.1654587384018; 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) 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 To: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org References: <20220606204050.2625949-1-willy@infradead.org> <20220606204050.2625949-16-willy@infradead.org> Organization: Red Hat In-reply-to: <20220606204050.2625949-16-willy@infradead.org> Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com Content-language: en-US X-Source-IP: 170.10.133.124 X-Proofpoint-Virus-Version: vendor=nai engine=6400 definitions=10370 signatures=594849 Cc: linux-aio@kvack.org, linux-nfs@vger.kernel.org, cluster-devel@redhat.com, linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [Ocfs2-devel] [PATCH 15/20] balloon: Convert to migrate_folio X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: David Hildenbrand via Ocfs2-devel Reply-to: David Hildenbrand Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-MC-Unique: SZ6yAXFdNKKOZeEODKtkpQ-1 X-Google-Smtp-Source: ABdhPJz/TT1zDaD6ih4ST/0Z6l6/VJexv/LUjWrit9gRiSM2S633qB8aLjqIdjv8Hs+falCUt0H+YA== X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:128.17.0.0/20 ip4:128.17.128.0/20 ip4:128.17.192.0/20 ip4:128.17.64.0/20 ip4:128.245.0.0/20 ip4:128.245.64.0/20 ip4:13.110.208.0/21 ip4:13.110.216.0/22 ip4:13.110.224.0/20 ip4:13.111.0.0/16 ip4:136.147.128.0/20 include:spf1.redhat.com -all X-Proofpoint-SPF-VenPass: Allowed X-ServerName: us-smtp-delivery-124.mimecast.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:128.17.0.0/20 ip4:128.17.128.0/20 ip4:128.17.192.0/20 ip4:128.17.64.0/20 ip4:128.245.0.0/20 ip4:128.245.64.0/20 ip4:13.110.208.0/21 ip4:13.110.216.0/22 ip4:13.110.224.0/20 ip4:13.111.0.0/16 ip4:136.147.128.0/20 include:spf1.redhat.com -all X-Proofpoint-Spam-Reason: safe X-Spam: OrgSafeList X-SpamRule: orgsafelist X-Proofpoint-GUID: BnzYrlAVKjIids5enSkAUSTmpSDb_kNI X-Proofpoint-ORIG-GUID: BnzYrlAVKjIids5enSkAUSTmpSDb_kNI Reporting-Meta: AAGzSnpca0MIfP0pH95dgkmdO/2Gw/fk24ByyoMNufZaGjDTwJCU+jQlfyYImhCg pryN2B8GexNrhAYRJlva4SAftYl2Fgf3dPsiX+NDSzufVbzuaaKW5zJEb1THnNvr aLQ4cpjayHoo5aqDejMHl9f6eHLJ48JTiGnE5kFwQe2oXR+miictItw0tmHo6AZR 1CfYTYWCKIsVnlmfOwvHUGtcTLEoSDHeisvcoEADWQNxOyUnr1kl8YUr1gYmn10+ 65jItUpWFbHy/HfoYTAetqtbAoNfK8xc9Mmma30n84N3WOzyIuPFcH+ElKhRnK1i GaQitn8H1II+T23yibUvsnF2LR/+p+K1jmzYoq19w/dJg071FgaggJVF4OBGL1+J 1/rvXc3bws8t0gpiu6yz0m5PB+lqPIFOLIM/RaPilLl7ts8o4+BGPtkOfktlNa9a s5JcbmcH2rAHn0RDTfRbj27B/2xAXXwqawvJp+8PXEW9eBnikn94oviOGFGfJqaQ U8/Ji1OavUInSX1YmVzyFxWRnfzFX4j2A1tistoJZXho 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 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3521CCA47C for ; Tue, 7 Jun 2022 07:36:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6AE9F841D2; Tue, 7 Jun 2022 07:36:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b9A0BUvy4ViV; Tue, 7 Jun 2022 07:36:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id E5CF483EE8; Tue, 7 Jun 2022 07:36:37 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9EF3C0032; Tue, 7 Jun 2022 07:36:37 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id EDB3CC002D for ; Tue, 7 Jun 2022 07:36:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D8711613E0 for ; Tue, 7 Jun 2022 07:36:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2tvktns-WQzP for ; Tue, 7 Jun 2022 07:36:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 132EC613DC for ; Tue, 7 Jun 2022 07:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654587393; 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=TLWa1C3HsrRRH3B4C2SHf3R8GtSHMua7O+xQFx15OFvX/s9xbG0oYnVBShRGB/+kaoKvC5 Lh+kvNEz0UlGDh9s3r/JMrcj2kYH8JssYXikKIgvsCbM/+QqteoSpEXCtNX/GlpM5RZU51 ZUHhXqgI8u21fr1WPxA/qN9R5av36qU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-78-SLgSLGKDN9ir7KdYIsfW4w-1; Tue, 07 Jun 2022 03:36:25 -0400 X-MC-Unique: SLgSLGKDN9ir7KdYIsfW4w-1 Received: by mail-wr1-f70.google.com with SMTP id i10-20020a5d55ca000000b002103d76ffcaso3595603wrw.17 for ; Tue, 07 Jun 2022 00:36:25 -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=g9F90ahyIiAwBK2CsFrUzKFHydplo/GQGCbXX/3Eolhd1us9PRorMcIjUGszLmRKu2 uxhRP1VnvzmU14nXyw0IcbrHhE+YDKNnTSb0N3t3gTqVji4uAMPWOq1W2fsjydNHSVz+ vLFLlfjb8zSoVKwjMD1p2GdsaD4pHtSQwM96te88XmJ5d9SGLQ/mdGHS8fRb4Ym5wXZm KDUVjQdBnavJIz/CP+Klx1HPG0MGSs53eREO8VPToljCcXl4L+lOrtxPMrLJJjrX5anw mvqqm9lxbMZNdeHpD6Mj6azXd4XIOZzwWazuyFpK/bqaKRTmmBnBxQlIbHJ3/iaJO1Ud hpdg== X-Gm-Message-State: AOAM532SwUoGxCkz3lW4emEIXXuAb672m2QeRP5P/UK575RPMakBc2dK HZYLbJC1kF1b7s/8QiLNQHsBztIhTyaSKiYrY8urYYv4OS/ygAQWB1fUPORtIMktEeHovxt2FF6 DIl/p3itOOEXqgLdwdqdWcucC+RivBsZ4QNCb1u4LXw== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr56010317wmq.169.1654587384021; Tue, 07 Jun 2022 00:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/TT1zDaD6ih4ST/0Z6l6/VJexv/LUjWrit9gRiSM2S633qB8aLjqIdjv8Hs+falCUt0H+YA== 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 To: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.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> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: linux-aio@kvack.org, linux-nfs@vger.kernel.org, cluster-devel@redhat.com, linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization