From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 144F7C04FFE for ; Wed, 8 May 2024 17:04:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9EC606B00A0; Wed, 8 May 2024 13:04:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 975966B00A1; Wed, 8 May 2024 13:04:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C7BB6B00A2; Wed, 8 May 2024 13:04:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5B0C26B00A0 for ; Wed, 8 May 2024 13:04:06 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1118F120952 for ; Wed, 8 May 2024 17:04:06 +0000 (UTC) X-FDA: 82095851292.27.C7885A5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 9AA3740026 for ; Wed, 8 May 2024 17:04:03 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=D54AlkoL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715187843; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rcCPo+3cu7idI5ZAWXQbTctQ8e7vzqGNjylW862XvfA=; b=Kn140YWVU6xUiwfe5vm+JLgr1vvtGFla+H4xftLsoc+mM5NckTo1NY90ipMb45qriUZo1B DSVx6zya5C7LHASJmnr6zq+XThOaxe9bLQAxAwumWz0BGvwI+9B6OTn20SNFNTNVvbmoNO yjvaspJxumFAygaJHArattl34511W1c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715187843; a=rsa-sha256; cv=none; b=pijZXW3ReLk40wRhIF5UtfdbGjgxiOgNRSRdMA9k8KtUkaPbxpD7rubJ0aaoiujF4XfksH V2JWj/nHfIdMf761v9rpGHP0VBs1K/Q7pd2AQWllCVrh4f1+73vizzTW8hCUVFNhlt3kYZ 2N2+kjvl40N/LwqyqP13vvEkCsIiMGo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=D54AlkoL; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715187842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=rcCPo+3cu7idI5ZAWXQbTctQ8e7vzqGNjylW862XvfA=; b=D54AlkoL7N7Kri+pIRobNmx8exXb+Xp6rec81NWMkpnjwlbvjZmzzyLOtakOvrPujg4el9 SCrmeKClkDJtER7r26ZVzwkt6065phwwe4g8NJzH4IxaU14ibc8ayBCTdOqDP/o1rEIKwn yRjnvpDWNryOiOSsD2J7VcQAndWokKE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-172-78EYUxkXOxCql6XMIFdxNg-1; Wed, 08 May 2024 13:04:01 -0400 X-MC-Unique: 78EYUxkXOxCql6XMIFdxNg-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-51fd3568b04so3712093e87.1 for ; Wed, 08 May 2024 10:04:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715187840; x=1715792640; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=rcCPo+3cu7idI5ZAWXQbTctQ8e7vzqGNjylW862XvfA=; b=h4xt6hK08bo2U3TWB2lwp1A2xz0jNWlqbM8PI5q86H5CgN8Yc0GV52hRizmLkeNddJ kDXjDuu3TqY163NAvl3MBLca7Y8xWHEFw6UWfT0cfYtGfH4/+eWjLLcHh3GHMU2PgRb6 q7KU+ahTHaKNDydpBKYLrRXjbrqrMzje+2vpS3SeGlHCi0YOk4uSOgH5t3CDpnIv4Vuk avdBJDXS3xTePEOIcDxkcu4Hg3NtICRtid+wyvEigRS/KRI7L1mYhl2LOqbizJ6y2uhH 6WIJZ06jn0Tb4HT6hsD1ZnxDZldWAMHqS708w6WFbFJG9sjWbC/IM1Wit7aPq1VLJo2k WCNA== X-Forwarded-Encrypted: i=1; AJvYcCWKeMy/XrPRq3RlQLlppaHj58kUCixh03gS20ihMPXApkG51hxYEySZ6sBJticJOePl4n4Ryh4PSwQg3z/YrTuk9hQ= X-Gm-Message-State: AOJu0YzPM7KOoqxvPLA5Otp4khzAqKvwgM9hsvxKuVP48bb9r0gb71Qc 864ytVN4B1S3vyMVnR6fH9/Pis5WUokwwLkBab8AA9JuIA/57uuzum1Ht+09MmJvw6ASSDCpipc KYOVQ63kXuYmttEl94hTwM6aEAA+Nr9E0LjnwEFio9Q0VY46g X-Received: by 2002:a19:ee04:0:b0:51f:567b:c39b with SMTP id 2adb3069b0e04-5217c567c27mr1778781e87.28.1715187839842; Wed, 08 May 2024 10:03:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZJM//vTl/fBSB8ICDIb2GqYbnha27YpgvgG5v6MixBLxzU5Why65bKpXCjnOJGSnaESHi7w== X-Received: by 2002:a19:ee04:0:b0:51f:567b:c39b with SMTP id 2adb3069b0e04-5217c567c27mr1778746e87.28.1715187839165; Wed, 08 May 2024 10:03:59 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:3100:35c3:fc4b:669f:9ff9? (p200300cbc707310035c3fc4b669f9ff9.dip0.t-ipconnect.de. [2003:cb:c707:3100:35c3:fc4b:669f:9ff9]) by smtp.gmail.com with ESMTPSA id v20-20020a05600c445400b0041ac5f19213sm2924704wmn.8.2024.05.08.10.03.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 10:03:58 -0700 (PDT) Message-ID: Date: Wed, 8 May 2024 19:03:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/8] add mTHP support for anonymous shmem To: Daniel Gomez Cc: Baolin Wang , "akpm@linux-foundation.org" , "hughd@google.com" , "willy@infradead.org" , "ioworker0@gmail.com" , "wangkefeng.wang@huawei.com" , "ying.huang@intel.com" , "21cnbao@gmail.com" <21cnbao@gmail.com>, "ryan.roberts@arm.com" , "shy828301@gmail.com" , "ziy@nvidia.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" References: From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+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tc1xMOkYN/MpN3hD3 AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 9AA3740026 X-Stat-Signature: r47gx84z5bbkkd4nmquxrkn7hxuq9i7y X-Rspam-User: X-HE-Tag: 1715187843-280288 X-HE-Meta: U2FsdGVkX19C/CrgsdlrQrdOfKgbvRl/feeTCnxJMapgH7bJGeyjJ2oiZC/irlYWV9cgMjk8ZNV8f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05paKj1P+LS4wb0RM6gTuNkP0arJ5fwP5S4J4nhWU8X6JVrGUbGBYlJTK9b2hMEgj4s+HRQsGL3HMqxausBBDgvKhpLrcT5o1CkAzOJpxIUmEk9US1uE8ZxQVXGNGW76ax+xQ1hqfnRpu3DiD12Y7wElYoVFxYBXaDu97y+Zg2QtRZ23Wl6O9Awx5dC9a0vbDweywPkyHLUoL7q/txwg86Ddtgiulz2832jxH39vrm81af83eb9aMxnGe+wAWoARZAdy3ft5F4wethaUNqIJ0HV/CO4io14dEut5iMcKiHFihPtsYFJFZgCQAm9eduFRIjhKn1j8vIqIKVejuQW4pwcVplYr5HZCOk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 08.05.24 16:28, Daniel Gomez wrote: > On Wed, May 08, 2024 at 01:58:19PM +0200, David Hildenbrand wrote: >> On 08.05.24 13:39, Daniel Gomez wrote: >>> On Mon, May 06, 2024 at 04:46:24PM +0800, Baolin Wang wrote: >>>> Anonymous pages have already been supported for multi-size (mTHP) allocation >>>> through commit 19eaf44954df, that can allow THP to be configured through the >>>> sysfs interface located at '/sys/kernel/mm/transparent_hugepage/hugepage-XXkb/enabled'. >>>> >>>> However, the anonymous shared pages will ignore the anonymous mTHP rule >>>> configured through the sysfs interface, and can only use the PMD-mapped >>>> THP, that is not reasonable. Many implement anonymous page sharing through >>>> mmap(MAP_SHARED | MAP_ANONYMOUS), especially in database usage scenarios, >>>> therefore, users expect to apply an unified mTHP strategy for anonymous pages, >>>> also including the anonymous shared pages, in order to enjoy the benefits of >>>> mTHP. For example, lower latency than PMD-mapped THP, smaller memory bloat >>>> than PMD-mapped THP, contiguous PTEs on ARM architecture to reduce TLB miss etc. >>>> >>>> The primary strategy is similar to supporting anonymous mTHP. Introduce >>>> a new interface '/mm/transparent_hugepage/hugepage-XXkb/shmem_enabled', >>>> which can have all the same values as the top-level >>>> '/sys/kernel/mm/transparent_hugepage/shmem_enabled', with adding a new >>>> additional "inherit" option. By default all sizes will be set to "never" >>>> except PMD size, which is set to "inherit". This ensures backward compatibility >>>> with the shmem enabled of the top level, meanwhile also allows independent >>>> control of shmem enabled for each mTHP. >>> >>> I'm trying to understand the adoption of mTHP and how it fits into the adoption >>> of (large) folios that the kernel is moving towards. Can you, or anyone involved >>> here, explain this? How much do they overlap, and can we benefit from having >>> both? Is there any argument against the adoption of large folios here that I >>> might have missed? >> >> mTHP are implemented using large folios, just like traditional PMD-sized THP >> are. (you really should explore the history of mTHP and how it all works >> internally) > > I'll check more in deep the code. By any chance are any of you going to be at > LSFMM this year? I have this session [1] scheduled for Wednesday and it would > be nice to get your feedback on it and if you see this working together with > mTHP/THP. > I'll be around and will attend that session! But note that I am still scratching my head what to do with "ordinary" shmem, especially because of the weird way shmem behaves in contrast to real files (below). Some input from Hugh might be very helpful. Example: you write() to a shmem file and populate a 2M THP. Then, nobody touches that file for a long time. There are certainly other mmap() users that could better benefit from that THP ... and without swap that THP will be trapped there possibly a long time (unless I am missing an important piece of shmem THP design :) )? Sure, if we only have THP's it's nice, that's just not the reality unfortunately. IIRC, that's one of the reasons why THP for shmem can be enabled/disabled. But again, still scratching my head ... Note that this patch set only tackles anonymous shmem (MAP_SHARED|MAP_ANON), which is in 99.999% of all cases only accessed via page tables (memory allocated during page faults). I think there are ways to grab the fd (/proc/self/fd), but IIRC only corner cases read/write that. So in that sense, anonymous shmem (this patch set) behaves mostly like ordinary anonymous memory, and likely there is not much overlap with other "allocate large folios during read/write/fallocate" as in [1]. swap might have an overlap. The real confusion begins when we have ordinary shmem: some users never mmap it and only read/write, some users never read/write it and only mmap it and some (less common?) users do both. And shmem really is special: it looks like "just another file", but memory-consumption and reclaim wise it behaves just like anonymous memory. It might be swappable ("usually very limited backing disk space available") or it might not. In a subthread here we are discussing what to do with that special "shmem_enabled = force" mode ... and it's all complicated I think. > [1] https://lore.kernel.org/all/4ktpayu66noklllpdpspa3vm5gbmb5boxskcj2q6qn7md3pwwt@kvlu64pqwjzl/ > >> >> The biggest challenge with memory that cannot be evicted on memory pressure >> to be reclaimed (in contrast to your ordinary files in the pagecache) is >> memory waste, well, and placement of large chunks of memory in general, >> during page faults. >> >> In the worst case (no swap), you allocate a large chunk of memory once and >> it will stick around until freed: no reclaim of that memory. > > I can see that path being triggered by some fstests but only for THP (where we > can actually reclaim memory). Is that when we punch-hole a partial THP and split it? I'd be interested in what that test does. -- Cheers, David / dhildenb