Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7652351ioo; Fri, 3 Jun 2022 10:38:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu6Nnbre3u14zoQA9Y5sVHEczQsVZIl5jwEDSg5iL/iXRY80mYhj/LF3/PZ8VqvnXKyBBl X-Received: by 2002:a17:907:1c97:b0:6f5:22ae:7024 with SMTP id nb23-20020a1709071c9700b006f522ae7024mr10150615ejc.570.1654277898332; Fri, 03 Jun 2022 10:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654277898; cv=none; d=google.com; s=arc-20160816; b=Ce+hZX/AfL7gbTBila2RfFYr7p2HfR3aCZX8ENywHhcyiwho8bIVyGWiMPz/cEcXbd Z5SqiZQJcaPJH5lwJaXe5n2kf8J6IaLtZZd0PMmantmBDpOTX83wT4n/x90Z6RXnxHxE PGjOUusYwqSBr3U38PbZrosxhjhii5JorzAKnTlp88fsvfGNRz7Ik2cKjUiVy1RGKCDr f4l5pxdSrR0RVoIKmGECZg7MMQM2K3lR4UsGSFuY/8pPIeXhl0UD1pEiEvsbdol38w4l /S4j5EGOdRvFDrc95ze2RZyxQtsmwqtGUR93KtsMqfmtGnDbXgCrHOA2ASkkRsicdRk0 qxYA== 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=HJiTsPqbh3gtUE6yxK50RmD33gmaYmrtZQ2HehWgX+A=; b=YQobHlZhj+C6Un7GhNRi0FLZqpAyghSF0gdmgk6kX69oPsqSuzbfYXDRRitDeklfbH XNroVziLLp+9O6yOL+sCg0CMjgJTey9xnNgYp/VFVksIoI3HFAmRh7Ypm1yhk9wufQIB gEOTHdtFJHtkvwW6qwx9rCpjlbyV/9ovTfAZ3mvrEAiv6zKaSsiP5ZflxNp38Rknft7Q 83mWu09+VTqVTbEphFlKgN19DX4EOw8KnTpCnkqAcrAffa6JO9TCOHcg68BR4sM3JKJU e7939dW6G2bseyKW6ADq+NrJn7MHw0XGui5/Z0C6DafJAOJSjHzbGBfW/XQT90OwrrDh CKNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lHqJbi7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qn19-20020a170907871300b006ff25a5a0d2si6820221ejc.352.2022.06.03.10.37.52; Fri, 03 Jun 2022 10:38:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@intel.com header.s=Intel header.b=lHqJbi7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236982AbiFBQWW (ORCPT + 99 others); Thu, 2 Jun 2022 12:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236967AbiFBQWT (ORCPT ); Thu, 2 Jun 2022 12:22:19 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71ABC33887; Thu, 2 Jun 2022 09:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654186937; x=1685722937; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4xj0OkaxBdoQiw9WXp+iQWfsQeHJ0rlw7PBOAmlgVt0=; b=lHqJbi7Z404Erlrhdd6erplN+7AwKhqoROJP8cGebQ2YEwuZhFWX7P6q uN9o04OEDGWxIHEUP0RR9i9RKZ2DobLk8du1pH4AiaXIMpaYN10NXDgUk eGvfBWV5QtxZvTZoVtVfSu+LJTT/eUpXmosRiBEC/TbXbMM3Xu7RIcoAz 1bb8dFrHvLIkxPCdW+MdrIwrHlySNImdDqzCcEDLz1gnmVlfKQyRykAB4 +SVHMUwbl1AAfw3d9YuTadRuWAfLf5PymyJ3D04kmgpW7grcJaPzt0S87 AijCapqJMYOiCa1ElDh7hhmQgtYthn8ug9tAnyIIL050QI7831/rDsbhM A==; X-IronPort-AV: E=McAfee;i="6400,9594,10366"; a="336656237" X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="336656237" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 09:22:16 -0700 X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="582157443" Received: from liqiong-mobl.amr.corp.intel.com (HELO localhost) ([10.209.7.136]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 09:22:15 -0700 Date: Thu, 2 Jun 2022 09:22:15 -0700 From: Ira Weiny To: David Sterba Cc: "Fabio M. De Francesco" , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() Message-ID: References: <20220531145335.13954-1-fmdefrancesco@gmail.com> <20220601132545.GM20633@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220601132545.GM20633@twin.jikos.cz> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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-kernel@vger.kernel.org On Wed, Jun 01, 2022 at 03:25:45PM +0200, David Sterba wrote: > On Tue, May 31, 2022 at 04:53:32PM +0200, Fabio M. De Francesco wrote: > > This is the first series of patches aimed towards the conversion of Btrfs > > filesystem from the use of kmap() to kmap_local_page(). > > We've already had patches converting kmaps and you're changing the last > ones, so this is could be the last series, with two exceptions. > > 1) You've changed lzo.c and zlib. but the same kmap/kunmap pattern is > used in zstd.c. I checked out zstd.c and one of the issues there is the way that the input workspace is mapped page by page while iterating those pages. This got me thinking about what Willy said at LSFmm concerning something like kmap_local_range(). Mapping more than 1 page at a time could save some unmap/remap of output pages required for kmap_local_page() ordering. Unfortunately, I think the length of the input is probably to long in many cases. And some remapping may still be required. Cc: Willy As an aside, Willy, I'm thinking that a kmap_local_range() should return a folio in some way. Would you agree? Ira