Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2112371rbb; Tue, 27 Feb 2024 10:59:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjKqNRFqhw6TTj0Oukkc1nOLjoUJw5jbSqiS7HrKgTQUKZHEUtehSjaBydcGb3WZqb3+qMgZRTxbb9PvJerrMruBN+iBHHvK/vqpaE7Q== X-Google-Smtp-Source: AGHT+IHq0MlNdCBg2Vz5agq0zF1doA8l+eeMaz6Tv2wWjEFWLqxdaQlvM4R9L7uT1DarToBScRHF X-Received: by 2002:a05:6a20:c89c:b0:1a1:e2b:d26f with SMTP id hb28-20020a056a20c89c00b001a10e2bd26fmr2926358pzb.7.1709060384594; Tue, 27 Feb 2024 10:59:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709060384; cv=pass; d=google.com; s=arc-20160816; b=MTQEbhnkbBcrMpTRkeVD9MkHHiGQKENaHsqtIY+FyXO/o/1oN4o43SZ1al8o0sJIrS 5G0qI5Jz2TBSfktQVlL7Vu7Kmr0KsFbRVVsT48f2A6xYtjK/q+lQsT80JTsg3wRa1oUu KQgcsfzKtRhB88AWzttsiqiZN3iktnOd975jy/Qg0Yb7UDnWWJY7ZCOOpUmlKECyFJEE se3yaAG0zqyBQ0yR5EK6cNH+cHjL7nCWrZc4GKvHKr3HIgsIMt+qv2UARc91kPHSFBQO k9L9nOHs8msPOsfp85OAjLmPm1gnzOW8S9isAuO6IP/kzBkwN/DGuBruBOuYzhaYsynf ZwPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7bDI1xqKClmZu2LPydV/rKtOY3Pk36/Y/7eFyMlkBAo=; fh=6067UOCWYa/kBqiTp5K1XaIwBOV0j2p0GtaYWG2qY9E=; b=p5UIOUY9diIi3SifYdYMV9mgejORm+Qmi0wlMSP4IOsgNOgzraG9qy22moop3YFXvo nERrM9iLp8WoZyTNHUYQoYxYydskSk4YPSSl9KBbAs3X4yj8iDQ1l7f4DyQyJFF+hN0i g6ONEQr+uMBBpw66+9Cp9as2g+n0ppwoimz+bTigXzrF6MhLtHfP5kmzax5fqAL5F8Ld Mlg69F7R4EwjruSrllMcrKCWaEBFQHFzQ8Yx2eGjUPd4PMiCIl91WKamMN5xRvdECcfK un7qdZjY5GkhOp5X42xDOOJznNjfIKn2X0YnWNVSD0xtmctgH10MVw7H0zcmrLVINrAr xY/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d0RXiuux; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y21-20020a63e255000000b005dc8f60cdf9si5812851pgj.302.2024.02.27.10.59.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:59:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d0RXiuux; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AA935290D72 for ; Tue, 27 Feb 2024 18:58:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B93D14A08F; Tue, 27 Feb 2024 18:57:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d0RXiuux" Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A4DC4F896 for ; Tue, 27 Feb 2024 18:57:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709060234; cv=none; b=Sr44M1h4e0+DDxYvwpA7vYKkBYD3oBqgPRYD70Nr6Skj1CoRpbjtgCVv3Ou62inIi1dpEgFGzgIRH9ZDjpIywWayIGcnPxdO6er9sgWo6M+MJcrB0HZogE/PT1mlDgoyLnzWbXCjKeLj2oM5fX1FrpcvxLpwWMwDGJljWLnQ+AE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709060234; c=relaxed/simple; bh=7bDI1xqKClmZu2LPydV/rKtOY3Pk36/Y/7eFyMlkBAo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CFZvqpWsOxN72LoLlGM4PhCy8Ky3z1AKTcJOZXMC95Av2rEiVM0nsPgOzirRgcqlznGViyo3cK2VVn+YqCg7btGz+OPtDXujqPSyDq9ojlFhTE26rcNwcX+abZTloSL4G/rKCGEkIUPHSa8fD6mclCn5LIbAmy1SH2sHOikqlvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=d0RXiuux; arc=none smtp.client-ip=209.85.222.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f46.google.com with SMTP id a1e0cc1a2514c-7dac7cfbea0so193689241.3 for ; Tue, 27 Feb 2024 10:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709060232; x=1709665032; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7bDI1xqKClmZu2LPydV/rKtOY3Pk36/Y/7eFyMlkBAo=; b=d0RXiuuxe2LdK+dWXitetYxezIqjAJ+StcCpW7nJ30xWymwgfMaemXy+BHGxmYKnfe Xd4IuckLq8MiRELjlXy3UteqxdQ2V1XMXa+iycrMw710egDZRBHOrETs+HKu7+XcAzm5 UoN4/ThLC5vBaKZ1etJ4LsAd9Gjtup84fj3ZqQp3Ce4pNlS3M4OP0ec6ZlxSEkWCiwVQ TLtG64P7YPjJ+LALK6zgV8Kd8xrCL4A3gCnqcJ2sZhbPqf0ZlWMJ4Lq2LgN6/hsCa5sr L870zH+T9A+izH1QN1QPdaasj6GONn492iwq92W5nh4LWDRKvFd6jJytu+mPenfEbST9 rtdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709060232; x=1709665032; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7bDI1xqKClmZu2LPydV/rKtOY3Pk36/Y/7eFyMlkBAo=; b=NQBMoGTtJdYZAd4CuFfo5gPiuDslitF6gLCu1XKzqbLcGlWFqqINlTvsvvpgQPh6/I zbAvPOOGAU7BGhQF9pQGQ17f5VkXlQJHfkJsrgTho1mMwhtU4SS00TpKST9iG+evDWyL qRhgVXGkonrQOcm9l9a6okkK9DFK3jIVObGobluAg2XBIzn9vC2ZEtFFehybs+PzLW6e s8c7ww479q/USNO/YnVG4atUhMcOP5qc3Z3na2O1fShou7BG9JNAyIKvHXC5PSmdB6IK MZNbL+QDKCh6xQLfrJadhGNPFVGnAjd9nD2OpUdf5dqT9fwVjkrKXRhKshdsAjT9QrPc Nt2Q== X-Forwarded-Encrypted: i=1; AJvYcCUmmDczWksnqJCVokfRhBRqnhhbdFHoMA0FamMGtEWXgkDqefmAMsEB5Ul3ZJOUu8fIvaCjL/Ksm2JCu4G9VeTHWnmlaoPX6n1oMqfO X-Gm-Message-State: AOJu0YwL17/Z3zUKLvzsAgr6gMBd5Q2p03aJNCxSacCC7nPLWVPyRZdZ n6ky0IHkHHMS45AO+XaNfbfS8jYDc7JylMurVHHzrMCcpBmUARvz558BPgWmuZYR1IOGBpyOsf+ j/V3ZHS+Revuwatzo/0bLhGIiH5k= X-Received: by 2002:a05:6102:f0f:b0:470:547b:6f98 with SMTP id v15-20020a0561020f0f00b00470547b6f98mr10672145vss.18.1709060232084; Tue, 27 Feb 2024 10:57:12 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231025144546.577640-1-ryan.roberts@arm.com> <20240118111036.72641-1-21cnbao@gmail.com> <20240118111036.72641-7-21cnbao@gmail.com> <3a3461fc-4b30-4ba1-94c9-c048d08d40c0@arm.com> In-Reply-To: <3a3461fc-4b30-4ba1-94c9-c048d08d40c0@arm.com> From: Barry Song <21cnbao@gmail.com> Date: Wed, 28 Feb 2024 07:57:00 +1300 Message-ID: Subject: Re: [PATCH RFC 6/6] mm: madvise: don't split mTHP for MADV_PAGEOUT To: Ryan Roberts Cc: akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 28, 2024 at 3:40=E2=80=AFAM Ryan Roberts = wrote: > > 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 pa= tch > > extends the feature to madvise. > > > > If madvised range covers the whole large folio, we don't split it. Othe= rwise, > > we still need to split it. > > > > This patch doesn't depend on ARM64's CONT-PTE, alternatively, it define= s one > > helper named pte_range_cont_mapped() to check if all PTEs are contiguou= sly > > mapped to a large folio. > > I'm going to rework this patch and integrate it into my series if that's = ok with > you? This is perfect. Please integrate it into your swap-out series which is the perfect place for this MADV_PAGEOUT. Thanks Barry