Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2379852rdf; Mon, 6 Nov 2023 12:21:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvs1fLBzYBJ6nth4156oFytKrFNQZwcWRe758cdEvqdhNIzA6BhDfcVSEelSBdTtp0f0bU X-Received: by 2002:a17:902:d50b:b0:1cc:6fa1:c99f with SMTP id b11-20020a170902d50b00b001cc6fa1c99fmr20573040plg.57.1699302063017; Mon, 06 Nov 2023 12:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699302063; cv=none; d=google.com; s=arc-20160816; b=drEJ3ZQ/lJl5H9ihYz+V7Lli3tILk1PjZWTcBOeDeLh9R9XjPQSz/DAjW4wIGpqj0z 8B8M+lH+VyjIC5evXpLUcfsJCuAEndrUMa98vpHctDytRur7pswK8ZpAG8RQ7FneQifT hg4jh9nvCgRmdEkhp00GQzXwklGDRJDKlQdSlVWMIeyUVbUv/QfLsWxpzFtvdwaKDdd3 iBRDzdew5J8a3TDghl5UoTrC5wSRKU3w5LDX2bATp0NjMfg2XIh6P1mx4zPUIDVeGJvO PWBsMURClbTZiJhvQkA2mbW3UnVapQ52cGmdB0g+07wyyxcS/aF2ozUXDWOGGctseb5P IenQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:from:to :content-language:mime-version:date:dkim-signature:message-id; bh=Czz03c7B8Ipf+ig640Okg2kezVH+J+rO2vcFaPEA8SI=; fh=gaBdF2fxwNxCuTCqRe00/rCXWp2DwFdMZRDQPiFBRds=; b=HAHrrc4ikrikp8c3C79SMk/imwclIYqPbGBWju1zYTwXz/IWs0Iin261w81mgpZ2BD dl1by+zcEV2Vn0Joz73VuIzkMPFOWa+QFvlYM0TxzFUG6lSXKTpnOW+P0ZCaUFNQRE9+ QTArd0IVsmlirEn6gjT/1fknsnOagXwU8j5sZMa9KZb/q7c09za2WyiZa7qkc84+34YF qziwD/j6yv1PgWTAZc+TzU9gA18g8ur027ScYgVFL8DlH3QUbPRciceo8UQEPp69nN9S B53S/x2HEcdShoOJ+1qH2SOgZ4pYm3n9K+o0aqgztNwME0jFP2FCvmIOXiKjc2afk9en bYmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DUfW9aQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p11-20020a170902c70b00b001bdca6456c3si7977937plp.46.2023.11.06.12.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:21:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DUfW9aQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B897B80B1811; Mon, 6 Nov 2023 12:21:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbjKFUUl (ORCPT + 99 others); Mon, 6 Nov 2023 15:20:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbjKFUUi (ORCPT ); Mon, 6 Nov 2023 15:20:38 -0500 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [IPv6:2001:41d0:203:375::ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD8E010D3 for ; Mon, 6 Nov 2023 12:20:33 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1699302032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Czz03c7B8Ipf+ig640Okg2kezVH+J+rO2vcFaPEA8SI=; b=DUfW9aQoAa6yKtr/cSFLVHgtZXmLbklWuRO7WXE/j1JrkjsJsNMrdL9JM/X5hyc4CvQVgc VKZrg1bf4JGwU5MYJfFY67bBfbpXqWaEufPekT2By+ItH2VeISDVk4PeVAUU4p0qQYS3j1 s7fWM2zNpy7lyxKrwsA0maqUNITNcR8= Date: Mon, 6 Nov 2023 23:20:30 +0300 MIME-Version: 1.0 Content-Language: en-US To: Sergey Senozhatsky , Minchan Kim X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vasily Averin Cc: "linux-kernel@vger.kernel.org" , linux-block@vger.kernel.org Subject: question about ZRAM_HUGE flag Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 12:21:00 -0800 (PST) ZRAM_HUGE flag doubles most significant bit in zram size. I had an idea to redefine it, but do not fully understand how to do it correctly. I'm sure that MSB = PAGE_SHIFT on BIG_ENDIAN but do not understand what's happen on LITTLE_ENDIAN? Is MSB = 0 in this case? Could it have some other unpredictable value? In any case I think we can always replace ZRAM_HUGE bit check by BIT(PAGE_SHIFT) test. Thank you, Vasily Averin