From patchwork Sat Jul 15 04:23:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp29384vqt; Fri, 14 Jul 2023 22:41:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlGARu/jxcBOuAlJwSXlQ4IX6RaNgWQ1QjXmk1kCT57js+Eke5rckC6WeJMIZ8ZwgMn8gucV X-Received: by 2002:a17:90b:3d4:b0:262:ec13:d3a with SMTP id go20-20020a17090b03d400b00262ec130d3amr6593834pjb.28.1689399683239; Fri, 14 Jul 2023 22:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689399683; cv=none; d=google.com; s=arc-20160816; b=Wt0gpHMc13bv8k4jJN6sAtwUcXSnA/O3uy2nfup+z6PSGAvX+qvN5vdutH+X96Qn4R WXH6NjILZMuQLFNIgChcC8+NhWC5B+Z9783/xcHLMehYGGLqZULm38VKtnPOXrpAAKT/ w0vNT4xoGeVdJ6IO+FA1blRNZ+B7wm2PR/CArgGVULAGNd0rLakFCVHJ7PG0ujl0wPIl DkwaGtMvjcoUEhVRt3Kdl/5QCa2d4ahq5RT4UIBxW05tEoKoG/7rDmJIxJeZnRVbd4Iv Z6EbeHZquBqbaRY/1qDLbqYAGgYO6qpRasIpd5c5D7eb+CYkrg16e5Fi2BlMJ3SK95w9 a+hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DYlo/gupkfT8+nCJZO3u+QA1Fw3ZJMI4hDJgV++oyYA=; fh=r3T7dnr8wArqVbCWzme6SvP83Lr9YOebNJZ0TnSVZks=; b=Kp3jX84Y23BIUbxzCqfA8ysNaRWiPkxs049u6lV7jVnIk5MMpTbcKldDsmvjyA9v53 EiqlWTBRnePFb+ccFNeixUXyBCXkMX2DCFQ9GhW5FXsrGWcGgyDd+yKQ67yWTZOY83j6 8JZF4fkBGFr4zaqXXENtJV0wWL3ur/J/RfJxcMLxwCYhGlDpyzD4dVeulM4TyM8as30V DiS4Ilq9alQRG0tWCJQ8y7qdyqCDu57AmKRSbcBx+EOnAYQQQgt4HzFYY3c822sf2jHQ 3a6wpRorUil3pYkml6Y5rads1pU+LS0htCTOzj/ZVMILHBUXZDP18AfOaMS3j/RHA3Lk mdfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPbNQDRu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk18-20020a17090b33d200b00262ecc71b13si2481109pjb.109.2023.07.14.22.41.10; Fri, 14 Jul 2023 22:41:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPbNQDRu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbjGOEYL (ORCPT + 99 others); Sat, 15 Jul 2023 00:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbjGOEYE (ORCPT ); Sat, 15 Jul 2023 00:24:04 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5033A96 for ; Fri, 14 Jul 2023 21:24:03 -0700 (PDT) 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: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=DYlo/gupkfT8+nCJZO3u+QA1Fw3ZJMI4hDJgV++oyYA=; b=uPbNQDRuLMTYTNh4IPN0k4nXyf cztJQO56loYyT6Fmevl7HukuGMK7EDfp1TBNB1n00xT4UqNMmsf1J2qrIWIY27H9Kn1tc+l/oGwXG PpJiNknsWfWetPjqRYVdfBiSTH7aAXV6k5lPpUeXoSR4GbMGu6Uu/V7GcykkoMhWm39ygJygemRtp i07UZ32O4VQ6Pn2L+CtHKF7iGN+oXfkwXd5e/do2oeGCRnYiVBXbT/+GkBb8bq8s1nLn9FEqJ2R1U P8Vy5AooOOLqLyYEMiZ2XWIiE9AvU9tsjtZy7F22UJ8Zk3Be9dWagJX/YFKONxGBrwd5T/ZuwcCK4 W3RBPAcQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qKWos-001p3m-5e; Sat, 15 Jul 2023 04:23:46 +0000 From: "Matthew Wilcox (Oracle)" To: Johannes Weiner Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, vitaly.wool@konsulko.com, cerasuolodomenico@gmail.com, nphamcs@gmail.com, hch@infradead.org, yosryahmed@google.com, akpm@linux-foundation.org Subject: [PATCH 0/5] Followup folio conversions for zswap Date: Sat, 15 Jul 2023 05:23:38 +0100 Message-Id: <20230715042343.434588-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230714194610.828210-1-hannes@cmpxchg.org> References: <20230714194610.828210-1-hannes@cmpxchg.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771463962123983874 X-GMAIL-MSGID: 1771463962123983874 With frontswap killed, it's worth converting the zswap_load() and zswap_store() functions to take a folio instead of a page pointer. They aren't converted to support large folios, but there are a lot of unnecessary calls to compound_head() that are removed by these patches. Matthew Wilcox (Oracle) (5): fix-frontswap zswap: Make zswap_store() take a folio memcg: Convert get_obj_cgroup_from_page to get_obj_cgroup_from_folio swap: Remove some calls to compound_head() in swap_readpage() zswap: Make zswap_load() take a folio include/linux/memcontrol.h | 4 ++-- include/linux/zswap.h | 8 ++++---- mm/memcontrol.c | 8 ++++---- mm/page_io.c | 17 +++++++++-------- mm/zswap.c | 27 +++++++++++++++------------ 5 files changed, 34 insertions(+), 30 deletions(-)