From patchwork Thu Dec 5 17:49:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13895888 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 51CB3E77170 for ; Thu, 5 Dec 2024 17:50:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C7BB26B016C; Thu, 5 Dec 2024 12:50:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C2C156B016D; Thu, 5 Dec 2024 12:50:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1B4D6B016F; Thu, 5 Dec 2024 12:50:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 908B66B016C for ; Thu, 5 Dec 2024 12:50:06 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 573D7415A8 for ; Thu, 5 Dec 2024 17:50:06 +0000 (UTC) X-FDA: 82861643550.12.5CA58A9 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id 444BAC0010 for ; Thu, 5 Dec 2024 17:49:45 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=P2hlonCV; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733420987; 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=6LHU+bUyRjDYWTc13czOKdkvv5T2PZVdF818mTteSoI=; b=elVLnrLWKBtctJeMbnW/rkUS/XBS7j0pA5GlKr0hT/pskOZKtu3KUNSJfQKW00u+NQLTPX 70uL/w4f12qzLvd1/IwY6Q6FdpRUEOsiWY4Mz6kUg8hyqIwYKibbVcSBz++RtvP4z/J2Qt HNkjsuOvKB2QI1Sgtb8w5a6EaAFu+Ho= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=P2hlonCV; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733420987; a=rsa-sha256; cv=none; b=46b6k77e+2Xved4FxxKSi4jCkr2Wj+cpzMDilUxtSg8oC9bG/C/DGppgGsX28YNx1hi+ir rLV8SyGEr0E/E7gKyLbWVXTh9QmqXHu5cN2MPQdhWo+q8QKnLWecpJONZdMjmQk2TxAjV6 pno9ji9TXq5v33LWEwiaC180l72QEbs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=6LHU+bUyRjDYWTc13czOKdkvv5T2PZVdF818mTteSoI=; b=P2hlonCV1oQlcgtnseLGyTQkqv unUhxNpEpUuOiee0+HHAqrNm2O+jS8sUYiXwrJtoqU6Vf+TkolWmplb6LDIrbl/ZhEvota/ptkoB0 lMSyH/M2KJhMzvbibWnxo4CVgRS/z+rZvQ0hVu2zztti9FQk6f2EMcuuq7jHPJP7Q+YqO77j0XjmS oCX+IXjF9KT2igcsLZWEyZgg861VetGDk5Xox9m+JU6SD4B5ZD5bBWZIXiT315T5WjD7aL8tWxl8s 1fX62TGy571IDZ3beKgRLGiTfUwsugTaaCfpTpJISyQ5lSPDsu00HF81hb8kMHFtVoIt0/c3XAwWI 00tsClwA==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tJFzG-0000000DN6q-0KWj; Thu, 05 Dec 2024 17:50:02 +0000 From: "Matthew Wilcox (Oracle)" To: Minchan Kim , Sergey Senozhatsky Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH v8 00/21] Add zpdesc memory descriptor for zswap.zpool Date: Thu, 5 Dec 2024 17:49:37 +0000 Message-ID: <20241205175000.3187069-1-willy@infradead.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 444BAC0010 X-Rspam-User: X-Stat-Signature: ke5j6mobtxabtkik6o9x8fw9bwheerof X-HE-Tag: 1733420985-478622 X-HE-Meta: U2FsdGVkX1+WLVbT4XgwDGeNdfRbEqP7FjhX9U5Hsi5AEn2n+Ez9Ki4UAHLUH1mSCYsG1NqjYuOu4j4qrRpq7G7nEMcyc5MlX+ThWETEPbXPXZjWflFKoA3MkyFWH0OGw8yyVxGX0h89PgP9G7UxLx6SERyXn+ODd2aSkxPy1f2kmh16pHcIMN1jUIvwIG4mEDmHy/BBWjXk0kyuALCMn7vnCbKWUtA6BdrbQFcpXelWn/Mz2PvQjDkUogPqRKrYxILg3UlI5xkLrbjdmGlO4Akh4NVTcVaxX6Kb76lkKRz6KwT8lOby1+/Ai1qYFrRDj6svV6ms/ZdRjTedGy9hpnMsh7hrFyQ4NbolPX9619DUTNhpR5nqh239XO55eT0gdKTM0fJ9bRtydwB9vbdOwATXvGnOV26kds6puIONa8dyJP9lQ4axAG/uqDAxs+sogpb69B211X2J9dlwp7jwEJEVCDBIT9g+brJ5NUoIXR7I3LuB7ml3UqmouU8lGFzb582Non/xMOJf+ag2OX00QH6V+UbGgur22dZTXAhs57j+Il+aCNNCjG6RKr7v6Zb06MmhrNyp9oaOrK+3wPmwGUolX+2M7qIQxgddboOyGdBh3jviD7ZSQYZNJxHJ5FMowsyGVKAU08D1Y5wr0nG//i85+WDKygm5UklDbvKRvtPs8KbZ2p00pde/YOO9IIQ5gHcvFj/S/rdTQqc6MtYZPKZorIB97rFZQdGcOHdU/svLlkq+t71g5gVmeVdWbbP6Y0PWrM11kpaUT4gAStSHsEVaPQ6Q4nx3TZGu4yGG5MykjKG5wD5a7GiNzY7pbwa8lLK6sukeCxG/1a7InVsrF4fjkXwgSvaNKZwj41LfNJIR2vEbJQKSytk05NHbrtX9Yw8SeAj9HkrvLaWd5kWvE4R7MwRuCL2CroCVS5UEumNrWk8n5jDv+cV8CodIkXfL7FEE7LdMkt7QW7OsDe1 CW0OLKG6 BWoKJ+MIU8p5k02XUEjVy7aglykbUDSAM/FVUuP17johuUb7WoUfsLIP2B2RhQ7xkUWxB7kxpbbxNS6Vn5W9zXuGWMX8NE4OZJthU9fGHfcHcG4lXvKN2hIUYqVCGdZfSKDIiH9njo591pTB61VTkxuA52kFiSnwbYBS9fthIAYPy42grF8cX43Aehw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000115, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: I've updated this patchset for 6.13-rc1 because it's needed to eliminate page->index, which I'm hoping to do in the next merge window. - Renamed mops to movable_ops and changed its type to unsigned long - Separated out the documentation of the individual page flags - Removed memcg_data again - Adapted to memcpy_from_page() API - Add kmap_local_zpdesc() instead of zpdesc_kmap_atomic() My actual review of this has been quite limited. Alex Shi (10): mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage() mm/zsmalloc: convert create_page_chain() and its users to use zpdesc mm/zsmalloc: rename reset_page to reset_zpdesc and use zpdesc in it mm/zsmalloc: convert SetZsPageMovable and remove unused funcs mm/zsmalloc: convert get/set_first_obj_offset() to take zpdesc mm/zsmalloc: introduce __zpdesc_clear_movable mm/zsmalloc: introduce __zpdesc_clear/set_zsmalloc() mm/zsmalloc: introduce zpdesc_clear_first() helper mm/zsmalloc: update comments for page->zpdesc changes Hyeonggon Yoo (11): mm/zsmalloc: convert __zs_map_object/__zs_unmap_object to use zpdesc mm/zsmalloc: add and use pfn/zpdesc seeking funcs mm/zsmalloc: convert obj_malloc() to use zpdesc mm/zsmalloc: convert obj_allocated() and related helpers to use zpdesc mm/zsmalloc: convert init_zspage() to use zpdesc mm/zsmalloc: convert obj_to_page() and zs_free() to use zpdesc mm/zsmalloc: add zpdesc_is_isolated()/zpdesc_zone() helper for zs_page_migrate() mm/zsmalloc: convert __free_zspage() to use zpdesc mm/zsmalloc: convert location_to_obj() to take zpdesc mm/zsmalloc: convert migrate_zspage() to use zpdesc mm/zsmalloc: convert get_zspage() to take zpdesc mm/zpdesc.h | 149 ++++++++++++++++ mm/zsmalloc.c | 485 +++++++++++++++++++++++++++----------------------- 2 files changed, 411 insertions(+), 223 deletions(-) create mode 100644 mm/zpdesc.h Reviewed-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky # zram workloads on x86_64