From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 8347F1CAA65 for ; Wed, 1 Jul 2026 01:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782869013; cv=none; b=f0CLx7s9FW12JYNq+lod0d9iBFnsBJ+5bQ+gE/L/saI928ZoqL2+3JaDkEU1WoPW1KZ4WnZ0q8ZbCww9G2pFQ1Po3Tmw1Fi1MIA19dBFozMeoQ44IhNh5aueiGOZgXLLvXZErKXV6B5NevscO9FBSI34GKuU6NQ7xI25OvYe0ps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782869013; c=relaxed/simple; bh=BIfewT+/Ss9qfklObQRxeoSboXrNP/ZMldhPIfGq514=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tfXdkj2W8Hqua/NWncymE++wBTM077Hif1fN8JinLnXAj3dg9ry+9Txwt3HPHtBsY70RM2cOTKAj2Me2rIbE+PfSUCp/Wp5Jcw6VKtpXM0e+kyCvzQ7D+BRx+VAEyjoBs9BZTXq12Y6v3IQbNv0pnuPEejXN10iJntlK4hHxvvM= 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=mhkF7e+Z; arc=none smtp.client-ip=91.218.175.188 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="mhkF7e+Z" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782869010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7AeQBR8Jr8+xBr3Mb/Jq7ZoDTM1Fuhu9AGQLRB/s3dg=; b=mhkF7e+ZtRDtADqZTMQR9kA74bcsj694LYfnfXrM40E2YA3ig0gYRv+Vqg7qZWXrMXwfHd P6B94Lncxm2vCK3nYDaUEcQ5ylkahzYsqWdIZCSGcIRv84igoiPLysiX93rkKkBh3I0upo M0U5fZvtWzuZekFjq+eVuyQoTvM+8IE= From: Ye Liu To: Andrew Morton , Vlastimil Babka Cc: Ye Liu , Zi Yan , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 6/7] mm/page_owner: move free_ts_nsec output to free section in __dump_page_owner() Date: Wed, 1 Jul 2026 09:22:32 +0800 Message-ID: <20260701012239.315262-7-ye.liu@linux.dev> In-Reply-To: <20260701012239.315262-1-ye.liu@linux.dev> References: <20260701012239.315262-1-ye.liu@linux.dev> 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-Migadu-Flow: FLOW_OUT 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 Acked-by: Zi Yan Reviewed-by: Vlastimil Babka (SUSE) --- 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 7520718f63f1..84eb44459478 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -653,10 +653,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", 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) @@ -668,8 +668,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); } -- 2.43.0