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 4BF94CD4F5B for ; Thu, 5 Sep 2024 07:29:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 685286B0276; Thu, 5 Sep 2024 03:29:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 635DA6B027A; Thu, 5 Sep 2024 03:29:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AD786B0276; Thu, 5 Sep 2024 03:29:49 -0400 (EDT) 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 26CB76B0271 for ; Thu, 5 Sep 2024 03:29:49 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 94FF841A91 for ; Thu, 5 Sep 2024 07:29:48 +0000 (UTC) X-FDA: 82529860056.17.250721A Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf27.hostedemail.com (Postfix) with ESMTP id EF51040019 for ; Thu, 5 Sep 2024 07:29:46 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf27.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725521291; 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=dUl7djiZYeSS/XjL828lgFkM1zEVT7jxiyhlqL5zFJE=; b=a0pnD8p1fEDbklKxGCx6aMoJDxbrtxhzVQtyqiWK3O3EQHNwUYET1rrx8pw0KS6JA1IK/X 1XfCkjqASO30O37cM5C6NrtLxgT9AbKOW9PeRnzuvXQTwUCeXR+PRr3ORwVOlJt4sly+Rj DxmWbMfGfX7i85+hvAnJMvomM5m47Xo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725521291; a=rsa-sha256; cv=none; b=KxKE5WuD6fNIShfs6fb1wmJMEeMGjheWpcnIZmfLyAdSEEUyQcRas40Ec6nrORunB+x2Lh 8Sx92a40pROjYbGl8zDIWypYmCFdVOYJRZuOj2QGEu7H4gkpWgsmi+VI3GehEyRyXccus2 rMMtVxe+qGY6USt8/rxp25kJeS/ck6E= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf27.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com 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 78ED7FEC; Thu, 5 Sep 2024 00:30:12 -0700 (PDT) Received: from [10.57.87.65] (unknown [10.57.87.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9618E3F66E; Thu, 5 Sep 2024 00:29:44 -0700 (PDT) Message-ID: <78ddd0df-e8e1-414b-92fc-19a4860f183d@arm.com> Date: Thu, 5 Sep 2024 08:29:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] mm: Tidy up shmem mTHP controls and stats Content-Language: en-GB To: Andrew Morton Cc: Baolin Wang , Hugh Dickins , "Matthew Wilcox (Oracle)" , David Hildenbrand , Barry Song , Lance Yang , Gavin Shan , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20240808111849.651867-1-ryan.roberts@arm.com> <20240808111849.651867-3-ryan.roberts@arm.com> <747d1319-f746-4379-bf88-a0f6c3f558b4@linux.alibaba.com> <20240904134631.4dd7a0bde6439aad3a275002@linux-foundation.org> From: Ryan Roberts In-Reply-To: <20240904134631.4dd7a0bde6439aad3a275002@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF51040019 X-Stat-Signature: qrjgudkcpknqpqrgoz5a1s3oeztwrenk X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1725521386-816354 X-HE-Meta: U2FsdGVkX19jbzgzperFQVdLni3FHUtpWa6Qt7Aqv/qNVjZ32M516PPfqhD5/AjvubnkDkuOXpcyRqUmPWgAnW8FgRUStLYNMP8UEcTzT5pdemgr2F9AZXTjnYLIGcHliv8kvZfHqNthutpBeLeOtFil4arcO/DA+eCaeE+h/62If1BnIz/Ie3rREFUXre4i8+O1H4lMTBO/o0/PGaX/fQCEV766uukCXFsAP+cBC6neB1YNqjLlpM2pOAZ7WsEnj1x48eIvxymgPGhO8xonYfZ1ESf04dfar0KbZae0I2vrTMAL1GRDVI1kXsOsMpwWjkQVSpnB5p8UdNDWmMClT3ZGYHIb7RJbCSo7cfsJ+jLZKVpFtkm9n5eHMJNaMEhrXVhHhxqAfGmiSVHPwvRKrZbkWqW0PzE4X9Uy/fZ8PB2nhPQb94jCcJkEumBwofzEucBBAGb0/Wk+vEtdxFNaFWI+UEzW+j3OccSzYAr6i8wok/CbUPysx+qWejbzxxpniKSdaKVeRPse+N35x7lw5Rc1erpEjZLtFw0LKrp4SDsYI/whARGCkyZSZ5YjIQHhqdNqrizEAAxxrJ6AArn0FsMWqTfI2+ykWtJWNvaige+Ta2asxQWjicZqsTy3wUgmypYMKnhMXczlQJrf1FLqVHXvrfAKP/poY5J6kAqdvOc37iYA48eVYcHmwWV38zKD6uT2Mz7S7Due4WxgCdBMjrJoJM3qF0vSMA8lSjb2Z4HAMStJ4Wx98wvY441wYiE/hvibtUj/FZAvjgXNVi1hqT6WonB926Wb19NHK0+0kJN4fMNT442PS2qDNYlEE085OHPIVqMrp6UHZI6rSEyn6rnXM13NTbFvd/PeNIJOvcQMf47u2Ll/7Jf5+/ItYU59EZhkO5cK/KOkk953WBkhoxZwGUhyZk1RGPCywclqk8n3utzVYe9fzqfWI6agTNVSLzIAS8iPGcZayV/4JFi ru9+TUwU laqSmJlWFUNeIxLPBVRR0XkTSUgfQi++H2deY5L9yTloJIm7DmCQAMagAoHml7BAUXIZYOoJP2ovE+Qcq5xNoQvK74jxx4Zg0A0H+U3iHLcPabdNIRv0spdKQEB6ifFHhbm7+j4HgUSISIxMsJPQ00coB313K9uqcJ9MIfZdu6mEAuywVr2sg80N7NTJnPZs3a0WzmQBHlPBUF7892yMYUeFaryDiOY73DJ5LLk8aay1wLPCCEOzWUklpw+okad6qXCKBm+4eWfT5eqAPDc6Ne5cu52CH7JynrL5DDAgYDCYijKdXjU9qrM6CUw== 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 04/09/2024 21:46, Andrew Morton wrote: > On Wed, 4 Sep 2024 11:47:29 +0100 Ryan Roberts wrote: > >>>> +static struct attribute *any_ctrl_attrs[] = { >>>> +    NULL, >>>> +}; >>>> + >>>> +static const struct attribute_group any_ctrl_attr_grp = { >>>> +    .attrs = any_ctrl_attrs, >>>>   }; >>> >>> I wonder why adding a NULL group? > > Was this review comment addressed? Yes, we had discussion at [1] and concluded to leave it as is; Baolin had a preference to remove it (but no strong opinion) and Barry preferred it as is to explicitly indicate that there are no controls shared by file/shmem/anon currently. [1] https://lore.kernel.org/linux-mm/CAGsJ_4z+yERPLwzm-8Mkx8MsNZAz0zZWycZfuGRjOc4kxS=HwQ@mail.gmail.com/ > >> >> ... >> >>>> +    &shmem_alloc_attr.attr, >>>> +    &shmem_fallback_attr.attr, >>>> +    &shmem_fallback_charge_attr.attr, >>>> +#endif >>>> +    NULL, >>>> +}; >>>> + >>>> +static struct attribute_group file_stats_attr_grp = { >>>> +    .name = "stats", >>>> +    .attrs = file_stats_attrs, >>>> +}; >>>> + >>>> +static struct attribute *any_stats_attrs[] = { >>>> +#ifdef CONFIG_SHMEM >>>> +    &swpout_attr.attr, >>>> +    &swpout_fallback_attr.attr, >>>> +#endif >>> >>> Sorry I did not point it out in early version. I think file pages and shmem can >>> also be split, while 'split_deferred' is only for anonymous page. So I think the >>> any_stats_attrs should be: >>> static struct attribute *any_stats_attrs[] = { >>> #ifdef CONFIG_SHMEM >>>     &swpout_attr.attr, >>>     &swpout_fallback_attr.attr, >>> #endif >>>     &split_attr.attr, >>>     &split_failed_attr.attr, >>>     NULL, >>> }; >> >> Could you please squash the following into this patch, which is already in >> mm-unstable? I'm hoping this sufficient and I don't need to send a whole new >> revision since there are changes on top of this in mm-unstable, which makes >> things tricky. > > I did that. Please send along a Signoff and a changelog? Ahh sorry, so even though you are squashing into an existing patch which has the change log and sign-off, the process still requires a separate one here? My bad. ----8<---- Fixup commit ("mm: Tidy up shmem mTHP controls and stats") by moving split_attr and split_failed_attr stats to the any_stats_attrs group. All memory types can have their folios split, so it was incorrect to only show this stat for anon memory. Signed-off-by: Ryan Roberts ----8<---- Thanks, Ryan