From patchwork Wed Dec 6 09:10:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gao Xiang X-Patchwork-Id: 17607 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3979984vqy; Wed, 6 Dec 2023 01:12:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2PB63ulLfpAZDj/zyoGhOE7oVdbxv7l4E/QdDxRKSakeWR6F3iAsaSWGWeNzKBr28lDdI X-Received: by 2002:a05:6808:209d:b0:3b8:b063:8247 with SMTP id s29-20020a056808209d00b003b8b0638247mr795620oiw.73.1701853920814; Wed, 06 Dec 2023 01:12:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701853920; cv=none; d=google.com; s=arc-20160816; b=JKPzY3zLn9pKmlj7BHB5JiUI+DcqvNFfKkTNAIOtaFuVzxWtfwCZ/tX42Rmd25AOEG KpiuesHUqNUXuVVLs1+hxvcjekof0FL/IopZnDVfVxmt8RZtmVSnm8E2pMFTkZSDnWvk PpyBX3xIu3Jfu4XpCcijeOfkUGt9wwyQIHOwYUueFXqEjzNn1ZRoHCa3h9zrQjJ5Aiak aHG8/W942awXI47Ls/yVgtM/yxXPvZoDmM/O69aByBaAS23CK7oV0Y6+nQshzY+Z28Vo g+Niz37BRfBaZZOM3yj4oZz3o4o692+PMHXoPkGV9i3jPFbXy8Gul61/MefQ0Steloys 3OEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8S1tYjCboCWoFfVq2KJHgTFdY3UlnnBEOwVBXcGNJ/Q=; fh=Z0R8B0AmUMsLcNxAwFR/TDJEQ3RBfXHfZWEZwiqrD84=; b=qIfjfM00Tzun4zQVgjTc4fntWX44dqn9sr2+SILONy+Kr65WRhq6b18vy1IRuOnCXd 1eVsSrqLouFeHLAN6HdzoGw70ntXnWh5wzGcOyq98KSFMAuC2jhCdzZ1pS7Mj6fv/eaS gDRm/uAnaCLWXAj8lF9oi1mC9G2BNjSSVZPVtKjDaIFUL9boJ8pBk/lJOZT0gdMkJK0i yaPVysM4JzhOyHdyzL7tMMfPK0XkKCBAgBceHWbD/rmleUj5EVf7AdrY8F2MmJtFXEBI frR+h2o6WsY5LUxEIpfNtnGtY21uNH7pNfaf+HmReAG4VgV0a6BkB3YDx5MS42xa+5d1 er7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id fd14-20020a056a002e8e00b006ce1ff0ed26si7456931pfb.375.2023.12.06.01.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 01:12:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5BA7080BB1C4; Wed, 6 Dec 2023 01:11:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346727AbjLFJLK (ORCPT + 99 others); Wed, 6 Dec 2023 04:11:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346881AbjLFJLI (ORCPT ); Wed, 6 Dec 2023 04:11:08 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2B6711F for ; Wed, 6 Dec 2023 01:11:13 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R511e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VxxSRMO_1701853861; Received: from e69b19392.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VxxSRMO_1701853861) by smtp.aliyun-inc.com; Wed, 06 Dec 2023 17:11:11 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org Cc: LKML , dhavale@google.com, Gao Xiang Subject: [PATCH 0/5] erofs: basic sub-page compressed data support Date: Wed, 6 Dec 2023 17:10:52 +0800 Message-Id: <20231206091057.87027-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 01:11:56 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784523176856715086 X-GMAIL-MSGID: 1784523176856715086 Hi folks, Recently, there are two new cases so that we need to add a preliminary sub-page block support for compressed files; - As Android folks requested, Android ecosystem itself is now switching to 16k page size for their arm64 devices. They needs an option of 4k-block image compatibility on their new 16k devices; - Some arm64 cloud servers use 64k page size for their optimized workloads, but 4k-block EROFS container images need to be parsed too. So this patchset mainly addresses the requirements above with a very very simple approach as a start: just allocate short-lived temporary buffers all the time to keep compressed data if sub-page blocks are identified. In other words, no inplace/cache decompression for the preliminary support. This patchset survives EROFS stress test on my own testfarms. Thanks, Gao Xiang Gao Xiang (5): erofs: support I/O submission for sub-page compressed blocks erofs: record `pclustersize` in bytes instead of pages erofs: fix up compacted indexes for block size < 4096 erofs: refine z_erofs_transform_plain() for sub-page block support erofs: enable sub-page compressed block support fs/erofs/decompressor.c | 81 +++++++++------ fs/erofs/inode.c | 6 +- fs/erofs/zdata.c | 224 ++++++++++++++++++---------------------- fs/erofs/zmap.c | 32 +++--- 4 files changed, 169 insertions(+), 174 deletions(-) Reviewed-by: Yue Hu Reviewed-by: Chao Yu