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 03B93C43334 for ; Thu, 7 Jul 2022 21:23:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236459AbiGGVXW (ORCPT ); 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) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@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.