Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2821746rwd; Wed, 14 Jun 2023 07:46:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Ws9XDpnMZ4qha9S6ghNR9YJ8YPUtTkvogff+cTqSOfvRWpoN7+VD2u4MjPlvCRQI/nRM2 X-Received: by 2002:a17:907:940f:b0:96f:7636:65ca with SMTP id dk15-20020a170907940f00b0096f763665camr1873949ejc.3.1686753974695; Wed, 14 Jun 2023 07:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686753974; cv=none; d=google.com; s=arc-20160816; b=OI5ESnOVUhE3J8iClm0vr8+YgP8uMlyyPGN3xaFhoU+POQv78GZSwT/Z2ouXZg1HDX lMOOH9Vo4q2SR0uqr6v8ok6A8lBa01TtXgLah47wCWxmzPUjklt2fHNDq4cTidbdg+aR 1xKPT/0WbcyaJZhKl6vJ76/op/y69pnvVIKfMC9sVAD16QPi16j8vHf54D52gZhGGg6q RSVsUgdDEAHPfESZucwqTjocmNPAyGlaqquQZJa7+oT80BeZvBs9qe76D7hzJxfu+Kq4 wy0/3C9a3AgyJ3rZyIVq746C3x+uMQvxMcNbGfn/7bDc7tIbzUDHrIzG1YZtJv8I5D/P HUww== 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:dkim-signature; bh=atkhLsJk4kYIR051jZUJsqhyVSqD17cKG1dfd3E+c04=; b=SSEpOTZKsDcxU78HMJMpCMYJEypDko6ZBjTkKuPytIsOTLtGleYPtvIjUomy8KpTS/ EPuNnAq93PM8IobDeH+OXoHgz1SIxSwyQuWNL1xtAFTXmkSqpNCxBQA0npGaA8coJi2A FJBrknU7el9GiYkY5UdUWmF2vbKVKFDgkLWB2PK+Yyf4vQ8kqwEbOH7vC1SqnAWODfEO 7GZt0Nye9ITbj3+QLlqZVG2giilrPYcMlJXLfZYO7NNDEnoa6I69kY4MqGjrYvPZcZdk 698txr+P8OspAY/gqXOHy4mSw7/mW1K66jnAl83HvbWJzKdUXQfpbEedH+IWFMHH1hy9 r/wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QtPPdAz8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a17090624d500b00977ec68f019si7867280ejb.228.2023.06.14.07.45.49; Wed, 14 Jun 2023 07:46:14 -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=@chromium.org header.s=google header.b=QtPPdAz8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245459AbjFNONu (ORCPT + 99 others); Wed, 14 Jun 2023 10:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235340AbjFNONs (ORCPT ); Wed, 14 Jun 2023 10:13:48 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB271715 for ; Wed, 14 Jun 2023 07:13:47 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b3d29cfb17so27169695ad.3 for ; Wed, 14 Jun 2023 07:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686752027; x=1689344027; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=atkhLsJk4kYIR051jZUJsqhyVSqD17cKG1dfd3E+c04=; b=QtPPdAz8+r7dt+3azArNI+jobqYcT5F/K5n1989N0B9h/dF9O0THNdPrbOgk401sv3 5J4d7liK3gdJtZ9cdamd5TvGz8tspTsfmQzlUei3suVhQyLyrh3DkFHy4rVZlSHdPsr5 YEErmKXQc4bgS24oNRScFjmmHUyABKOtOISkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686752027; x=1689344027; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=atkhLsJk4kYIR051jZUJsqhyVSqD17cKG1dfd3E+c04=; b=XG6KApn9iuyd6vjR8SCYSO+ngjfV4HfjXILsPiZRzBfIDg4QJhgaz+8aRyZDELd1Me A9EQ8/3eRZaqA+yhE5N2KOPfd6LsRxr/6Xc3+Eizm71tjztwrQigH4IS2KW8UFpajIj1 8DVNBwrQqIn8FEcAGXkNMO4Bv9aAM9yJl33wwA8MMrXDtq0EXNyU2EmLzoPsIFaN4byA Ry5KEae3Il6cH9p+eG+sRyBLUB3W0SVCZGL9DgFmGv0crgFGt7hc1Q2CwNQ4mCj3PzSO kAzTEwoezYXPVKZqdz7GkOdbbwULd9MD2hVsrZAmnlzu92O1dw0uVtGHTiA7m2PNNVGL s+KA== X-Gm-Message-State: AC+VfDwOtC7PiRMG8ZwD15c4eaXFNH5WEZ8VwcumO0zlM7fUchKe1JJJ EEXy34FBlCF20tA+whrJO4K2tg== X-Received: by 2002:a17:903:124d:b0:1ac:aba5:7885 with SMTP id u13-20020a170903124d00b001acaba57885mr14900116plh.47.1686752027301; Wed, 14 Jun 2023 07:13:47 -0700 (PDT) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:e1a3:812:fed0:eeab]) by smtp.gmail.com with ESMTPSA id h18-20020a170902f55200b001b042c0939fsm12226648plf.99.2023.06.14.07.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 07:13:46 -0700 (PDT) From: Sergey Senozhatsky To: Andrew Morton , Minchan Kim Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sergey Senozhatsky , Brian Geffon Subject: [PATCH] zram: further limit recompression threshold Date: Wed, 14 Jun 2023 23:13:12 +0900 Message-ID: <20230614141338.3480029-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Recompression threshold should be below huge-size-class watermark. Suggested-by: Brian Geffon Signed-off-by: Sergey Senozhatsky --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 1867f378b319..5676e6dd5b16 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1753,7 +1753,7 @@ static ssize_t recompress_store(struct device *dev, } } - if (threshold >= PAGE_SIZE) + if (threshold >= huge_class_size) return -EINVAL; down_read(&zram->init_lock); -- 2.41.0.162.gfafddb0af9-goog