From patchwork Sat Jun 24 05:12:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13291597 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 EC0E6EB64DA for ; Sat, 24 Jun 2023 05:31:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2BCBE8D0002; Sat, 24 Jun 2023 01:31:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26CC98D0001; Sat, 24 Jun 2023 01:31:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 134D08D0002; Sat, 24 Jun 2023 01:31:30 -0400 (EDT) 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 007628D0001 for ; Sat, 24 Jun 2023 01:31:29 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C39751A0E77 for ; Sat, 24 Jun 2023 05:31:29 +0000 (UTC) X-FDA: 80936518698.04.9FDF7AA Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by imf14.hostedemail.com (Postfix) with ESMTP id 0BA73100006 for ; Sat, 24 Jun 2023 05:31:27 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Z5+8hPZy; spf=pass (imf14.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.222.176 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=1687584688; 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=CpNamKrNpDCdbcF9XbjJPNcFm86c8B3puQQnd+r/HGw=; b=sg/iCf2a/tf7CGMDw8B7LqEYY9BoW5HhGSi9tCJ3tA0lbs3+11M3mN0AIw6DfLCcehIsUj 0Pn4b3e0qn7MAgkaVKOcb5z+1S4cqWcGYazAyAxBkwHpYiEgSeE04mO+gk4qh+0wFSNPjw SlJClr80RenkdoSlTHV3jpnZiK/2GFY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Z5+8hPZy; spf=pass (imf14.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.222.176 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=1687584688; a=rsa-sha256; cv=none; b=hNkoMogJSkK36r8e9/OoYFdGsmgI7TieHS80nk+f15/PoJM1MzbMk7Fi98lv++FEdINniT 5w4AukiObhq8q3hwAirkvYTYU2FSIp20fMixqzY0QhooIkNdVeLF4JNEQQ1oJqttgUaWq2 avjkPBrgIk/Tgqs0dtqG2Y0tFlj/rPw= Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-763cb17f208so129372485a.0 for ; Fri, 23 Jun 2023 22:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687584687; x=1690176687; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CpNamKrNpDCdbcF9XbjJPNcFm86c8B3puQQnd+r/HGw=; b=Z5+8hPZyJNdpvO1yM9cQ9dK7OuaewDHHeNyPLe429wvaxApbqQBbUA5sankYu8AUqX ks5KYxFWZmAJAIQVezo+Hc3LixlxGubI1fok7hnxormr+lUYcmWo4b6XUfojKHXA6kA7 +vb7NGqYAuA9q04SEl7mCsh4fsNgLUZKMJS6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687584687; x=1690176687; 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=CpNamKrNpDCdbcF9XbjJPNcFm86c8B3puQQnd+r/HGw=; b=LWBzGO1QYAuruXA/xDSASR72dbVuEKfvyYTNM2ZvBdF8yJu+zWy9ukPE2vLIyblEby 7yjIfRfYb0dcTEPivDX+5CFS+sJ6YKgVPnJJoqit6Iovik6rV0OpvnCgZRRzAGlLVZHF LtJk9jxVoT3NyXum7jw96FVtVIXH+MU88BREXLnaLiQI4LSvZWtp3wyHJ390HZU03dhw ywyZ5a6zuF7Z8pio5iGNHu4m9JZx9YZTYYcZTec7rWy0IXwHrSMSESKRHPUJHuIAgjHy sjHrEJhOqpxZdmfKrj+nSRfGnB32iyqRE7d4Q20jMPb7JX4XDmqzExJq9qGKdYCjfgM9 TUSw== X-Gm-Message-State: AC+VfDzOGqch88VJEyxxuI65lO8MalUWjqahcJ5c5hzWgl5hgT8tKYDO 3fVWI5PstBYPcO7H67nK8Foc/w== X-Google-Smtp-Source: ACHHUZ59kbb9oc/3EdlJIPQ1rEUy+0ALxxe9YcwNqaxizKDkr5wxxb3jXDBElCaXtw4nKgj2IS5MBg== X-Received: by 2002:a05:6214:2302:b0:628:74d6:ba89 with SMTP id gc2-20020a056214230200b0062874d6ba89mr26510620qvb.60.1687584686929; Fri, 23 Jun 2023 22:31:26 -0700 (PDT) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:d7fc:8a97:4a18:6a18]) by smtp.gmail.com with ESMTPSA id 16-20020a17090a0c1000b002563e8a0225sm567069pjs.48.2023.06.23.22.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 22:31:26 -0700 (PDT) From: Sergey Senozhatsky To: Andrew Morton , Minchan Kim Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: [PATCHv2 0/3] zsmalloc: small compaction improvements Date: Sat, 24 Jun 2023 14:12:13 +0900 Message-ID: <20230624053120.643409-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog MIME-Version: 1.0 X-Rspamd-Queue-Id: 0BA73100006 X-Rspam-User: X-Stat-Signature: n5b7hjma1ni8pxrtggxpz5bmw7a9rhjo X-Rspamd-Server: rspam01 X-HE-Tag: 1687584687-976347 X-HE-Meta: U2FsdGVkX1/4YUFYNxHM6ar5YAFxuhOzZPrfAV+emZdx6wMnH76xb2ajvxHFRozkldG1iTiFbqzRF5shIDe3lNgm3RMKSPGKHPsrA3qQpfRL+pDNMv+5W0tvM307dm5aw44zWhJrrDS74WIl4mtuxLty0vOxLWWC5FX7NXyAk5NppytyGs6cNwZUh255QyHC6Fvw+uwJb6ahU4BZGJRQ9PY4HAfy0PT611QgOF54WKpN6fvyEBvGE/6rdhSQ7Yky+NFd5m+o9dwzH4fE7Debc4s3MEdmLA2N+mEbS1AqcYJ3LuZuer9WcpdxdcMkKVD2fTsn8wocHJn8PrIjy1dhVTRVSOTBiFDQIlnZ2EqzwxzXi8oHxg324AekBj9mgluJqMn6UAY0rwo9Ea7gqkszKGrws0j1ez2xNhhfvtOyMWYWTjab5ustcZfHIoJDbHXEIQNXNxOtasw4IfAz7WDGe6L+OAGLXGBzUmoR8JRfElEuSH0sNVfPgaG3ThGZlHOSpMTYDwn0LIZ70kB7z69w9tUs9bjLUMk9yVkbmWUO8pzsv1JUWhYuGtDNJv5uug9zWM8UyXvDo7XxxgZTpipkUiFB7V0AL6LAiSgHysBKY0tMSh9rWAOyUKLu+GkrNvCRd2DhAuAA4foXJ4tj2/iyTOVRVQWw6gHOW8nZgYUK3xxWEPYdjFNfokx2XLH4+QEj1Rr545HTNut4oKArkvekUfMRLhNnBNsO3NhMaTlv5fKl0rrYpLGcwmTwJZP/8ZomN34sA4ge1cZkfvjXl4NWUz+6Q78hzwvsCYNsD+4eV9oU6YWVqE/zlvVpNutWIrJi9Zn5zikSTIw3a9ILFJ3UELgnUJEsIFrI3CWxlM5I+D1rQzN0+V14j4CM0JT04OZ91B2IzKYImmXdXmhIiMzXGIflJv4UEETrHmMKe/5jOz4EOrGwtvhThW6zYGz9OK/IvojpHNfijGsYJJa84VM H+SGNAWm rG/E82o8MoGFFuy2rA0ER9QJfqqC5cfYRJI1/NQZYX4uq/AJuGoEVKuI2pD+BTL59gojud4aJHYSmT2ehiP9IabTBzwXT90VaXszxyYHWSksmr8YaPDFiIm9Kbk9efXkA734vrgTo4G2fQ3r+cRgUlWpSkouDs2/qh1aY39VblxdP9bH07Pr9eZLnkxjgRNMP0E6/9btm74AkHi1PbgAc4tKQ+ASxow4UpO5v7ZtobXyJ5MdEr3gSJk9sEGdUbY1rk2IEnQzNGHsFXiiRzq4YTu/8RjE+Wgy8y188uboAqaLtZS5xluG18+or86sMTbSHjpQ8aQ6QsJPNhgmZR3MERNjj3jryjPLNkroM X-Bogosity: Ham, tests=bogofilter, spamicity=0.000116, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, A tiny series that can reduce the number of find_alloced_obj() invocations (which perform a linear scan of sub-page) during compaction. Inspired by Alexey Romanov's findings. v2: -- picked up a patch from Minchan Minchan Kim (1): zsmalloc: remove zs_compact_control Sergey Senozhatsky (2): zsmalloc: do not scan for allocated objects in empty zspage zsmalloc: move migration destination zspage inuse check mm/zsmalloc.c | 50 ++++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 30 deletions(-)