Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7720328rwi; Mon, 24 Oct 2022 19:35:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6CIlvtA7+vhtV1oFibCZVVURg+urGfwnmpKOAFfr6nF/q34Cst/wr7IKbiVZFdTnP6HM3L X-Received: by 2002:a17:907:7ea6:b0:791:81f4:b0e3 with SMTP id qb38-20020a1709077ea600b0079181f4b0e3mr30803144ejc.164.1666665319643; Mon, 24 Oct 2022 19:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666665319; cv=none; d=google.com; s=arc-20160816; b=zfBWLuAv68/Eb41aYMkwkLLo4DHXhFJA35CCPuRAwMj/g9hpQkPUza/9RnA7i15tXw uMdSK81715sXEb0Y04lsi7gYHx6pS7L7QebpqwH1Mr9daHEylh/6AulGMteBrA8UpS08 1kMLolCPlKGNsLb72CKQN+O9komTCacnN+fkuT2+aLG5Tzf0UbaPkB/FFHuFYaWQqQIt BqUeIoHOeQcGFmp9qpRBjbG48HgwsqV2f2Uyznx256gUrXxC4n8rFSRJ1uPENh6sYLF6 NRNqHhFBB/CvZA4WZuVWCa0kEpifE9Zrh1j9sp2Nhi4sSbsCkGbsi9KHAiZ536bNTtqv Nb3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=s2JFb3R2icFlQ5sGGRLhm0+5Vke/6AqkTDq7yNmGg4I=; b=CuIzeehfsriFQscE/LYBf5QfjA6XbugnGygn5SH+5h/7tUFtlmd+T2POPc+PNJ5ypy 0czPEgTTX0fnoeqWG4Q0FMyNFLZTvS1eVAYQsmHJRyIQQUKLOqd219HaYnc6Z5RdR3rx HGzTJxbLa8GYFJztXMJnNoui5jrP5WP00ZhyQ4K/E7qvpc6dZsEoIiHxPc3xUvhDcmuo yCaaIxOMz+nClURxxiwpIFpCBvynZDkklw6WjkqVGuexXR+yDt1+Wy9LqFRgRMvSohUm TDvWTSuuINPWqPGN1eRqFPjnN5VDeWYX5+8eT3rEcVnB4j+aV9SlasjPVxggaRC4Bwza hTmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FmQ9xbXJ; 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 dx1-20020a170906a84100b00780e022dfb8si1110320ejb.494.2022.10.24.19.34.55; Mon, 24 Oct 2022 19:35:19 -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=FmQ9xbXJ; 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 S230127AbiJYCEs (ORCPT + 99 others); Mon, 24 Oct 2022 22:04:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiJYCEr (ORCPT ); Mon, 24 Oct 2022 22:04:47 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E192AE14 for ; Mon, 24 Oct 2022 19:04:46 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id h2so4126960pgp.4 for ; Mon, 24 Oct 2022 19:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=s2JFb3R2icFlQ5sGGRLhm0+5Vke/6AqkTDq7yNmGg4I=; b=FmQ9xbXJReGqIuEaGypcCNgkZoOI4Q9JLwSLxsuSt6qyuFAjG2hQ0vKFUcmTgRP6gF UTQL3iF7tmZZSxyEqDqwnSAjGGswZY4RC44ZT45i2Lf3+bV1rx70sVCiuj7EqgaDYTdY clu5sCkx9qJNW9UDosOesZB9CwNgkm2IpJtME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=s2JFb3R2icFlQ5sGGRLhm0+5Vke/6AqkTDq7yNmGg4I=; b=Wk5b4cYaLbMpKFCX7MFY8lOo3SdMbhub5mJ+7VPcYuHaBQ2/5modjth1z8pKR3TPai O54cR25XDP00tYE9/UWaXAq2nVdJkTI0fjSewf3i9YIwaSm5ywneCAOglt90h0KIqvB5 3Z8GMFbyaAt4GD5oyw1wBNnTG7/Ky+n7tVS6d6VyCWCZcpKHxToNopM3LVLe9GxWzxY4 CVI0nPHD32kDdmfhsZ3mLYiiGZAoqOpc10gxePm2goZpq3MKJL9bsNb8v4v6UsT7c8MM gTDmeXOHk+68sXSWTJ9Eu8vncihAPhIURmuQBNu0aTqvV5VWCd3AHEkYWZ7GFzwqpRgM hhHQ== X-Gm-Message-State: ACrzQf2TR4D8sERLpnOTNe4IT5FxgdOkRrsMzBpV/3IjQz3vYRgmHdPQ l7+mYO+E2srzRw8lUD4FVXiQiraYlD9ueA== X-Received: by 2002:aa7:96c7:0:b0:56b:c569:99c with SMTP id h7-20020aa796c7000000b0056bc569099cmr8998571pfq.4.1666663484601; Mon, 24 Oct 2022 19:04:44 -0700 (PDT) Received: from google.com ([240f:75:7537:3187:c493:65a6:2d64:1325]) by smtp.gmail.com with ESMTPSA id a13-20020a1709027e4d00b001782a6fbcacsm337123pln.101.2022.10.24.19.04.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 19:04:44 -0700 (PDT) Date: Tue, 25 Oct 2022 11:04:40 +0900 From: Sergey Senozhatsky To: Alexey Romanov , Andrew Morton Cc: minchan@kernel.org, ngupta@vflare.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, Sergey Senozhatsky Subject: Re: [PATCH v1] zram: add size class equals check into recompression Message-ID: References: <20221024120942.13885-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.6 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,URIBL_BLOCKED autolearn=ham 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 On (22/10/25 10:53), Sergey Senozhatsky wrote: > > +unsigned int zs_get_class_size(struct zs_pool *pool, unsigned int size) > > +{ > > + struct size_class *class = pool->size_class[get_size_class_index(size)]; > > + > > + return class->size; > > +} > > +EXPORT_SYMBOL_GPL(zs_get_class_size); > > I'll kindly ask for v2. This conflicts with configurable zspage order > patch set which I posted last night. get_size_class_index() now takes > the pool parameter. Oh, apparently Andrew already has a fixup patch for this.