Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1972778rbb; Tue, 27 Feb 2024 07:02:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWaC0KLZnLcDdY6QkGxCyy4h8WGt2GTiet/b418OAqFvQbyi18+R55iL2eJL4nWOD8iMuCAlCk/d6MeHc8NZ/G4gFR4P2aDQC/Iu6FJfA== X-Google-Smtp-Source: AGHT+IH8BKBRU0fJIXXqjgbA9z/IhcI5KATTFGO7MH86VfV7+4352HqQ3qr/WyXv30yYwOAVDTYa X-Received: by 2002:a17:902:ebcd:b0:1db:bfea:3657 with SMTP id p13-20020a170902ebcd00b001dbbfea3657mr13206797plg.22.1709046151981; Tue, 27 Feb 2024 07:02:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709046151; cv=pass; d=google.com; s=arc-20160816; b=0oXmDlA8KYUcglNFi7KT65p+nyTbt6mrE8nRHSZCJxXiutqSCaBIO6X3dqbaecxhaX JLRAHUxPUK5g5oBXVtG0dS3uMWULlxZswAOjOlcgkRLbfXeeBAkA/KLS8P2AtD+OqFzG JeKNIPzEahNsRo968jL7v/gNya2s/TlZqxVjiwXKaNRMprsfKRwAmoL11UbsyrSJWKJc gUvCGRPHBBDTvm4s36M7wqBBv8zYUrbOIMf2Auz8uwI65qoWtgNKXpqJs3A+snDgJ3p+ 9hD/HF7G+6m3i0n8hJyYjLBVWKtCKLw9+rDPFVDy9ku36A+nELET4HRJ2bycWrXZrJ4j 16xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=8WU0qTZ2EK41O1Uayi1L8PSB/wjiYDxRl96DXUlhqSk=; fh=BLKalt5fc9c85QYsiWAB7+JneSAPNPdBaFgxRMLikx4=; b=ov2QucByykhvCFTETjAn1HNiVBWWxOsQH+zkPt6FN+Sde7qXkx60JfNgAn0aABBdmk HtLvEWDEbPFSqj8L51T/nrDD5i4rbX+zf8ba3HuT5LnVTmqwC/PW/6xAt71h2EwXuxNn 5cMc6MU8Sq+6KgStcbi496q8lYHZkU2iBt9jD/4UP/M/tefZhn3ardItkY9kRxv2MgCY dVka6RjVI1jpmGSVBROi+WN4cCv0m9OsYqt8w9Gz55A1uRgnf5r13PAUw7HGJ1FP/ldL /vzne5M0DQiGJn500RUg6VV50Abu506/nYFmtagluoPndoH0dd7Y0KnZo9pVdQ1UTWBG H3Cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-83407-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83407-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id mc11-20020a1709032b0b00b001dc8b827f87si1544863plb.52.2024.02.27.07.02.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83407-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-83407-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83407-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BBAA4B23369 for ; Tue, 27 Feb 2024 14:40:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B94E313B2B3; Tue, 27 Feb 2024 14:40:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 639CF16423 for ; Tue, 27 Feb 2024 14:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044824; cv=none; b=e7YHtAB2HQ3YC1vL5HFwHTX4ArfP6NWt9Tp3s2VG7B3hzeX5mr9u8KVZoePrVnZth+5OzDofoMfY6SGenXiWG8M8H4QwaOEIS4ltrUTkzaKsEm/YIl3jzUcYbh5+DtDoZO2SXBi2r/0QBInUb4KnPhjBZkRIupcNTsZkkP0KJus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044824; c=relaxed/simple; bh=JIaLrHdBMuL/K0juRJDhcGKKTRVjiBE7RyfnkLDIaqE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kgXJ0kNBr0xTpoergyf2yUnd+1IDj86jefYVFfd2JvXVWySpUVTDXNe+9flEZeJ5CyQnma22zBodT0ZAq6YtSeBE45FgbSUg9UqsbpeuhD6gCZd9/SDd9QFZ8BfGln0oZKYAOZXVGeXC/IWGYXJN0VRvKqAytnG+V39lfSzzlEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EDAC0DA7; Tue, 27 Feb 2024 06:40:59 -0800 (PST) Received: from [10.1.30.188] (XHFQ2J9959.cambridge.arm.com [10.1.30.188]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E7BB3F762; Tue, 27 Feb 2024 06:40:19 -0800 (PST) Message-ID: <3a3461fc-4b30-4ba1-94c9-c048d08d40c0@arm.com> Date: Tue, 27 Feb 2024 14:40:17 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 6/6] mm: madvise: don't split mTHP for MADV_PAGEOUT Content-Language: en-GB To: Barry Song <21cnbao@gmail.com>, akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, mhocko@suse.com, shy828301@gmail.com, wangkefeng.wang@huawei.com, willy@infradead.org, xiang@kernel.org, ying.huang@intel.com, yuzhao@google.com, surenb@google.com, steven.price@arm.com, Chuanhua Han , Barry Song References: <20231025144546.577640-1-ryan.roberts@arm.com> <20240118111036.72641-1-21cnbao@gmail.com> <20240118111036.72641-7-21cnbao@gmail.com> From: Ryan Roberts In-Reply-To: <20240118111036.72641-7-21cnbao@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 18/01/2024 11:10, Barry Song wrote: > From: Chuanhua Han > > MADV_PAGEOUT and MADV_FREE are common cases in Android. Ryan's patchset has > supported swapping large folios out as a whole for vmscan case. This patch > extends the feature to madvise. > > If madvised range covers the whole large folio, we don't split it. Otherwise, > we still need to split it. > > This patch doesn't depend on ARM64's CONT-PTE, alternatively, it defines one > helper named pte_range_cont_mapped() to check if all PTEs are contiguously > mapped to a large folio. I'm going to rework this patch and integrate it into my series if that's ok with you?