Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4199635imw; Thu, 7 Jul 2022 14:35:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vW1vH8B8ETlceKoWmp9YdrI6PVWsP0OlW/zOZpqZmrQi3ef4s5+q6Vji1oPqA0SCFXCKWG X-Received: by 2002:a05:6402:2743:b0:43a:7f92:8e30 with SMTP id z3-20020a056402274300b0043a7f928e30mr241433edd.168.1657229728862; Thu, 07 Jul 2022 14:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657229728; cv=none; d=google.com; s=arc-20160816; b=BDPZ8n5V46VPRkRiwD6l5R6FhJA83KUCQK67yVx+6wJ2QxDFlYM2IeKb2UIqU53zjJ Wdo15/3WjTPjdXdh/ZiWZlkhcXUvt7r5KkN4FMjbPHz6lXDJPZbYvUAqVa9CW72AuH+E 12PUwYOwJKLMrz8+XRaERsmX8sKZrNPdEUZ7sOnrl3Iej/kaZz6HTvm0mnd2OJXXAcU2 u5uCm2eUUhab+M25QQwcLGO3LDsnAb9leBOtVqDrz2fGqn9S8CwwD82yE0wXMPoPkPW4 eEgs/JxJ02H0MZZPkn0X8bl2ZPojcjNJLefIHG+UISY+QER3NFri2pjaN92gN3p4fFc5 EF8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=5ykXqRPQ8452sVCrhTFfpsVi7HQroPU8AJ6vHjrScFs=; b=MVdOpBoIIl3qPdxWZtXN+VWgu6F4YtZuD54Fol8RRpjBROPUAOrcFs1z0qt3C3fc8o JXa+MRLH2HXHjBaG7lbTe7Si4U8StKvjTA0+zlP0R7hDNJ7+8Jhk655Re32E7fYvAPUx SBj0F6eDGw5O8gmPnTje6dFBtI9vC9A83UXwVjmNv/6y/mEizyny9oakH3uvair+zkpF 7yKJ8GBCJ31y4PIYHizhfFu6TLBGHYct37yvj0BXNL++hfQ7bnyQ3nQREuBfdTUexx5l wHTAFuAn8YBMBWD5/WRU++934EO7P8FFYIU9N+zxyDykMvYek58WH+PRD2hcTfPMlQHE iRWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=wAp3LKs8; dkim=neutral (no key) header.i=@suse.cz header.b=yrxZpqIN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056402440a00b0043a50590dabsi5387914eda.87.2022.07.07.14.35.00; Thu, 07 Jul 2022 14:35:28 -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=@suse.cz header.s=susede2_rsa header.b=wAp3LKs8; dkim=neutral (no key) header.i=@suse.cz header.b=yrxZpqIN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236580AbiGGVXW (ORCPT + 99 others); Thu, 7 Jul 2022 17:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235974AbiGGVXV (ORCPT ); Thu, 7 Jul 2022 17:23:21 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C033C32070; Thu, 7 Jul 2022 14:23:20 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7EF721F934; Thu, 7 Jul 2022 21:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1657228999; h=from:from:reply-to:reply-to: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=5ykXqRPQ8452sVCrhTFfpsVi7HQroPU8AJ6vHjrScFs=; b=wAp3LKs8EO/4vVUHGERRqAzhgezurQtnIuIjO0A7orE2EKIqCck1L8jxowgYHfPwnnWXh+ 49NFKdzMIa73GyxfKmWAGvBUXbzL/UxtC4Ye96C7SVACYqJKYT1RFFprKqVp18t9oCJeSe XhARzwDX1wGCrajvXa+CTiTYSzzWvO4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1657228999; h=from:from:reply-to:reply-to: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=5ykXqRPQ8452sVCrhTFfpsVi7HQroPU8AJ6vHjrScFs=; b=yrxZpqIN5Zo6khyjeN+AMMSRbdJlI+HH5kcKi2gRZSnO7s0DylrDi4jMtwnEeKL3nJ+vfZ WHF63v9zwWUOADAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 276E613461; Thu, 7 Jul 2022 21:23:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TWCoCMdOx2JXTQAAMHmgww (envelope-from ); Thu, 07 Jul 2022 21:23:19 +0000 Date: Thu, 7 Jul 2022 23:18:32 +0200 From: David Sterba To: "Fabio M. De Francesco" Cc: Chris Mason , Josef Bacik , David Sterba , Nick Terrell , Chris Down , Filipe Manana , Qu Wenruo , Nikolay Borisov , Gabriel Niebler , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Ira Weiny Subject: Re: [PATCH] btrfs: Convert zlib_decompress_bio() to use kmap_local_page() Message-ID: <20220707211832.GQ15169@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, "Fabio M. De Francesco" , Chris Mason , Josef Bacik , David Sterba , Nick Terrell , Chris Down , Filipe Manana , Qu Wenruo , Nikolay Borisov , Gabriel Niebler , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Ira Weiny References: <20220618091901.25034-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220618091901.25034-1-fmdefrancesco@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 Sat, Jun 18, 2022 at 11:19:01AM +0200, Fabio M. De Francesco wrote: > The use of kmap() is being deprecated in favor of kmap_local_page(). With > kmap_local_page(), the mapping is per thread, CPU local and not globally > visible. > > Therefore, use kmap_local_page() / kunmap_local() in zlib_decompress_bio() > because in this function the mappings are per thread and are not visible > in other contexts. > > Tested with xfstests on QEMU + KVM 32-bits VM with 4GB of RAM and > HIGHMEM64G enabled. This patch passes 26/26 tests of group "compress". > > Suggested-by: Ira Weiny > Reviewed-by: Qu Wenruo > Signed-off-by: Fabio M. De Francesco Added to the kmap patches, thanks.