From patchwork Mon Aug 21 16:08:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13359620 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5264EE49AA for ; Mon, 21 Aug 2023 16:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sJyR4L2SR/pceXpKxV+eXpXDnkHCLKFNa50Fzx4QZgo=; b=XUJygtNt/CYlct IvlB/dgK0g/OaRhbxje7ZCSutDEwj/wAS6/ZSRaLTO8OYdkKidbQiTawVXX2t1oz+3NLRNPeLP/wf //JKPEd3ljV6ksSRxwrNTKaxo3my9lu58xJcrSrtRaBAKOroJ/t519DNfZ8oeahUOOYvRb5nsNUl6 J4XKlgGb/zmf9Lfy63VuIZAW5ERUI8n8DNSLrQGzly3R4zRgIFR4ruFEd8c7MRIsgkSDjpGIEEaG5 5vP8IVyKmgS40SNGpkGlYccO9OVsb/JvQ63izJiOs917y4P/7TThUCFyrRitXEvWdBj7o/SUtv5QQ FDMGjBAT4LqybZhtdi3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qY7Sh-00EL7O-1v; Mon, 21 Aug 2023 16:09:03 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qY7Se-00EL60-2y for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2023 16:09:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692634139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=muHISTWWYfRXSKtPnEJYxlovjaz8Sci5+XbEJ+VCnBs=; b=HSRQRlMX2/riTqXZwUK0DIQIf2/6hZWMTOgk2ckVdFKjYrpnFRbITF5rYVf1FrRQkhymNg 4m2Q/ei9v8kbwkb54SQQPq1IpTnZcl6vrUxVOBDDBa2NC/CrTn6QgQvN7gMHCFD7f9YkVu OXCDlCyXwH/vjVzaLASsK7EbPocZKI4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-49-WkVWTVgaOcOgmPoTqKKANQ-1; Mon, 21 Aug 2023 12:08:57 -0400 X-MC-Unique: WkVWTVgaOcOgmPoTqKKANQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B0C6108BF27; Mon, 21 Aug 2023 16:08:53 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.184]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31539492C13; Mon, 21 Aug 2023 16:08:50 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, David Hildenbrand , Andrew Morton , Matthew Wilcox , Peter Xu , Catalin Marinas , Will Deacon , Hugh Dickins , Seth Jennings , Dan Streetman , Vitaly Wool Subject: [PATCH mm-unstable v1 0/4] mm/swap: stop using page->private on tail pages for THP_SWAP + cleanups Date: Mon, 21 Aug 2023 18:08:45 +0200 Message-ID: <20230821160849.531668-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230821_090901_031470_C96D45C5 X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series stops using page->private on tail pages for THP_SWAP, replaces folio->private by folio->swap for swapcache folios, and starts using "new_folio" for tail pages that we are splitting to remove the usage of page->private for swapcache handling completely. @Willy, I added your SOB on patch #2 from [1], hoping that's ok. [1] https://lore.kernel.org/all/ZN1IH/8JxkkOU5Ec@casper.infradead.org/ Cc: Andrew Morton Cc: Matthew Wilcox Cc: Peter Xu Cc: Catalin Marinas Cc: Will Deacon Cc: Hugh Dickins Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool David Hildenbrand (3): mm/swap: stop using page->private on tail pages for THP_SWAP mm/swap: inline folio_set_swap_entry() and folio_swap_entry() mm/huge_memory: work on folio->swap instead of page->private when splitting folio Matthew Wilcox (1): mm/swap: use dedicated entry for swap in folio arch/arm64/mm/mteswap.c | 5 +++-- include/linux/mm_types.h | 35 ++++++++++++++--------------------- include/linux/swap.h | 12 +++++------- mm/huge_memory.c | 40 +++++++++++++++++++--------------------- mm/memory.c | 4 ++-- mm/rmap.c | 2 +- mm/shmem.c | 6 +++--- mm/swap_state.c | 6 +++--- mm/swapfile.c | 6 +++--- mm/util.c | 2 +- mm/vmscan.c | 2 +- mm/zswap.c | 4 ++-- 12 files changed, 57 insertions(+), 67 deletions(-)