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 2BDE1C77B61 for ; Fri, 21 Apr 2023 16:03:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91AF06B0071; Fri, 21 Apr 2023 12:03:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CB2A6B0072; Fri, 21 Apr 2023 12:03:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B9E36B0074; Fri, 21 Apr 2023 12:03:29 -0400 (EDT) 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 6B5706B0071 for ; Fri, 21 Apr 2023 12:03:29 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 23DA4A0526 for ; Fri, 21 Apr 2023 16:03:29 +0000 (UTC) X-FDA: 80705868138.07.32FFB97 Received: from outbound-smtp26.blacknight.com (outbound-smtp26.blacknight.com [81.17.249.194]) by imf03.hostedemail.com (Postfix) with ESMTP id 1BB4F20027 for ; Fri, 21 Apr 2023 16:03:25 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.194 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682093006; 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: in-reply-to:in-reply-to:references:references; bh=DmD+Rlrva5L6ZjhuHdQ1Fmnl5rso2AeW9qh+Rizq47I=; b=cAU52Ngj2zQPEQ8YHFJSxeiDNaVZZDMcgR1HNNN+Pv03AZfu2WnjE7BJRrRHsN1u+vJ12C 9amgVvaJU71P382k8HOe9ZHg+CbFkTRFvbah6ojYwHejYrd1OCJzzht8WvYgGuAhzfG3cV gXTZ4DdQbd4jpmwGgAuKnAiMkH8l304= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.194 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682093006; a=rsa-sha256; cv=none; b=aFZWxmvj80cwloAjREQjesWeHnPvDHx3ZtkRsicGxqkoiQOuaxGoM4l6zdeTxe3+26OAih 41e87nLLqEWnVePjJNnnRqhaRYHTY3KcD+Q40vlR9DHwrps1eafBCFh03ITUI+Z4/tAzOc m3BAv3WrybLO+3Ch7OakMYh/+4qRUOk= Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp26.blacknight.com (Postfix) with ESMTPS id 9D120CADCE for ; Fri, 21 Apr 2023 17:03:22 +0100 (IST) Received: (qmail 14677 invoked from network); 21 Apr 2023 16:03:22 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.21.103]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 21 Apr 2023 16:03:22 -0000 Date: Fri, 21 Apr 2023 17:03:20 +0100 From: Mel Gorman To: Johannes Weiner Cc: linux-mm@kvack.org, Kaiyang Zhao , Vlastimil Babka , David Rientjes , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 12/26] mm: page_alloc: per-migratetype free counts Message-ID: <20230421160320.zz2he2iprq37vnl3@techsingularity.net> References: <20230418191313.268131-1-hannes@cmpxchg.org> <20230418191313.268131-13-hannes@cmpxchg.org> <20230421142841.parju3gmqmpefigq@techsingularity.net> <20230421153501.GE320347@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20230421153501.GE320347@cmpxchg.org> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 1BB4F20027 X-Stat-Signature: ysybjgek9g6akcnjsxwqqf1heughscz5 X-HE-Tag: 1682093005-783401 X-HE-Meta: U2FsdGVkX1+IGrJ00J66Ax42EGaCPUW7Lj++hgZ/KC5BJwESpW0I3ILEecBTN0uGpNwnjpROId0gXZOZ8OraoKPmXrsz3gWkWTIYpSUBuRz/l5p8ZxHJfVXy1Jvi1M7XLXR4EazO7GyP8Yk/emPPw7Am1zqR4hnpBJJYwktvmZ87GO6eqUmXHaNf7aQP35bGfK1121g6ZwFCxKrQc3pgZ5zoGGsgSIguopjWH0yr3Mgu25aG8V46Uw5ERPNPhlpP+Grh5OkLkYdRyEc1sfycAoUDKHlHKcMiu28IhPlgRJIpfPpXDP6oIAKq6V/vgzdWST/ZcReJV8I3yZ6A8anqg9nHvsF5QpHsa63ElLUuWgCttmcqcrkK6/Pl86XHvKDKMfaqpXnh58i76pK2L6JtklMAa0mTvJMDXKpH13PFIsyvWEIF49xSyTxtECPDKuoPHoGgrup79e47dX68zBwo2zMYwT4YveRZ27ObagSJ2uYt5Z7mYraqqwMTLZfrg5r+iYMM7vlytnnD3pIiahId9+D+L08M8JN2O2kA+39VXrR0Jls2gQ+SMCpa4aKiSX3U+4dKXHrV2tTdj2AeK84H3GEZEpgd2O7hSqUjbm707/JL10bioGaN+53nxnsV1OAeJ9llbiia42hpLgPj2thea63frAHKeRBB3NATy1K9M7vRxgHkSQemh/Uqmv1mQtizjKSwLMOioDKJfqRTlCfkjnIFJLCOWuDq+EIKQibEfEawhwC0vegq4ifgMZARpsq5/b3osbCjQCKH69plwCQWcwPiNZ8GPPrBIuCN6+a7Rl9alMKkZyO5PV/y3GQCs0YBtK3TYu+y9UVZWGhD6bJUa8MdomXoasjv9cTgKpaqhSevLq6HLQ+geYwzUDsQt6SSaqKdE94vIcLHZdgs5uO01/EpvPCNRTICTRhJ4XHnW/BJdgNFT7MWg5IAY/PUhhOmxKK3ZJZnDYaLaW8ANAB mHsCptT6 dOL+sXoV6c9zO1fQ6E1V+ikVxCKCKEdAaLi7wRDtSNrAxrIS2gTveakftpcGIp6yll4c21QCucPxSddgYSgoastyy5a067tonAmPYNS+Lg1jXhtXJH8Ytrta6t7Owy8Uwj7DjWjEX3eH+4ySJ3UvlyCOH6JEtrNuK1RM6vS72pUfjqjHUgKGRA1J2rLwGeYqyhfZjaHyG0+m6x1jSAvj1Yh8pLg86CPtHlyE2/5EIKW6ahvahL1kjZ1GdZBnxNxIIQ16+mVeVNQh9yko= 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: On Fri, Apr 21, 2023 at 11:35:01AM -0400, Johannes Weiner wrote: > On Fri, Apr 21, 2023 at 03:28:41PM +0100, Mel Gorman wrote: > > On Tue, Apr 18, 2023 at 03:12:59PM -0400, Johannes Weiner wrote: > > > Increase visibility into the defragmentation behavior by tracking and > > > reporting per-migratetype free counters. > > > > > > Subsequent patches will also use those counters to make more targeted > > > reclaim/compaction decisions. > > > > > > Signed-off-by: Johannes Weiner > > > > Visibility into fragmentation behaviour is information that is > > almost certainly only useful to a developer and even then, there is > > /proc/pagetypeinfo. At minimum, move this patch to later in the series > > but I'm skeptical about its benefit. > > Having them available in the memory dump (OOM, sysrq) was essential > while debugging problems in later patches. For OOMs or lockups, > pagetypeinfo isn't available. It would be useful to have them included > in user reports if any issues pop up. > OOM+sysrq could optionally take the very expensive step of traversing the lists to get the count so yes, it helps debugging, but not necessarily critical. > They're used internally in several places later on, too. > I did see that for deciding the suitability for compaction. Minimally, put the patches adjacent in the series and later if possible so that the series can be taken in parts. There are a lot of patches that should be relatively uncontroversial so maybe make "mm: page_alloc: introduce MIGRATE_FREE" the pivot point between incremental improvements and "everything on and after this patch is relatively high risk, could excessively compact/reclaim, could livelock etc". -- Mel Gorman SUSE Labs