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 DFBCFC6FA8E for ; Sun, 26 Feb 2023 01:30:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C892F6B0072; Sat, 25 Feb 2023 20:30:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C395C6B0073; Sat, 25 Feb 2023 20:30:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B00D66B0074; Sat, 25 Feb 2023 20:30:51 -0500 (EST) 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 9CB156B0072 for ; Sat, 25 Feb 2023 20:30:51 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 65311160764 for ; Sun, 26 Feb 2023 01:30:51 +0000 (UTC) X-FDA: 80507713902.05.EA0F5AA Received: from mail3-165.sinamail.sina.com.cn (mail3-165.sinamail.sina.com.cn [202.108.3.165]) by imf27.hostedemail.com (Postfix) with ESMTP id A236740010 for ; Sun, 26 Feb 2023 01:30:46 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.165 as permitted sender) smtp.mailfrom=hdanton@sina.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677375049; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Swu1WTtun3+rUXszCYk1M8Qq4tR85/nPZJFMoARbccE=; b=3JeZfNkGrQqxWyXWxr2e9cCI9eCKTxI5b3kFWWvT2E6iBTAMrasHNf0ouEK+faL8s/W+S9 0j0d9KI+7KBaazq29s0VINEUCu0k948OAlgetBB8J2r1jNlU66JSYD8oMsBiWUGTxctDBF /5T0AMLT6u3R4paDgsccBqggzez0EvU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf27.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.165 as permitted sender) smtp.mailfrom=hdanton@sina.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677375049; a=rsa-sha256; cv=none; b=31lTjQmtSqAE85iiKpr6mVRGWKGNyUAQaeosNstNy0LvDzzjUCgeDwLh3n2pa2+muXUsIf KNPIBPxm9aIoQ/8Ef+Jq2lTfvinfBHbu3OHjGrjeS8lM84xEmlwk7Z0CHG4moKOvmWsAba hiTBWQl/XigwA1zc6DKYIq3bSUJLnc0= Received: from unknown (HELO localhost.localdomain)([114.249.61.130]) by sina.com (172.16.97.32) with ESMTP id 63FAB6350001C17F; Sun, 26 Feb 2023 09:30:31 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 423289630541 From: Hillf Danton To: Yu Zhao Cc: lsf-pc@lists.linux-foundation.org, Linux-MM , Yang Shi , Matthew Wilcox , "Yin, Fengwei" , Hugh Dickins , "Kirill A . Shutemov" Subject: Re: [LSF/MM/BPF TOPIC] Flexible orders for anonymous folios Date: Sun, 26 Feb 2023 09:30:31 +0800 Message-Id: <20230226013031.3356-1-hdanton@sina.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A236740010 X-Stat-Signature: hukzerwgajno8onb8m7eykc18dhpk8pm X-Rspam-User: X-HE-Tag: 1677375046-877575 X-HE-Meta: U2FsdGVkX1+S4nBCzk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ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 22, 2023 at 04:55:20PM -0700, Yu Zhao wrote: > Currently anonymous folios only support two orders: 0 and the PMD > order. Flexible orders for anonymous folios can resist both internal > or external fragmentations when the PMD order is too underutilized or > costly to allocate. Flexible orders can also leverage the TLB > coalescing feature, .e.g., order 3 for AMD and order 4 for ARM CPUs. > > Discussion points: > 1. The page fault path: determining the best order and the fallback policy. > 2. The reclaim path: detecting the utilization and the splitting policy. > 3. The refcount and the mapcount models, e.g., reuse the PMD-mapped > THP model or not. > 4. The splitting, and the collapsing if needed. > 5. Other paths: COW, GUP, madvise(), mprotect(), page migration, etc. 6. Given the number of TLB is farrr less than the number of pages, what workload prefers MADV_ORDER6 over MADV_HUGEPAGE for instance?