From: Petr Malat <oss@malat.biz>
To: linux-kernel@vger.kernel.org
Cc: nickrterrell@gmail.com, gustavoars@kernel.org,
Petr Malat <oss@malat.biz>
Subject: [PATCH] zstd: Fix decompression of large window archives on 32-bit platforms
Date: Mon, 14 Sep 2020 08:19:31 +0200 [thread overview]
Message-ID: <20200914061931.21886-1-oss@malat.biz> (raw)
It seems some optimization has been removed from the code without removing
the if condition which should activate it only on 64-bit platforms and as
a result the code responsible for decompression with window larger than
8MB was disabled on 32-bit platforms.
Signed-off-by: Petr Malat <oss@malat.biz>
---
lib/zstd/decompress.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c
index db6761ea4deb..509a3b8d51b9 100644
--- a/lib/zstd/decompress.c
+++ b/lib/zstd/decompress.c
@@ -1457,12 +1457,8 @@ static size_t ZSTD_decompressBlock_internal(ZSTD_DCtx *dctx, void *dst, size_t d
ip += litCSize;
srcSize -= litCSize;
}
- if (sizeof(size_t) > 4) /* do not enable prefetching on 32-bits x86, as it's performance detrimental */
- /* likely because of register pressure */
- /* if that's the correct cause, then 32-bits ARM should be affected differently */
- /* it would be good to test this on ARM real hardware, to see if prefetch version improves speed */
- if (dctx->fParams.windowSize > (1 << 23))
- return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize);
+ if (dctx->fParams.windowSize > (1 << 23))
+ return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize);
return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize);
}
--
2.20.1
next reply other threads:[~2020-09-14 6:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 6:19 Petr Malat [this message]
2020-09-14 19:14 ` [PATCH] zstd: Fix decompression of large window archives on 32-bit platforms Nick Terrell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200914061931.21886-1-oss@malat.biz \
--to=oss@malat.biz \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickrterrell@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).