Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1104324ybl; Fri, 13 Dec 2019 09:36:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzBG7rCvlZCCycDZ198ZGwrYRr0Ba5UVRJd/STB+Swkap07tXefjINfyzbBhYAaN+vKGYms X-Received: by 2002:aca:4850:: with SMTP id v77mr7133298oia.70.1576258585362; Fri, 13 Dec 2019 09:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576258585; cv=none; d=google.com; s=arc-20160816; b=v8jtxktQqfy0JG7oFTeUatDhahTRECV8+9RxHFUuBLYi8GRUylKud9tMkATjPOPPJI RSl/P3OMesYP0c3piZB0XYYaNksb2ackaOBddg49QSrD+2QkAN1OjfOdPQ9/EhVCxA0X RDAnecMn3jVSLYbZECt4eiOKXGK6ufdfMHT8moMCkC5tGjxf9AAYfOC/mKYCNvx5/zt4 2gT/U6iqxE836+yi7yzp7DAYKYtEzIkIf81T5eYhbKCe7d3UTgOP/iHCfalKP8DUFbxp ilTE869/U8Z0vYB6n6XAWVAHCsX4dDSbUi/CpRiTPGbtW9IAbawdi/nmotKr2AlfhzBx 05cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=JzMKKUDLm3IznVXLnPy+ZN5JAlzYn/91ZcMO/rvi6pI=; b=XzP0Slec3/OWDj9ROydH9C8LtA6+/e9pOryKxRiGCqoh6AosHV+vMnqJsRVMlDJA/n ca0J6Sa34Etvf6leDNW5BXm0R7SWr5hXlwLCXy9gq46LvFNLzEvCFEHNUoVIq1Ta2Eqh jqzByMoFksIlQH8cMLOyLYaV61oOSbjrxCOLB/RJHXfRG0HnyOpLyQNY9Q7jlzOCxMCe xCxqf/fwrguc1c0X7XiPKV/jb4fR9xDjnZiOy3qdKoPLx3gVkuL/7dZndBvYBC/79abi sktYmOft0GsfMotBmJPHUM5QjyfYR6xlPnGR9GhFh8rntQ0uCIkp+fNnm1XcTKF5LWxO 70kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w129si5426288oig.83.2019.12.13.09.36.13; Fri, 13 Dec 2019 09:36:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728517AbfLMRfb (ORCPT + 99 others); Fri, 13 Dec 2019 12:35:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:43882 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728109AbfLMRfb (ORCPT ); Fri, 13 Dec 2019 12:35:31 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EF350AF2B; Fri, 13 Dec 2019 17:35:28 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id D9995DA82A; Fri, 13 Dec 2019 18:35:27 +0100 (CET) Date: Fri, 13 Dec 2019 18:35:27 +0100 From: David Sterba To: Zaslonko Mikhail Cc: Andrew Morton , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Eduard Shishkin , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] btrfs: Use larger zlib buffer for s390 hardware compression Message-ID: <20191213173526.GC3929@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Zaslonko Mikhail , Andrew Morton , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Eduard Shishkin , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191209152948.37080-1-zaslonko@linux.ibm.com> <20191209152948.37080-7-zaslonko@linux.ibm.com> <97b3a11d-2e52-c710-ee25-157e562eb3d0@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97b3a11d-2e52-c710-ee25-157e562eb3d0@linux.ibm.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 13, 2019 at 05:10:10PM +0100, Zaslonko Mikhail wrote: > Hello, > > Could you please review the patch for btrfs below. > > Apart from falling back to 1 page, I have set the condition to allocate > 4-pages zlib workspace buffer only if s390 Deflate-Conversion facility > is installed and enabled. Thus, it will take effect on s390 architecture > only. > > Currently in zlib_compress_pages() I always copy input pages to the workspace > buffer prior to zlib_deflate call. Would that make sense, to pass the page > itself, as before, based on the workspace buf_size (for 1-page buffer)? Doesn't the copy back and forth kill the improvements brought by the hw supported decompression? > As for calling zlib_deflate with Z_FINISH flush parameter in a loop until > Z_STREAM_END is returned, that comes in agreement with the zlib manual. The concerns are about zlib stream that take 4 pages on input and on the decompression side only 1 page is available for the output. Ie. as if the filesystem was created on s390 with dflcc then opened on x86 host. The zlib_deflate(Z_FINISH) happens on the compresission side.