Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp75034lqc; Thu, 29 Feb 2024 10:40:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWRx7vO7cGPNJ5V6nDiYx9C2uUXGQ5JnZCtbXlTIn2uDp76S52EnaZVhqoH9U480joT0qe1ALL5ZFgunm60T3ZMUI4wPvHjbpB30xMJIw== X-Google-Smtp-Source: AGHT+IEZbilt5JjXn8sLuPDIu98CBEMlDofj3o6Q2j48fNwOis4dParLyLy4GeyRFwO9/4XkRQE+ X-Received: by 2002:a05:6359:4c28:b0:17b:efd7:ecfe with SMTP id kj40-20020a0563594c2800b0017befd7ecfemr903560rwc.7.1709232039792; Thu, 29 Feb 2024 10:40:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709232039; cv=pass; d=google.com; s=arc-20160816; b=kJ5rTTvfKsla6oW9yllW0Ld6rO3vybzoraXXSfgOQS+xdGXf8FKidaefSru9TQUqe9 ccY19+4pxffgAdVWhmuKVUrqPP0d5r862xzG0FV+LwYYy0nLOm4it7y2HRkuQweGj5qX ST39T4UlLRKhUZSlzsveC69L1wNkYBBrR2XeSX0h2X5EZsEr8BkBf9G0jv5WysvNV4eY THn4s64CJh8fF+kPhFMiXmhsCATnrzm2tiqYUvI+NWgD0N5dtsmVk6jJGLDE0B/6Pn2t MeYfdBCkvt2/2JaAJNHOWVzuFnDxpQohEAjsBdo2yvDmbaY8WjJMWE0HXjRZNE7x6h3e qGjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=4W1E8EHWCM4qfZunAxGtwFfKYJHDus1Bf19FBUaX0Ec=; fh=SK0PNV1j1qprcswu0uyIkIp37tsw99/fqHwRA9q9BG4=; b=yh0JPEqw2qQLeDx/q5H/jCorFFA7Arj9WI5Nhgexu/wTOI036iJnB+YDR5u6Q6CzUC 5qoaTQD2WPuD1diiwYVW75wN5QlQ8YkKB6zJJyQuHCYhWgmP/9ainByx1Ki+bDo/FjHG mcRu/pTRmeKt5IQKbcn4JfulLxtixKziQqd6Sy0CFYk0jMvkVHY3r+7OJqOO11/A/4Yc gEII7ffXTUADZ8a9d7Dh/UWbCzZip2k5bBsjK420guxwG/RXdoXjEI+aoZfCnWL7JOLb buJh5qnEb0CndORHniHSXQT4OH98G/zU0Bt9de1bs2WqfiDA8yRGCTWKRDIErrHNT6Nf QuCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=gZvtYW5R; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87303-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o3-20020ad45c83000000b0068fd1c016c8si2073555qvh.421.2024.02.29.10.40.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 10:40:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=gZvtYW5R; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87303-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1904C1C22129 for ; Thu, 29 Feb 2024 18:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF8BE134428; Thu, 29 Feb 2024 18:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gZvtYW5R" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BD51160629 for ; Thu, 29 Feb 2024 18:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709232014; cv=none; b=fEfJZqxNiCYrRsh3rv1E2WABWLbLTqxO4Dy1mMZXe8J6cidSs639kasIvFht7Dfrh6SJb6SB2f2fZJ/B94tpYmKVyoA4RTZq6UBOOJsYdHxUZHMqhwDa2LEaceevF0gM67mPaFsHRQ7XE8dQQgH6m+2m80OIiZsTBpyNn2j8Fxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709232014; c=relaxed/simple; bh=G39x9X/r8wD8EZNMCjKX99fVjL/JmQl3/uLDdbycsUw=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=M6MU1VtFdaxkLy27QLDrp5fB4/d1ysZIcQKxdI7auLJeHhLi1ZMwmKDwXKWtvc0d09KSIhb9LGviPfSUaoszalXSB2X2a9gJFrz0kpSQKa1DafRfE19A/II4hDhZJQPjqqoURgWM5TiRQ76neyJCEnuo4yobC17HIn3HHdOAA8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=gZvtYW5R; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8B82C433F1; Thu, 29 Feb 2024 18:40:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1709232014; bh=G39x9X/r8wD8EZNMCjKX99fVjL/JmQl3/uLDdbycsUw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gZvtYW5RjwYGvMOcS1OD4p/NBFNkCvv+69I/19wQJojZcno1nDd8S9x6ufT9/b74c hrtO5sy9ttg1Enx/clLC3kgJM+v4EpMSxjvvkSPcfJxrZTOqz8FNt52Fus1uBgV5hG wdx/0gzpkwkSj4llp4f4J9CYk6lUE4gu9noxwvvA= Date: Thu, 29 Feb 2024 10:40:13 -0800 From: Andrew Morton To: Hao Ge Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, gehao618@163.com Subject: Re: [PATCH v2] mm/vmstat: Add order's information for extfrag_index and unusable_index Message-Id: <20240229104013.5ed8c1ca9c2dbd0bd5fb571f@linux-foundation.org> In-Reply-To: <20240229141443.99408-1-gehao@kylinos.cn> References: <20240229141443.99408-1-gehao@kylinos.cn> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 29 Feb 2024 22:14:43 +0800 Hao Ge wrote: > Current cat /sys/kernel/debug/extfrag/extfrag_index and > /sys/kernel/debug/extfrag/unusable_index is not friendly to userspace. > > We should add order's information so that users can clearly understand > the situation of each order at a glance like pagetypeinfo. > > before: > cat /sys/kernel/debug/extfrag/extfrag_index: > Node 0, zone DMA32 ...... ...... ...... ...... > Node 0, zone Normal ...... ...... ...... ...... > > cat /sys/kernel/debug/extfrag/unusable_index: > Node 0, zone DMA32 ..... ..... ..... ..... > Node 0, zone Normal ..... ..... ..... ..... > > after: > cat /sys/kernel/debug/extfrag/extfrag_index: > Extfrag index at order: 0 1 2 3 > Node 0, zone DMA ...... ...... ...... ...... > Node 0, zone Normal ...... ...... ...... ...... > > cat /sys/kernel/debug/extfrag/unusable_index: > Unusable index at order: 0 1 2 3 > Node 0, zone DMA ..... ..... ..... ..... > Node 0, zone Normal ..... ..... ..... ..... > This may break existing parsers of this file. And that would be allowed if these files were under debugfs. But they're under sysfs/debug, where the rules are less clear. Still, it's unclear to me that the benefit is worth this risk. What do others think?