From patchwork Mon Jul 10 22:16:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 13307694 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 78191EB64D9 for ; Mon, 10 Jul 2023 22:17:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E10E68D0002; Mon, 10 Jul 2023 18:17:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC0FF8D0001; Mon, 10 Jul 2023 18:17:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C88728D0002; Mon, 10 Jul 2023 18:17:07 -0400 (EDT) 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 B6BAE8D0001 for ; Mon, 10 Jul 2023 18:17:07 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 74B6114026A for ; Mon, 10 Jul 2023 22:17:07 +0000 (UTC) X-FDA: 80997113694.02.0103590 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf24.hostedemail.com (Postfix) with ESMTP id A008E180014 for ; Mon, 10 Jul 2023 22:17:05 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=nesACnkT; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf24.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689027425; h=from:from:sender: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=27A8wAQXCnZkbh1qiLYSty0aj23Fw8fpU16ldvHcm7E=; b=YUBZoF+cgjEDH9MAF1nI2E6zLSmLxSRvpqCt0x3YicSqBxpnFocdIbA4SQV8LAXzTfjvaz 7xjXxKb09G6nTu5phObqOeGqgUeI7LIsASWjgoNbAbFAcErD3+hKzKAKZkeU29ZGn8/YZg 0w5WV/Evn7heo+XM8M+TK0K+iKWWra8= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=nesACnkT; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf24.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689027425; a=rsa-sha256; cv=none; b=SuU/qTBbgFS+tM0pRSjOvQo8RT8+9/++YoEy36XjEkDuT//fE7y6sYGYUHsPM8eHhkTyks pVgUA9Ki0ZYKxYg7bvowmo3bGf1MaywYhgyF3DarBFEonN/p9yXZqM33EoCH9B+iJsQ+7m rYjK4oSEB1+Z+11VR/acxS+239TY//Y= Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1b9e9765f2cso6987665ad.3 for ; Mon, 10 Jul 2023 15:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689027424; x=1691619424; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=27A8wAQXCnZkbh1qiLYSty0aj23Fw8fpU16ldvHcm7E=; b=nesACnkTkuaw4LRIUrvbNiwsLkk2HKBxaM+9qRQslwNWaW8zU7ZLl0ugk16tBFhoiT phd6MPhEcDI74iBY02MAuQ39lraECvkxCKuLFloqVx7y5Xr3BN2+A8yv8CiLubJ2UBiQ wrLNxvjNnU3rba17X7q4Hg02lwavABWmFlzPfdkwTl8POsadwIVuVOTbvfue4ov7xrYQ KO+vxLZ/bQmN1eNO7pgK9VfgDiZLv+z0C6IE37YFw2mcoCfHSE4e5ajKnVfGg1zTJTxM C4qCDoravWyz8goZ/dMSfcQxes6baQpiYDWuVF58B9QxPFOrzJ/qhagDRpM1YD8ORUu8 0qDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689027424; x=1691619424; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=27A8wAQXCnZkbh1qiLYSty0aj23Fw8fpU16ldvHcm7E=; b=R2dP6v4a8/2DtfVm7Fmq8qz5Xcuh9md/drGa1MlUWCQipJtBeS4r425Kv4oLMSdM8G +7rcpIpK5WCV0xxTOGc6LWBgUcbu/IQX4XL2aELBullM6/s47SW4F38g/ZYpy6fE0fsx AncQzeW+IpILCeNLk2HsjIOBY+p0YAxtg24BuVnDlDm/ONz7lcw/eszbCuaEICYKvQbV wtim2pR/Evs+C3Bekj8v/4ygWHK17M0MiO4T15gPZvj4R9DYbD8wYe0Rk0fmLuXMJSnF zcvEk0jvLgsS4J2yP5CpXI2idYs44bvVC7RHZY4GHex7j/jQSOKl61HD5nZ6dzo6TlPQ iwWA== X-Gm-Message-State: ABy/qLaorCibsWj79GZnTmNe+/oMelV//Zlxs1+0ZRk8/gL5cIofdTBb aHcep73yYrOw7q0Wbixi7zw= X-Google-Smtp-Source: APBJJlFPZoL+yKmJ8O3fZTCcsvPpm84gIgxHF4OFbFVIqNXYFPtnzp56Q8e/sRHrsw1/X8cVUsqRMA== X-Received: by 2002:a17:902:ec88:b0:1b7:fb17:2edb with SMTP id x8-20020a170902ec8800b001b7fb172edbmr13160640plg.18.1689027424300; Mon, 10 Jul 2023 15:17:04 -0700 (PDT) Received: from bbox-1.mtv.corp.google.com ([2620:15c:211:201:1922:28f0:ba3b:368e]) by smtp.gmail.com with ESMTPSA id c23-20020a170902cb1700b001b9bebbc621sm376425ply.136.2023.07.10.15.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 15:17:03 -0700 (PDT) From: Minchan Kim To: Andrew Morton Cc: linux-mm , Jens Axboe , Konrad Rzeszutek Wilk , Seth Jennings , Sergey Senozhatsky , Minchan Kim Subject: [PATCH 0/3] zram: use frontswap for zram swap usecase Date: Mon, 10 Jul 2023 15:16:56 -0700 Message-ID: <20230710221659.2473460-1-minchan@kernel.org> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog MIME-Version: 1.0 X-Rspamd-Queue-Id: A008E180014 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: k8qydj6m3fb3s9mkh7kik463wfw9kdxj X-HE-Tag: 1689027425-459284 X-HE-Meta: U2FsdGVkX1/lqgXRvNU1MGzMAWuSVLL2ICufCXtQBe/ezniEn91Ladd1B7JVwLZ9dpY/io708O6RSVIFVP/Xt5nQKlnnRGAeKncqaNL+28KrVROdyJ1xJ0IShPedeN9ACqbUx1O5eQWiMkIlumIc+uN4sUvm6rPqsRWYj3l8ZvJ2bBQnrOLnZzMIuMiYcroum/Bm6eKoPL04aBYLZANxaf9jxKieYxSsBf/Q93/7Zv+RT1zLUk2e50WP7SuYovPulOgjhxYmMY9b0t8AsyCWl9mESX6ce8pBMtvdMJPq6jJMycHP2cFKtc6uvtjj5WrdwEDbE4Bx02qHC237Tm/X8G7sgfX8NhA4gj9nXa/CVRCtk4F75QlYxlh0msq2sKvfKr8ME4eo+sva1VUtMxkXmvkorkb1iuHdFI8VQ1xoR2ZHe7Id05L/wZeqB4Ylh4tCBRnwMKh3pWF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TjNNJ/ZB98pvGF3Mo8WfrRGnJyaXhg7f59e32WVtQw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patchset uses frontswap for zram swap usecase and remove swap_slot_free_notify swap specific operation in block device. It shows 13% swapout improvement for MADV_PAGEOUT. Minchan Kim (3): frontswap: support backing_dev zram: support frontswap zram: remove swap_slot_free_notify Documentation/filesystems/locking.rst | 5 -- drivers/block/zram/Kconfig | 1 + drivers/block/zram/zram_drv.c | 116 ++++++++++++++++++++++---- drivers/block/zram/zram_drv.h | 1 + include/linux/blkdev.h | 2 - include/linux/frontswap.h | 7 +- mm/frontswap.c | 4 +- mm/swapfile.c | 11 +-- mm/zswap.c | 2 +- 9 files changed, 110 insertions(+), 39 deletions(-)