Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp287358lqr; Wed, 5 Jun 2024 06:15:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXLo3+m4cxJSJMkM379sMwCGf0QyylwBsaF6wAq/rwl9yGTrb7WRZjIobvxXJ6XpaS0nujfYl6WC5PUxCYVf3m0+HTIM5yieANLQTFog== X-Google-Smtp-Source: AGHT+IG1Dxoy5N9pk8QSa7HJ9d+deoO9ubakeRduBRSx2s8BCOpuIKOA6nNqfgpMRjs6+tQ4bIKS X-Received: by 2002:a05:6359:45a9:b0:19c:5645:235 with SMTP id e5c5f4694b2df-19c6690febfmr270641355d.0.1717593342900; Wed, 05 Jun 2024 06:15:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717593342; cv=pass; d=google.com; s=arc-20160816; b=zdxn96FrFvi4LiHwH1Otj37X6GSPPt7nZry3/PdMwlBNQbb8tRgui7nSChVOrU8P6g gC4jOkYNgKzRbnmlhf7VuYHwAgK9VwFLEm6TP0JlOkSX5kTZ1FZhjtcyvj8SY+54DN6k BxT/rANv0MHjivTjrcSqCKcqMKRACqJKmGAgw0BpIX/95dCLMBaEuHiyprmiQ8igMqPz qo5KS4gerH+ruDVxWwnptq+wpzN8EwcgSosSBjpRN3NHiRlSRWPwN5ItfnEdQHKL4TCp pol7OcZl+SXkYrGgTp38IokcN2Q8wggf8uO+odWlkEeC65LefuzV1U7iGoczwDl6mxNM dSEg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=MmUnh78ZTKHdDDoSHHc6liH2wj8Hy67v/H1SpsAxo9c=; fh=HpkEHbNt8YMERJR8vkj2rTKeNMylzgymtGZGvDMCPro=; b=F8/7mobwMYQmDJVjYks7gzN/t3gf1/S9Pp/X68aAEnzcezB5BFcXelHFfa3SurCQ89 Ahz5iIXPnWbTh8uKGQbVQ/gbLlhH6Jb6loCgmdAFp4yFjFo3RHbn57QjwqC4IySCOJMw xTOvR3XBMkWSR2cY1MYi7ARy215UNdyGVuCaPnkqGXvKnfQBJ5HeA5MR/vuRIbrw+D57 ElXD5aFQBt79s83n83ox8aKoHaHrPZ7HGhgKt4vohhBtkegYBWr0pQXWUDmOsan4WRQv xRIJu82CzQhIIm7VLTX0gx9gULXLnViiB/Ps8cjBBcC9Wwr4YVBjR+KOg9KAFfAdE/ql pIjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Ut5Si44E; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-202619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202619-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a733e06si53595316d6.88.2024.06.05.06.15.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:15:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=Ut5Si44E; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-202619-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202619-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1437B1C232C6 for ; Wed, 5 Jun 2024 13:15:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8468B194AF9; Wed, 5 Jun 2024 12:38:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="Ut5Si44E" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3145194AE5 for ; Wed, 5 Jun 2024 12:38:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.220 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717591137; cv=none; b=VQaKkWoqj9y9TSkbF4+lBPKwb7aZbCHENH+B7xzWYKDpPj/DSvZRBmXSaI08jEMu8h+7Ygm6tK7QHw3dP5qrnqgnwVz89G1OYcJX0hvFUBl8fL//jqcpJIQCeih6rStnBzr/L2Z/9Kg6Jb7vNaI25uFlyQtQ7Co4suWiUwXUqhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717591137; c=relaxed/simple; bh=vHjBhRRk1bqVDeUvgIQaTV89PPxX09YJ2R4djCJ48Zw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Ac2GMfcAdn5UYEK5F8rqxsYf7vac3ck5fj3Iv7DWzLKoCl9zymw/WRQZJ5WTIYrY01T9egGnTo4f2Bt3L8rKtJPC/SC9wntRt0TIpDV7v/LC3A3tTsCHNS6SwaFrfTNf+PCvJvUepS+0y9wj6p+4vNS3LO4FVCkvizX/vIZeGb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=Ut5Si44E; arc=none smtp.client-ip=45.254.50.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=MmUnh 78ZTKHdDDoSHHc6liH2wj8Hy67v/H1SpsAxo9c=; b=Ut5Si44EP7p0Xjdvvv9RB OivJkbuHZQuBGpDvSFbZxbPV54ogScUxTZ9FQq0RBsiNumZV6ShxrfPAne5ijei8 0x6a8SgCFwlhead5wEOrN38JDjc+D5bYVE/BrmL6/QgMGeqdNe3OZjIupM6n3lVn KENCcK4H/U8qTIC+2ciRQ8= Received: from localhost.localdomain (unknown [111.35.186.64]) by gzga-smtp-mta-g0-3 (Coremail) with SMTP id _____wDnN_b2W2BmBlI9Bg--.32380S4; Wed, 05 Jun 2024 20:37:14 +0800 (CST) From: David Wang <00107082@163.com> To: kent.overstreet@linux.dev, surenb@google.com, keescook@chromium.org Cc: linux-kernel@vger.kernel.org Subject: [BUG?] memory allocation profiling: the counters are not non-decreasing. Date: Wed, 5 Jun 2024 20:37:10 +0800 Message-Id: <20240605123710.7396-1-00107082@163.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_____wDnN_b2W2BmBlI9Bg--.32380S4 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUcBT5UUUUU X-CM-SenderInfo: qqqrilqqysqiywtou0bp/xtbB0hz0qmWXyLVwnwAAsw Hi, I was playing with this new feature of memory allocation profiling, when I plot the data, grouped by caller's source dir, I noticed that the counters are not non-decreasing. If I understand this feature correctly, all counters should be non-decreasing, right? Or is there some TTL for stale items? Following is a simpler script demonstrating my sayings $ for i in {1..100}; do sudo cat /proc/allocinfo | grep " mm\/" | awk '{s+=$2}END{print s}'; sleep 10; done 1194453 1196935 1198957 1199716 1200770 1190795 <--- decrease here 1192702 1193070 1193812 1195069 1196491 ... FYI David