From patchwork Mon Jan 9 03:38:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13092909 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 4E3EEC54EBD for ; Mon, 9 Jan 2023 03:39:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB1AD8E0002; Sun, 8 Jan 2023 22:38:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D61EE8E0001; Sun, 8 Jan 2023 22:38:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2A918E0002; Sun, 8 Jan 2023 22:38:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B494A8E0001 for ; Sun, 8 Jan 2023 22:38:59 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 84254C0197 for ; Mon, 9 Jan 2023 03:38:59 +0000 (UTC) X-FDA: 80333854398.14.A881822 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf06.hostedemail.com (Postfix) with ESMTP id C7FA2180005 for ; Mon, 9 Jan 2023 03:38:56 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=N+gCejtG; spf=pass (imf06.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.181 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=1673235536; 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=3rwMtQBgKwO7eAmp8m9Hgu5RBxRCX5+X5JE5ozFyItE=; b=5CnJpcCR3ZQI39gk3nFwX5Bj8HijjB7YyAna1g64XXYZRYf6+fT64XVZfw/fscmR+qyT4e iDFs3JY0y9cPy8EwBoREgDbuO3KZvVLhzAD1XNNYyq2xY27xZdlTrirQrUeQf2feWsBQTP U9zZvtoQG8YE8i8Ej1v723TnL8Qr3qw= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=N+gCejtG; spf=pass (imf06.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.181 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=1673235536; a=rsa-sha256; cv=none; b=2a75TtlXUrH7RsKGjzih9af0/EF6OvvlmOWXi8XcVRnQ8IDssWhCDTBZhXEbiNKL79QhVg gbrk5vtYCgJP9bn/oPDaNi2w2gWzZ602bVI3YGqylXv+KXkJDyGB9yCB0gooJrLBmsNOgd 26WfYt81SndoCa1hMJoJuwjES4r4cEY= Received: by mail-pl1-f181.google.com with SMTP id g16so8139396plq.12 for ; Sun, 08 Jan 2023 19:38:56 -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=3rwMtQBgKwO7eAmp8m9Hgu5RBxRCX5+X5JE5ozFyItE=; b=N+gCejtGUGSll5gVYjwLR9LLtG//JjdfH1iaeAVD3NDHajJx7yaNWQ+d56J3ctRWHr dlQW+f1kIcZLHC9GQYB6MfoUro1cJL1JEJOMKwIy/mv+jUTqietRabgBAlOnvgKtqdSm Q+2MeyCML9mxsJkcp2vAmx/5JAPVRKj/BQ8p0= 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=3rwMtQBgKwO7eAmp8m9Hgu5RBxRCX5+X5JE5ozFyItE=; b=jtr/g8TR5U0nQFqzPqUgZOA7tPRsgSXcc/axhB/dmzKKBzK4W9BQDvdsjU5l5laD6M RNxgJO2No2pt3GwhQB0/xmEbb7Ks24uZHyg1DqoerKeXWUdNOdJFkhUahBNUhddJfVFm 68EQNqT5LjZ5nuvgY2yXLUGW0pIrDraKFsQQwe1Vk0bmCDywk0vp960/dAWv7yu0naiW QmZ33LKxqyhoxhvz9ajdflpP1n0FT6OvMY+KCFPYxD4PP5HoKLeQdxg65TEp1APekDZ7 IPSLww1pgcnn5AJSqhWj74VN78h9DGIWjTk+g8ozeHmjSuX4gCr8lIp7P571nMmM4qyV h6WA== X-Gm-Message-State: AFqh2kqo7dIGJdjVUcQr7CFiIGhiG1xSBLLyUbPE1kuPUawdXsMSew1f gLHyJVgxmjMOEZnzcPiGeIdmsw== X-Google-Smtp-Source: AMrXdXuLOTYwxtcj3xS7+60j1kkgrt7TeaPlA3xpTfWv2I6LoNzwh68AFRfYVqio2KWOEdMkO9vj9g== X-Received: by 2002:a05:6a20:4283:b0:a5:a9c1:5600 with SMTP id o3-20020a056a20428300b000a5a9c15600mr89003130pzj.48.1673235535583; Sun, 08 Jan 2023 19:38:55 -0800 (PST) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:5ec1:f8d2:ce47:7ddc]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e80500b00189529ed580sm4896685plg.60.2023.01.08.19.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 19:38:54 -0800 (PST) From: Sergey Senozhatsky To: Minchan Kim , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: [PATCHv2 0/4] zsmalloc: make zspage chain size configurable Date: Mon, 9 Jan 2023 12:38:34 +0900 Message-Id: <20230109033838.2779902-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog MIME-Version: 1.0 X-Stat-Signature: 6feqe1ikjw6z8bo1gnht7n5mig89yuze X-Rspam-User: X-Rspamd-Queue-Id: C7FA2180005 X-Rspamd-Server: rspam06 X-HE-Tag: 1673235536-183622 X-HE-Meta: U2FsdGVkX1847HOhDmmTN/++C6q0xuYQwGt+FpQ0mjxVWyXr1sLxq8fFotDNqwgZRFzP3Z0MM8vqtTQtZtI/EPxO6vXjoP95pxRUik+rS3H1M/DWxg+4afYLSDH1d3DiIq4mKoL1wNqAMzT9+dzWxh7JDdo8m5vuxhC6rJeC8OoflokjHKlRJoBE7gM5FNOu782Iw7R1mJtLgDjtGGDgaVRT5mxVjAC7Q38tHvRxBHIFZmHtLh+ti0/OwJAmQWrgIH2o4kiJrlb79ij2dfwU9buCv4wXM7GJkNlPakNBYgvA6vNOZjdrMD+Dz00+UrSWT4IqNElRRDAXiM2UHjLxdYETPqX73ghQJsRInna6xYT2BR90FzUwXz/stVtiF1fTdyJAENsmD9d3dHbmze/qjsdWlQ+j/FwMCw42JDC27wC+SPE+oGwUCVbEqdGhVbcH4iZWw9uQv6F9ZtcnHN6atIMECKBcStc2A92GRZxJqgFzqWGTnKglH/ZT3bX7/SUSxqLsdq8DinKFE90jap/qQPadel5dt32qGm0OyvS4YgSofajIe5jg4LnNvmgRSPJjz01aFHn1P+Zl7YXJSDpc9GGG4gh7Gup6l9NEpa6iNkDvkwb21oREMZkKyPS8MHLa5TENOSuyW+MSm7Msk+1bf9zIkxp5CAvGt04VaoKAal1XhS1+s5aJcl7Y2jy9Rin8aBJ0OmGMtW3cPMR/bf/I6e9hVSioX3OYWpPOn2iQyZg+iZCBEqeFLwBCyrjZfZS8pBfstxb1g5u3xg2fF0yiN97XBP7aMQX7NPRWD2noW2CuxDyn7a3JLetTQ1QorLY2LzYqmFlJ7Qt3q6K6BgCRcUUJjx1NOyXhjGnJyInk8u/9vO3gVGPRDwjzuQ0MZ/WMV0aK/T23o4vAyMOPpHw3KLhwG1ceyh9JmeO5+rOZ4OvuxujZjptt3tH1vztBiAjvoHlT5RbI+KqnMmYroMV 4WUU9KNZ yxvj0HhXo24JbnTwZHFWduDHh7kKZKoN6WLrR78LYn4blp81Y0H+Gp8D5P2Xzwylq4kmognnm27yRatTDloCJcLwdNX7t7t5C7XO0wHZl93iyHh5gB0DriHSJ8FMw8ftRJ5IQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.004432, 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 number of 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 Documentation/mm/zsmalloc.rst | 168 ++++++++++++++++++++++++++++++++++ mm/Kconfig | 19 ++++ mm/zsmalloc.c | 72 +++++---------- 3 files changed, 212 insertions(+), 47 deletions(-)