Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp81482rdh; Tue, 6 Feb 2024 20:37:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+0ug/VJS1wKF/YHq/fjdIbWbJv5+0oHrpcoTLVfsKpboq/oGo3cMS6Osok7Dabolh2whY X-Received: by 2002:a62:cd4f:0:b0:6e0:4b47:8216 with SMTP id o76-20020a62cd4f000000b006e04b478216mr1339144pfg.16.1707280639327; Tue, 06 Feb 2024 20:37:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707280639; cv=pass; d=google.com; s=arc-20160816; b=twle0lwSbj3CeV4seRsK8MiRXwn2vkGzOpqekIGLOatqwtPT3ZKSNvLuDYk5D7AISE AjxOKxDT0CasdxP4VpiM8zFZd9h37QV41Ub7FzOkZIHrGzUKSYQA6x/pVRBbBzDQsb8y c3rIduPc+t20t2SaxW7RN3aOO8cO8Opr9U5a77+5AElf1cxGkS/osZQoZ+xdHPmC65C8 3ELn9FcklUdQwVE2+4yy+eZDWK4B2afFg6pIiLB4CjWtIikxBQsuAAsO86GSS6WAMKCH 0SrpNh9L3zgQK9CuOiSrLMCYC8zKUQEedbUgePhMgXMtIC0jNYPbM+756WPmAng9qLEc L8Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=Rh55OmiDW3osJyvFQP1JxdUiPu71ABgwdYFtA+V9n/4=; fh=seiOvzs7KvQiUqUkYpwme3XDD6FWfv85lcCBoOB1TtQ=; b=g6T8CvBoh0F7oMHmarL5vgI+P0sDUmA8gCIU5EPoGeDGYLSzMbH5C4mE4q5jUoAB07 MfuehpD8tSnlSsJ20JAqCI9CZzk5C95JOVm1lUDnuULMArvIgAmr661vYV6tVfaDWGiB bS7FXPVh8OoskNWIQUda8cvDuMDBR5OsnODC4QzgL8pIXQZY64SSjfe3Esx6xS/YDuKM fGc+N/yVPqunjpKaky8vILMf2Xo7BboMf0E+JNIMspUmFKNWRLLKAUt2Hb5w4tn5Wcvy jMLQQrzQjmoDNAjM3kU5isPN4rwi0NX7utmLa3yFk4peGMF0YSUdA/I4zpTjD9PGUiyU ZBYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-55934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCXYXl76XMJK+7b3mPLM6ebnp4bQRoRXSb6/IHsDW6DEUtOC7jy7JXOSuPE/2o/67FgHQUJ0f8H4KPn3+lMGhZj6LY1kRufIArrKE4aQtg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m185-20020a633fc2000000b005d8c245c500si585114pga.397.2024.02.06.20.37.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 20:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-55934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3799E2886B2 for ; Wed, 7 Feb 2024 04:34:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69746134A5; Wed, 7 Feb 2024 04:34:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2761712B71 for ; Wed, 7 Feb 2024 04:34:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707280479; cv=none; b=loTjMAb4hSifAhs+R3NBoGw2qA8ja6MkXqpfNliaBbXPBV40HfGdyRPxRAw1zhNdm/lNfltbRXU5LFG/l/GKnAk9D1uWlB6K3Kqv/6XnAIpAx0sWXXNKjmIOyQae7u9p0fNGeO8ihCMJjVuv9yuwSLuiOUC+yGA68oywit/Zxe0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707280479; c=relaxed/simple; bh=5SC92MxPuA44KXqdmryQh6nFTEySvoc2sDpD9I4xptM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TIvMDHjWgBkP03x7h+a3W/j51UwhbEFLRpxyDyuPEAC0y/+d6iEfVWSnUafRKrV4LCIXOrGr5UnR5IaUO+xnWMV+jmE064ZMh7nn6a0WG9keSbwvMAyB8tNOvbSp1CmJ3fWmCtDyjxZmtoH0fSdUP0CtruwRIWYQoYY0Kl/7WgI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=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 267511FB; Tue, 6 Feb 2024 20:35:18 -0800 (PST) Received: from [10.162.40.23] (a077893.blr.arm.com [10.162.40.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6BA453F5A1; Tue, 6 Feb 2024 20:34:34 -0800 (PST) Message-ID: <8d9f2950-6805-481f-a5e7-e5ea45128fb5@arm.com> Date: Wed, 7 Feb 2024 10:04:31 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm/cma: Add sysfs file 'release_pages_success' Content-Language: en-US To: Andrew Morton Cc: linux-mm@kvack.org, alexandru.elisei@arm.com, linux-kernel@vger.kernel.org References: <20240206045731.472759-1-anshuman.khandual@arm.com> <20240206093857.d834af4f96d643c53e29e02d@linux-foundation.org> From: Anshuman Khandual In-Reply-To: <20240206093857.d834af4f96d643c53e29e02d@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/6/24 23:08, Andrew Morton wrote: > On Tue, 6 Feb 2024 10:27:31 +0530 Anshuman Khandual wrote: > >> This adds the following new sysfs file tracking the number of successfully >> released pages from a given CMA heap area. Also like before - this will be >> available via CONFIG_CMA_SYSFS, and help in determining active CMA pages >> available on the system. > > "like before" is mysterious. Is this referring to some other patch? > To existing code? Please be explicit and complete. This was just referring to existing sysfs files i.e 'alloc_pages_success' and 'alloc_pages_fail'. > >> /sys/kernel/mm/cma//release_pages_success >> >> It adds an element 'nr_pages_released' (with CONFIG_CMA_SYSFS config) into >> 'struct cma' which gets updated during cma_release(). > > The changelog doesn't explain why Linux needs this feature. The value > to our users. Perhaps that info is buried in the link which is buried > below the ^---$, but as this is the most important part of a changelog, > it really should be spelled out here, completely and carefully please. Does this look better ? mm/cma: Add sysfs file 'release_pages_success' This adds the following new sysfs file tracking the number of successfully released pages from a given CMA heap area. This file will be available via CONFIG_CMA_SYSFS and help in determining active CMA pages available on the CMA heap area. This adds a new 'nr_pages_released' (CONFIG_CMA_SYSFS) into 'struct cma' which gets updated during cma_release(). /sys/kernel/mm/cma//release_pages_success After this change, an user will be able to find active CMA pages available in a given CMA heap area via the following method. Active pages = alloc_pages_success - release_pages_success That's valuable information for both software designers, and system admins as it allows them to tune the number of CMA pages available in the system. This increases user visibility for allocated CMA area and its utilization. > >> --- >> This patch applies on v6.8-rc3 >> >> Some earlier relevant discussions regarding arm64 MTE dynamic tag storage >> in this regard can be found here. >> >> https://lore.kernel.org/all/ZbpKyNVHfhf1-AAv@raptor/