Received: by 10.223.185.116 with SMTP id b49csp5968445wrg; Wed, 7 Mar 2018 22:53:26 -0800 (PST) X-Google-Smtp-Source: AG47ELvbq2kJniKZWbS3K2iQ7B/NcGHqPGY/k/HxmMt5DkcgMS0m4hc5G3Xm4ivvPz4pCcMJU3ny X-Received: by 10.99.97.7 with SMTP id v7mr20754100pgb.239.1520492006123; Wed, 07 Mar 2018 22:53:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520492006; cv=none; d=google.com; s=arc-20160816; b=cfMeE7wQxpqivi5Li29B8ZH4HZkZw5Cb3JX7zbybisnDOkqtlIyz+ziFwI0BG6iQQe CQh8YXU8Tqz5Kpz0ns/8PdynGbsZbLE2gNa6gJUNbQVlm/Ik0GidxOdmZRSbA/uivvVf Oxb4wrIR0hpXS/gQJDTDTCQlx9n8WT5kHilgiD2UobmVJ+odGh6fvjFPUFr/QWBGizes kSpZ9hOVFk7gc9OLXkMH5L7B3k1E56XZbXc8B1jWHOZukvX8HIkjBNQyio/87oAhOoYM Gs379GfsV/ysKPalimaE7TJpDRIUCz8Mojip6X8kf/EvkRtyBozbVYGQ450eC7qoka1F TpcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=NCsrpbBs5gttz6FxX5C/narg3jsqPTGV/8PfmKoZuvE=; b=TDRzMgFLV/X9+PTnC37hK9GxDKZS08ZKBAwqe/2dzJ+JuHnSnqZ43oUnIwna1RAFQx D2WkKW3bXcRWINlSuIxTudIzX/gcj1cen29uAZnIua43zKQXwn55YW49B7n5uLjfOIrv Ym/k1JTQROe3T5MAZ7OkTAhptFSfm7Dg+SCe5vYjy79reaghP6GgFem6/79uTu5kUyv9 tPw+7cfctrp4gj6iGzCE8/fImhbPxBVgPSyXHNHLoutWYAvVW8hLEs1jhw62y9pkCbEX WwdwGDYy3e7EWKGSYuw5R5hGlu3foNE5NTj7UpUL89VJf+oNa27aTnFmcasF2l1pXqz2 vksw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=C+eqQjeB; dkim=pass header.i=@codeaurora.org header.s=default header.b=C+eqQjeB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11-v6si3537423plg.689.2018.03.07.22.53.12; Wed, 07 Mar 2018 22:53:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=C+eqQjeB; dkim=pass header.i=@codeaurora.org header.s=default header.b=C+eqQjeB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965270AbeCHGwU (ORCPT + 99 others); Thu, 8 Mar 2018 01:52:20 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42232 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935227AbeCHGv0 (ORCPT ); Thu, 8 Mar 2018 01:51:26 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E884F607EB; Thu, 8 Mar 2018 06:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520491885; bh=slLn24W7xCP6JJIC03WGbCiWOMBfCkdr9GD2PDTeHUA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=C+eqQjeBV8R3aq2eQjxtp7lnDX/jXSiJ8WGw8bmk09u5Z7+sDUFPqVA42YUyWv+Xu bGNu0SFo7Vqxc6fVTABYnQxwHEVrtNJ+zO6ldKqj1pZjfNdyBam9FROLf1aA2JPoCF +FP1XzGAHkLQsA+fR/ekIfiAr0QjO3ex1ROn7CAY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 817F36024C; Thu, 8 Mar 2018 06:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520491885; bh=slLn24W7xCP6JJIC03WGbCiWOMBfCkdr9GD2PDTeHUA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=C+eqQjeBV8R3aq2eQjxtp7lnDX/jXSiJ8WGw8bmk09u5Z7+sDUFPqVA42YUyWv+Xu bGNu0SFo7Vqxc6fVTABYnQxwHEVrtNJ+zO6ldKqj1pZjfNdyBam9FROLf1aA2JPoCF +FP1XzGAHkLQsA+fR/ekIfiAr0QjO3ex1ROn7CAY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 817F36024C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH] slub: Fix misleading 'age' in verbose slub prints To: Matthew Wilcox , Christopher Lameter Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1520423266-28830-1-git-send-email-cpandya@codeaurora.org> <20180307182212.GA23411@bombadil.infradead.org> From: Chintan Pandya Message-ID: Date: Thu, 8 Mar 2018 12:21:19 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180307182212.GA23411@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/7/2018 11:52 PM, Matthew Wilcox wrote: > On Wed, Mar 07, 2018 at 12:13:56PM -0600, Christopher Lameter wrote: >> On Wed, 7 Mar 2018, Chintan Pandya wrote: >>> In this case, object got freed later but 'age' shows >>> otherwise. This could be because, while printing >>> this info, we print allocation traces first and >>> free traces thereafter. In between, if we get schedule >>> out, (jiffies - t->when) could become meaningless. >> >> Ok then get the jiffies earlier? >> >>> So, simply print when the object was allocated/freed. >> >> The tick value may not related to anything in the logs that is why the >> "age" is there. How do I know how long ago the allocation was if I look at >> the log and only see long and large number of ticks since bootup? > > I missed that the first read-through too. The trick is that there are two printks: > > [ 6044.170804] INFO: Allocated in binder_transaction+0x4b0/0x2448 age=731 cpu=3 pid=5314 > ... > [ 6044.216696] INFO: Freed in binder_free_transaction+0x2c/0x58 age=735 cpu=6 pid=2079 > > If you print the raw value, then you can do the subtraction yourself; > if you've subtracted it from jiffies each time, you've at least introduced > jitter, and possibly enough jitter to confuse and mislead. > This is exactly what I was thinking. But looking up 'age' is easy compared to 'when' and this seems required as from Christopher's reply. So, will raise new patch cleaning commit message a bit. Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project