Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1464467rdb; Tue, 30 Jan 2024 22:00:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFTH728Y41QyQORMOOEWvACC+ZqJsgUytfYf2j4wQIq5S0Sbxl8AMO2DKP+0FMRHePjazl X-Received: by 2002:a05:6402:33d3:b0:55d:3567:ab9f with SMTP id a19-20020a05640233d300b0055d3567ab9fmr3671813edc.6.1706680814634; Tue, 30 Jan 2024 22:00:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706680814; cv=pass; d=google.com; s=arc-20160816; b=HhESf0gsU7lZ4bK6rrJQhdg/nzMyWgxpEPRTtZ+5CXBicbRZofRDwV382rlMHIwoOw GjESyDeAi9lH5+QXmVUVL66YumuJiH6BGUwJhzSzya08H5MtCRmeXibLNj+1uXkpPlp+ BlQrnwIY6bF9h+i1wPmoyeMEnIVwxpRoc7zPLpeqIi7GuCoFsGVJxk70Xb1+RuUV9W3q 9ULwpvLAnvQJ4rZtaZr7K7k51N05iHGhYoOgOlwRPcx3Yg/m9+mNEZghLyjZNV4A7GG7 Pp2ACWbEihFuIDYSw1edj7+cnhYSre1mPyUBRSkYj1AwwXcLEPrfgc8X5KBzWOXTspUD EllQ== 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=uAS0A2Q/UWfDa2G3Bb4CijCiVlOpzDu1YJyqujeIA/M=; fh=+2X1YCxowILuVyrnraRlsm72yj+k3V18PDBWsCaBTMw=; b=cEOe/il3ZHeDzqCQB7jaFtwmy/CYWkOSbWqTw+u72RDg/6m2B4G1VRM3DOVQ+LKAr4 hMbOq9tviVMZJYmqJQQtjpdvlBYMu+XUBb2gDzSQb1NqsTfkZqZSNawElO03YChjkmuT qMa82jw+m28tSv41f1txA3D5vfWZiUh4v7X0x27GWG9yIxBI5qUf9I3m7TPuYIbi+2SS +jWt5Vpsko/uUVwRsU+wWw6Aj5I/YYwkVoolcCpvStZUSJYZpjXT5ZOUIm2HjlAT2b4z d45W2xttDOv3FlH4KUOXl02QQoNMF2Ez64SZl5A0afmFFy4FojdjeSkMvZqTxirY+ymt 7Olw==; 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-45800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCVLOqgvH6c6YzRsfIkjBC3a0+Obu+OOsCi4Q3NdNFSEX0F2BhqMMK4uqmfQ3/kfHh4ccqYNZLT2UYf5B9ay3OgFsTq8k+6/ufEVrXYlxw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ek10-20020a056402370a00b0055f4c713342si1110509edb.110.2024.01.30.22.00.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 22:00:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-45800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45800-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 617B81F28289 for ; Wed, 31 Jan 2024 06:00:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDE213E48C; Wed, 31 Jan 2024 06:00:02 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A7F93DBB7; Wed, 31 Jan 2024 06:00:00 +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=1706680802; cv=none; b=t76wzt0gx18c7s/o1Zv72GPuaw9ToCWlzQqDW4QsH/u59KnjY/h7X8iNIMGPiNiQIZKJ6jCnhwUA+0xN4dWQHfhHHdXDhIu215OOusUguMJ1xRw2olkZ3RjyFuG6ayA49FiRfcA0hm8+g2RUF8+omzKH/jBa54HIVwr7qs9ySuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706680802; c=relaxed/simple; bh=LfvQ3qAas7dc9Kho/inAFjp0k7QeB/Phd/4o/C6refo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tCoTf3pTKm0ARbVDwOAX7Pu0qN1yhGurjYc67U5p9jHVXUImKjzgWYGHmuEUgF/RnLFjlLsuOFV+XqCuFPC5RiU3KTLXNMOHvrm3mEGnjdiMSkfVar62AL3PxTRySqwT6Gje7Lhu0MFbf38Om0uCiKlSa+a9Dr2I9BKhulF81dY= 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 0EAFADA7; Tue, 30 Jan 2024 22:00:37 -0800 (PST) Received: from [10.163.41.195] (unknown [10.163.41.195]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B16933F738; Tue, 30 Jan 2024 21:59:41 -0800 (PST) Message-ID: <1fcf38b4-b0ff-40ec-8ac0-730c8bfd57ff@arm.com> Date: Wed, 31 Jan 2024 11:29:39 +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 RFC v3 07/35] mm: cma: Add CMA_RELEASE_{SUCCESS,FAIL} events Content-Language: en-US To: Alexandru Elisei Cc: catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, arnd@arndb.de, akpm@linux-foundation.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, mhiramat@kernel.org, rppt@kernel.org, hughd@google.com, pcc@google.com, steven.price@arm.com, vincenzo.frascino@arm.com, david@redhat.com, eugenis@google.com, kcc@google.com, hyesoo.yu@samsung.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org References: <20240125164256.4147-1-alexandru.elisei@arm.com> <20240125164256.4147-8-alexandru.elisei@arm.com> <545bb7bd-31c7-4166-9f81-778b82ece6d4@arm.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/29/24 17:23, Alexandru Elisei wrote: > Hi, > > On Mon, Jan 29, 2024 at 03:01:24PM +0530, Anshuman Khandual wrote: >> >> On 1/25/24 22:12, Alexandru Elisei wrote: >>> Similar to the two events that relate to CMA allocations, add the >>> CMA_RELEASE_SUCCESS and CMA_RELEASE_FAIL events that count when CMA pages >>> are freed. >> How is this is going to be beneficial towards analyzing CMA alloc/release >> behaviour - particularly with respect to this series. OR just adding this >> from parity perspective with CMA alloc side counters ? Regardless this >> CMA change too could be discussed separately. > Added for parity and because it's useful for this series (see my reply to > the previous patch where I discuss how I've used the counters). As mentioned earlier, a new CONFIG_CMA_SYSFS element 'cma->nr_freed_pages' could be instrumented in cma_release()'s success path for this purpose. But again the failure path is not of much value as it could only happen when there is an invalid input from the caller i.e when cma_pages_valid() check fails.