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 4D9F0C4167B for ; Wed, 29 Nov 2023 09:59:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C7BC66B03BB; Wed, 29 Nov 2023 04:59:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C2C7B6B03BC; Wed, 29 Nov 2023 04:59:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1C076B03BF; Wed, 29 Nov 2023 04:59:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A2CF36B03BB for ; Wed, 29 Nov 2023 04:59:54 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6FE3380385 for ; Wed, 29 Nov 2023 09:59:54 +0000 (UTC) X-FDA: 81510545508.25.0F2FB0E Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf18.hostedemail.com (Postfix) with ESMTP id 5181F1C0033 for ; Wed, 29 Nov 2023 09:59:52 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701251992; a=rsa-sha256; cv=none; b=ZveLF6HnCjB274Mm1hWDW0EN7n602LZAhi88H/Uf7pus0rToI4zCwJdYWmytWU7wSgXsQD sZloH2GRutKBxJxhBEkECWZXAMRfKRejOrTxd+YBa8Huq2zeUH5pVRl+TJ7jvWltowq+9p LvcQV2Yg7X/FChSXelUI+X79IB8WxKE= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701251992; 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; bh=i6M+T+N80QeVDEWhFQzuJ8TzUiDoZ4N3KBt+j2u5Vnk=; b=vCJBSz/Dg8+v+qpG/Lcpy+0VzEYPPtEF78RaLBAV9YxO8muU43+TnPiktngGtq5RnnFWCY uMZvFUQ+cxZZUB+Eucx48lNzYEnSmC4s9Kpki3JS6HhmsgbhkiBJaj43nvudSyY+F087+P MRheiNC1ZUiOxjpsTqaZjTn5hS960vA= 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 A16792F4; Wed, 29 Nov 2023 02:00:37 -0800 (PST) Received: from [10.57.70.211] (unknown [10.57.70.211]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9DEA03F5A1; Wed, 29 Nov 2023 01:59:47 -0800 (PST) Message-ID: <832a486c-7f22-49cd-a3f5-3709dc6c6d09@arm.com> Date: Wed, 29 Nov 2023 09:59:46 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND PATCH v7 00/10] Small-sized THP for anonymous memory Content-Language: en-GB To: John Hubbard , David Hildenbrand , Alistair Popple Cc: Matthew Wilcox , Andrew Morton , Yin Fengwei , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , David Rientjes , Vlastimil Babka , Hugh Dickins , Kefeng Wang , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231122162950.3854897-1-ryan.roberts@arm.com> <9c8f6d2a-7ed8-45d2-9684-d77489bd99b8@redhat.com> <26c361bc-6d87-4a57-9fae-ef635c9039c7@redhat.com> <87sf4rppuc.fsf@nvdebian.thelocal> <51e6c9f1-e863-464b-b5f3-d7f60a7ebed6@arm.com> <58af512c-3d7d-4774-88f7-6336c9384b61@arm.com> <137902b6-24dc-4d51-9be2-6f94aa9dbc3a@redhat.com> <47d27539-6cf1-4375-9bbb-2ebb9a2acfb3@nvidia.com> From: Ryan Roberts In-Reply-To: <47d27539-6cf1-4375-9bbb-2ebb9a2acfb3@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 5181F1C0033 X-Stat-Signature: 4zhtk7hmzou4guuxhhekfumw5fgzpjci X-HE-Tag: 1701251992-412952 X-HE-Meta: U2FsdGVkX19cKUg3dFgoJ+kRIJWC+Qxqu7nhNqCYlscH0Rz83PYhFQc+9/IuF1j8k1LpqyabNtLftSWDJyjH02WEgpfCyXlX+elMNa6Wg4hnkPAAvo3kiJYSiJwaG/ysWz6iCpIh5+LPyww6TjUmUB5EQfW6J/EPw6Xx4w8njJQG7f+3gZjEfUf/G/A6z4gCZrnIyekbszS44F80n/UPnKeYH/OzikDkrTO60gxAaJd2F2OghF24BLdT4SLMTwx+8OR8HI9xeLL6ZHZrVwOpjYOJSWMbO6Cn46QZp90YxHtHXdS7NuzQMx7gKSUaZFXjnu7yKFC3fvs5KHONrk7OaLOdwGgmEtl3anveEjk+n7O17pwrRyQKKPUmXPjHeRoFp7oh41eA5SQtGww3UWWIn7LVtKXHuCrU2dU2XQVY2CRfEyUQrFkaR7OkdcUtRZHVluk8BL2Wm8aOaiAAxCHYmb/4vDblx4iW+xxIhmvD5Szp3gm5d4sH3R/mvNO9AcX/TwJWbals1NM1xRYPC+i+7X2Q3kmRiodMH+nUW+9CtRKwxggM3U4UX6hMd6M9VBOu9Zj7ChLZkqlICYyqdoJcxr8O114Bc/ym3Zu1OJLN6s5jbCQc7y2zWpkxkqaSryy0gevCl/+GPYU/meZjriXO8wiLf2+PU4tdo1tMoVknYN363yJ5QoTBcbzSc1GCALRT5d02UUyRz+V7U5jC0WTZkW/L+3YHDK3dhxdb6l1nDu45FKfSHCrsvZv7Vhp6/cVmtnwZ3jXkk0OGQ9WyCKfDaSifAr8am/e+cNz9PEo6TQCU/ZmrQmcfZYE8s5ur2Yebm/UWrtHjWA5tDHT1Xn291/JtEEvZt/oqhvYsGydrwGFv5Ev5CPHXNHgetPew8R63eIfyGWNqXaeTG9zTkutnbJtozeiCEjUf0rsch/6JnYiadAWxYcWB687aKL+FKxCQYFc+gVU1GHk9ahl0CE7 USyX4pq6 Hd3YkcmvwIbC70ALAPSTTbtTYbUBzNXnyuhId/T4XFWTlRfYNvtrVUCUDJEGq3XJS96mNHePQPwYpstaW/32mt9YQF8/fPB9fQnnWKXFkVxQG1CW9l9hQytMAfSAevHJlq4WXfxJ0GLFtVtNGglb9hl5o08hT2ML/6Svgd6CvL01Xb6sgk6OhWAdn2pGrlHpdphPEtDWttN85OVnMIYybR7qZ3io1ihkY9kwJ 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 28/11/2023 18:39, John Hubbard wrote: > On 11/28/23 07:34, Ryan Roberts wrote: >> On 28/11/2023 14:09, David Hildenbrand wrote: >>> On 28.11.23 13:15, Ryan Roberts wrote: >>>> On 28/11/2023 08:48, David Hildenbrand wrote: >>>> How about we just stop trying to come up with a term for the "small-sized THP" >>>> vs "PMD-sized THP" and instead invent a name that covers ALL THP: >>>> >>>> "multi-size THP" vs "PMD-sized THP". >>>> >>>> Then in the docs we can talk about how multi-size THP introduces the ability to >>>> allocate memory in blocks that are bigger than a base page but smaller than >>>> traditional PMD-size, in increments of a power-of-2 number of pages. >>> >>> So you're thinking of something like "multi-size THP" as a feature name, and >>> stating that for now we limit it to <= PMD size. mTHP would be the short name? >> >> Sure. > > Sounds workable to me, too. > >> >>> >>> For the stats, we'd document that "AnonHugePages" and friends only count >>> traditional PMD-sized THP for historical reasons -- and that AnonHugePages >>> should have been called AnonHugePmdMapped (which we could still add as an alias >>> and document why AnonHugePages is weird). >> >> Sounds good to me. > > OK. > >> >>> >>> Regarding new stats, maybe an interface that indicates the actual sizes would be >>> best. As discussed, extending the existing single-large-file statistics might >>> not be possible and we'd have to come up with a new interface, that maybe >>> completely lacks "AnonHugePages" and directly goes for the individual sizes. >> >> Yes, but I think we are agreed this is future work. >> > > We do want to have at least some way to verify that mTHP is active from > day 0, though. Could you clarify what you mean by "active"? Current plan is that there will be a per-size transparent_hugepage/hugepages-kB/enabled sysfs file that can be querried to see if the size is enabled (available for the kernel to use). But for this initial submission, we previously agreed (well, at least David and I) that not having a full set of stats is not a problem - they can come later. So the only way to verify that the kernel is allocating and mapping a particular THP size is to parse /proc/pagemap and look at the PFNs for now. Is that sufficient? > > > thanks,