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 6214EC7EE23 for ; Mon, 27 Feb 2023 00:58:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D9ADA6B0074; Sun, 26 Feb 2023 19:58:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D48F06B0075; Sun, 26 Feb 2023 19:58:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C10AC6B0078; Sun, 26 Feb 2023 19:58:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B11C06B0074 for ; Sun, 26 Feb 2023 19:58:44 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7462FC047C for ; Mon, 27 Feb 2023 00:58:44 +0000 (UTC) X-FDA: 80511261768.25.4B6E912 Received: from r3-19.sinamail.sina.com.cn (r3-19.sinamail.sina.com.cn [202.108.3.19]) by imf05.hostedemail.com (Postfix) with ESMTP id CCCBD100009 for ; Mon, 27 Feb 2023 00:58:40 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.19 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677459522; a=rsa-sha256; cv=none; b=GZEmdrYxIn8f9Ads2jTVUzNKWqIcjof7p+drHHV872DPlxuGB+Q2EHrOzo5/p02k2y/kqA IJY/DqP9pcHdRZifA9/bFBO4gNXMUBCxFKlNu1Vurpc1oQKlzIziFcs0iWi906LdIG/BPe UsI1x62vXbIsnEie8GERaWLO5ZmkBS8= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.19 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677459522; 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=CBavbu3M3PUaTyIFmUnJbiNq4NNzS8/XCULxH5dg6Uw=; b=NuAAMIfpz3+KHBLQVStjgBAtH92ImiqV9lOVuDpMXQu1lOjimU5oCba5+lijixuOlWhBsO r43LVH56fAALsrPuNuwT4aQkRd9PwKInC8P4JJ9Q9z0sh8uf9publaUKIY+vWiD9L6QgWw Y3s9/PPugtZWKLrjFbS1HFY6pFr+xVw= Received: from unknown (HELO localhost.localdomain)([114.249.61.130]) by sina.com (172.16.97.35) with ESMTP id 63FC002E0001D575; Mon, 27 Feb 2023 08:58:23 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 90188615079228 From: Hillf Danton To: Hillf Danton Cc: Matthew Wilcox , Yu Zhao , lsf-pc@lists.linux-foundation.org, Linux-MM , Yang Shi , "Yin, Fengwei" , Hugh Dickins , "Kirill A . Shutemov" Subject: Re: [LSF/MM/BPF TOPIC] Flexible orders for anonymous folios Date: Mon, 27 Feb 2023 08:58:25 +0800 Message-Id: <20230227005825.3510-1-hdanton@sina.com> In-Reply-To: <20230226041259.3414-1-hdanton@sina.com> References: <20230226013031.3356-1-hdanton@sina.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: CCCBD100009 X-Rspamd-Server: rspam01 X-Stat-Signature: wdmo3uyfg1rw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Dj0ffaMZcI0MD+6aGvRP+SfhynwnbtvbEH+nwqwGWP6sbF7S6D1euEnzOv4VRPg0f4OTewEmBM9rfmSYs81MEDcJ4R7g68bjZ0RWEUcyirh27DMo5YUuL8p+d1+lfbX2jinv4FZeWKkLTI2NZGYF5TnRhOyA+9CBrc6azVhsmWR3Gk+OytMWqgo0oBoeSw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000070, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, 26 Feb 2023 12:12:59 +0800 Hillf Danton wrote: > On Sun, 26 Feb 2023 02:34:05 +0000 Matthew Wilcox > > On Sun, Feb 26, 2023 at 09:30:31AM +0800, Hillf Danton wrote: > > > 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? 7. Given p4d_t, is 2023-25 the right time to add the PUD order? > > > > Many. https://lore.kernel.org/linux-mm/Y%2FWRlX+MkmxelNbg@casper.infradead.org/ > > Which one, supposedly given Apache Spark, MariaDB, Memcached, MongoDB, > Apache Cassandra, Apache Hadoop, PostgreSQL and Redis to ease the anwser?