From patchwork Thu Jan 5 05:35:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13089460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C8FDC3DA7A for ; Thu, 5 Jan 2023 05:35:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 96F6C8E0002; Thu, 5 Jan 2023 00:35:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F9018E0001; Thu, 5 Jan 2023 00:35:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 799EE8E0002; Thu, 5 Jan 2023 00:35:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 679B18E0001 for ; Thu, 5 Jan 2023 00:35:25 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 26DB01A09CF for ; Thu, 5 Jan 2023 05:35:25 +0000 (UTC) X-FDA: 80319632610.03.08E8A70 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by imf10.hostedemail.com (Postfix) with ESMTP id 8CCD1C000A for ; Thu, 5 Jan 2023 05:35:23 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=EGSjQuyn; spf=pass (imf10.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.170 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672896923; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=4r1zqnoa/GOJgbipuY63hrj66rflDnjIXWSbNhuGNOs=; b=5Tf2EqBlzjqNYFGZ26kWMwVVAByC/d84ncy7he6AzleHoinjKFWVbZ4KBA+msyUr9QJMuR eyAqnAofGcuJ4vxIRSS4TOheVkDF0o5EshNmqTTFirOpbPcXWBIn5r7uVwVo3pEyAq0k7b /UmhuKGFYMtSi33Fj2OeE6+F1fgFxjE= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=EGSjQuyn; spf=pass (imf10.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.170 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672896923; a=rsa-sha256; cv=none; b=VAF9/llwYy7VGp4oQl54w4fU/F8zJa6W2C7gvOLYJMasDikje0HP+u4Y1dZ++ZCwAEo71I 6G1Dgpm/KFwppLdIOlYPqNOzyLEAlRRZhN+H3YGY5rJSFB7Hvj7np8i94wJ0UkwhBm8lfP Dr0CDJCGlMukvSTJiBs1RE3+g6Ie3O4= Received: by mail-pf1-f170.google.com with SMTP id 124so24590451pfy.0 for ; Wed, 04 Jan 2023 21:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4r1zqnoa/GOJgbipuY63hrj66rflDnjIXWSbNhuGNOs=; b=EGSjQuynS9un3JVTYO3IPwb/SKQnRRKPMu5l4AcWJwJkIa41oT44erlsdk340mhgJq QQ4vKm6QIvpotOqon7b9f6aRyGU7747+46h6H5V83squFiIRkZkqcgj1gtdQVyxoSXlb dFiimNWktvFQsLzrD88NlmZry7wSmMdtZ6Mis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=4r1zqnoa/GOJgbipuY63hrj66rflDnjIXWSbNhuGNOs=; b=1HeWAdfB9vcseLnFqQlz6h2v+7T+FmSJFkfF+pkwVnMjscnulBRfvWh0bZ2rojjgcA sXutxTLPRGFbJZKDFfmzZvEXOpHlki5taLl//ZAjVO13hcMoLo+IiAnWEK0GaHsneFga 084DSIY91irg1fPJBVLVIaejH7apmNSVJYrCapWuveIUk6xvQFRMdQIC3nR93mQWlajn SJjkowGFlAyElZaz7KtgcZBBu/QUxKdBXiPiXqZvFWp4ztfo0+b6QySoDpxuZdBKvjoL TwqjB82Osmp5vwsKy1hVUIy7GDQnJ5KbU5r3BKhP0jyNuW0Q0AW2/ueUD0NsuO4WKVRT 7hTQ== X-Gm-Message-State: AFqh2kq7j/7oFfROpDqgimGvonWE4Sv+JqcJ1I/soYzTUMTVbxLXwbfG lE4uQfp1Apj7p1ZXa2wnw/Oaug== X-Google-Smtp-Source: AMrXdXsbFn5JrU6+iN7GR2Oy3X56+lrbFBucclMH1z40yHL2DQWiwTRtQeyRqTl4hQABHoAJZOko9A== X-Received: by 2002:a62:1e42:0:b0:582:a0e4:c45c with SMTP id e63-20020a621e42000000b00582a0e4c45cmr10615949pfe.3.1672896922299; Wed, 04 Jan 2023 21:35:22 -0800 (PST) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:da84:4bce:bb29:7dea]) by smtp.gmail.com with ESMTPSA id v27-20020aa799db000000b00577c5915138sm2036855pfi.128.2023.01.04.21.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 21:35:21 -0800 (PST) From: Sergey Senozhatsky To: Minchan Kim , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: [PATCH 0/4] zsmalloc: make zspage chain size configurable Date: Thu, 5 Jan 2023 14:35:06 +0900 Message-Id: <20230105053510.1819862-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8CCD1C000A X-Stat-Signature: nahkcagpecwmhqo1ka3keoai7e5j1znf X-HE-Tag: 1672896923-702736 X-HE-Meta: U2FsdGVkX180S2kixLAzdeM8smmPX0iR1tj70jArWwr37/YGpDGw7ThvpvRld3yEmINL3un8Q4QNQJDtFtClFINKySnqpQ39TbtVpjEdXgwV7KqqMYtT/UtNc5XysmQdwYTM0AeKaABUv/wkExOHZ0iSScz/bylvdBsJIm63MrVQgaEL7AuO8x/adVdbenF7jAe5tgivxoZL6un0TThQCWzGRA4u66xi4pvAsszBiB0EL82ykdKhbon9U1qI6VISTQFd6tqO6Cho4Wo3sFI2uAy9eUjPQdcAy12GRlkuBGG7GSE7xfiyDauGwx7fnB0tNjG7KFsDnO3AFDVH9Lh7MixumsJgghDOMkvbQxqW0yVwb5iUNeODkK/0Y9Bdtb85pNvXbSJiE1/ab9hhthaKmmyNPwDsK+MPLqi7otFYAOmaHQfcDmIZr2eXePxSlLt+N1zOiLPphHiF2NBTqPrmqKs1xrqHV5P/AJJfvXBaE9qVayvjavFTyTnJ7Iz0ISUbvOLwrl2NBAer11q4SP2Wkc1L6s/CBZeplkfc4p1x5XcihcZq+O01hme4x4gJIHw6rZe/HXC/bqv8d1/Ps9Arjpcap2GCfFgUR8aoaemaFAnT+hZUgrzC2a698BJeWZ+8gNbH2eISNlKafwoS0YkPcooQ+HLkg/ZS9+K91LC/y3gNevu2sxFuqrjZ3IquB5jyRUv3WCVLni9ndfJrDsFEPtO4iLhomy4MkGp0sRenlD/2VB7PEu3RE1UpP5OziUPyZRzHk2Nf53MaVhe44NDpJIWao9173KFlE9N+AAPfbhqxkebO2zrKCFLm0VOQuPi2pbdNQQlQYNAn0P7raMQnbk9ObUevjrs26lddkNFCAuKNP9gt4m2ZS8f1bEDck3GIwzuvnizc6La/dvWtzhyhY0E4zlfwAiuN+e8kE4PN8JYPKesEBoFddwbDil/gP008uFe89Eis7tWQ1SrpQH6 nUrLdRiL 7PEgBpD76+PU/f9dMn1yOZQryPMznNMHkuqMPCsZ/oNGjFpazSW8T1Dun+BoYfqC5NQZZP+bJ1tb4JIuOFioqFCSN6o6N2kJXAhEalOKlggq53DH0MeBKvNS3PVnSOX9wnc8W X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, This turns hard coded limit on maximum physical pages per-zspage into a config option. It also increases the default limit from 4 to 8. Sergey Senozhatsky (4): zsmalloc: rework zspage chain size selection zsmalloc: skip chain size calculation for pow_of_2 classes zsmalloc: make zspage chain size configurable zsmalloc: set default zspage chain size to 8 .../admin-guide/blockdev/zsmalloc.rst | 157 ++++++++++++++++++ mm/Kconfig | 19 +++ mm/zsmalloc.c | 72 +++----- 3 files changed, 201 insertions(+), 47 deletions(-) create mode 100644 Documentation/admin-guide/blockdev/zsmalloc.rst