From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 A3C1D35E1BC for ; Mon, 29 Jun 2026 02:36:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782700587; cv=none; b=lHBy72DoyLh35r1Bs/sttfGE0kboO5pZ+M7wGLk+RJL90rwqTuMdei9uzkfxTRtmyz/id6BR8w4yGricaQoxRoZuEuNCEKRWHI/V8GHE26R3A6X7Gt3iaDIZEYXnH1G/ddKu6Lr8u7/9JZMi11+Yv4/JcHnvknR817FcC3IUM/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782700587; c=relaxed/simple; bh=Avw2wbn1b6HTOLYI9c2E1q3KItEgFgGE2Yt43ypSesI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bY2Z5zs2XSlcoQnmg7DPC5FdUHI0l3Tu1FoxfZJZZuQDSMM3FXhvU0ivJrsCvdmuvb7lgMXAz+hUtWlHCbb0cgex9NxjFAnGKFAIoOhHyXjGJ4CpJJJqgEvrb1bzv2oB/7t/jxO9eJJhqJuJbnj3spmfXgmPKCZlGBPQurq7CJs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=M+ojBwlC; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M+ojBwlC" Message-ID: <4dce3872-1d3f-41de-adcf-5b0c4b431a6d@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782700583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7cyDeEsZT9wRFLlwPp15UPH88M4bxDf8kOfDgpQPwUc=; b=M+ojBwlCQDdmszCTRnxWPExvxXyng6MVhj30klQQw6f3O7DkmGj+V/0tfoVtiDMbSDKklA 9H45tLrdz51sKSumjhhjwT3yjv3TJMAp0oVJel05NgM2oE6Ct9RMU8ZURJiGOaS+GsIuLw YAY9doefgC6L5KftbOhm6tnj99uvgvg= Date: Mon, 29 Jun 2026 10:36:14 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 5/6] mm/page_owner: move free_ts_nsec output to free section in __dump_page_owner() To: Zi Yan , Andrew Morton , Vlastimil Babka Cc: Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20260626024550.25677-1-ye.liu@linux.dev> <20260626024550.25677-6-ye.liu@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ye Liu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2026/6/27 02:55, Zi Yan 写道: > On Thu Jun 25, 2026 at 10:45 PM EDT, Ye Liu wrote: >> The free_ts_nsec field is a free-event timestamp, but it was printed >> in the allocation summary line alongside ts_nsec (allocation time). >> Move it to the free section where it logically belongs, together with >> free_pid and free_tgid. This also makes __dump_page_owner() consistent >> with print_page_owner(), which only prints ts_nsec in the allocation >> summary. >> >> The output now groups all free-related information (pid, tgid, >> timestamp, stack trace) in one place. >> >> No functional change except output formatting. >> >> Signed-off-by: Ye Liu >> --- >> mm/page_owner.c | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/mm/page_owner.c b/mm/page_owner.c >> index 958151ccb587..eaccff355cb4 100644 >> --- a/mm/page_owner.c >> +++ b/mm/page_owner.c >> @@ -660,10 +660,10 @@ void __dump_page_owner(const struct page *page) >> else >> pr_alert("page_owner tracks the page as freed\n"); >> >> - pr_alert("page last allocated via order %u, migratetype %s, gfp_mask %#x(%pGg), pid %d, tgid %d (%s), ts %llu, free_ts %llu\n", >> + pr_alert("page last allocated via order %u, migratetype %s, gfp_mask %#x(%pGg), pid %d, tgid %d (%s), ts %llu\n", > > Is it going to break existing programs parsing this information? This is > under debugfs, so probably does not matter? This is debugfs output, not a stable ABI — debugfs format can change at any time. The field just moves position within the same function's output. Grouping all free-related info together makes __dump_page_owner() consistent with print_page_owner(), which already only prints ts_nsec in its allocation line. I'm not aware of any tools that parse this field, but if there are, I'm happy to update them as well. > >> page_owner->order, migratetype_names[mt], gfp_mask, &gfp_mask, >> page_owner->pid, page_owner->tgid, page_owner->comm, >> - page_owner->ts_nsec, page_owner->free_ts_nsec); >> + page_owner->ts_nsec); >> >> handle = READ_ONCE(page_owner->handle); >> if (!handle) >> @@ -675,8 +675,9 @@ void __dump_page_owner(const struct page *page) >> if (!handle) { >> pr_alert("page_owner free stack trace missing\n"); >> } else { >> - pr_alert("page last free pid %d tgid %d stack trace:\n", >> - page_owner->free_pid, page_owner->free_tgid); >> + pr_alert("page last free pid %d tgid %d ts %llu stack trace:\n", >> + page_owner->free_pid, page_owner->free_tgid, >> + page_owner->free_ts_nsec); >> stack_depot_print(handle); >> } >> > > > > -- Thanks, Ye Liu