Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2782188rwd; Fri, 19 May 2023 10:05:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CfIBHuWrD7Ubly3FJ3BMFkTJV0EQHvV7EvElJ/HoCWheBUgol4gwS2F7ngKy5T0mvgaUg X-Received: by 2002:a17:902:a589:b0:1ab:797:afbe with SMTP id az9-20020a170902a58900b001ab0797afbemr3054630plb.8.1684515922157; Fri, 19 May 2023 10:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684515922; cv=none; d=google.com; s=arc-20160816; b=S5mbjr4z++G+Wiw/1RDcGVnPVFrsJe7/HnclQdwiuq0VpT3PWyh5fHffIgDvGtPmEk Ds6lhqk08LwgTMb/xYt0euMbx01dDiOKlANDOpM6pP6KMPcACqxiHxMak+CO3SGJQQTi xFAvANXzUbhzyZPLM5c4Ey1uMHc5chkJZiYFfZak0bdWbb3fhceZNak4KKjI0OcnROMm sdZF3IZfx6NniGrd2nRoDAZbtdQQjPUQ5zqERe3KZ785Z4k48pQZ/TkDjL50XS+tzZ0I Id9CvVR6bxNzAlq0NHejlbFnZasZGL8+fzAgpEGWIKzXQMxPP7G9NJJVX+nFtwGubuiy JkEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tI3pILZ/sb+GuKG+RKppCAv6vko4emUSZ7mWrZSZD4s=; b=mL0NxIIy9HcqUmYgwLMiRDCRYz5McegoTNHagavRKY5YL/BWhKgjs+FpS1aM34nO1v j3LNDjguIwtVufq+thyDNgXFFo7L6wDvzlQ3YCBDHDqRGiqA8lRw0juwOsohZdHpAtc0 bQOiXXoUfT5old35ODWT/+ckipRzOXBzWPrrGpQL68MNBLKHkbgbsj02f07NUExTla80 qTrZuF7ULAQOjCW9LbgHgFtspLiKg0wtEODhkn9p4kMtZWo2M/QmJvQJa8CBazlcs1rs kBFHqAi8VLcIGCap0/70FSCpVkvwIaymTWkgJSsvfc063YCYWbeHmN8e23Og4T3/0lTT 31hQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a170902e31400b001ab0498403fsi3601706plc.169.2023.05.19.10.05.04; Fri, 19 May 2023 10:05:22 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbjESQmW (ORCPT + 99 others); Fri, 19 May 2023 12:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjESQmV (ORCPT ); Fri, 19 May 2023 12:42:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66215D2 for ; Fri, 19 May 2023 09:42:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EFC53616E2 for ; Fri, 19 May 2023 16:42:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 921D1C433EF; Fri, 19 May 2023 16:42:16 +0000 (UTC) Date: Fri, 19 May 2023 17:42:13 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Qun-wei Lin =?utf-8?B?KOael+e+pOW0tCk=?= , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "surenb@google.com" , "david@redhat.com" , Chinwen Chang =?utf-8?B?KOW8temMpuaWhyk=?= , "kasan-dev@googlegroups.com" , Kuan-Ying Lee =?utf-8?B?KOadjuWGoOepjik=?= , Casper Li =?utf-8?B?KOadjuS4reamrik=?= , "gregkh@linuxfoundation.org" , vincenzo.frascino@arm.com, Alexandru Elisei , will@kernel.org, eugenis@google.com, Steven Price Subject: Re: [PATCH v3 2/3] mm: Call arch_swap_restore() from unuse_pte() Message-ID: References: <20230517022115.3033604-1-pcc@google.com> <20230517022115.3033604-3-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230517022115.3033604-3-pcc@google.com> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, 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 On Tue, May 16, 2023 at 07:21:12PM -0700, Peter Collingbourne wrote: > We would like to move away from requiring architectures to restore > metadata from swap in the set_pte_at() implementation, as this is not only > error-prone but adds complexity to the arch-specific code. This requires > us to call arch_swap_restore() before calling swap_free() whenever pages > are restored from swap. We are currently doing so everywhere except in > unuse_pte(); do so there as well. > > Signed-off-by: Peter Collingbourne > Link: https://linux-review.googlesource.com/id/I68276653e612d64cde271ce1b5a99ae05d6bbc4f Acked-by: Catalin Marinas