From patchwork Fri Oct 13 19:03:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Audra Mitchell X-Patchwork-Id: 13421586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75DBCCDB47E for ; Fri, 13 Oct 2023 19:04:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA9148D016A; Fri, 13 Oct 2023 15:04:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5AC38D0015; Fri, 13 Oct 2023 15:04:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C485C8D016A; Fri, 13 Oct 2023 15:04:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B1BB68D0015 for ; Fri, 13 Oct 2023 15:04:26 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 65CCD120504 for ; Fri, 13 Oct 2023 19:04:26 +0000 (UTC) X-FDA: 81341364132.13.68A75DB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 59BAD180003 for ; Fri, 13 Oct 2023 19:04:14 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=P3CrLiBS; spf=pass (imf06.hostedemail.com: domain of audra@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=audra@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697223854; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=LSa8RIfB8HUiukXJoFl/RC9egsbX37Hy7RQHH6IxQsg=; b=arJigklSCL98E4BzZbl54E1nmmvxWxusHzdze2Xjt6SOdhz25wKDBEJi6rTwkNjmaHrrgm rAEnR9GERtyMI9FtTzK53o+QoxBdjOK2tKEDdnfJ27BoLZLcEws6RiQtZ9x1BM8rnpt+JO lp5OM7J5n87ki7qr4R58CY8HFdBUU1Q= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697223854; a=rsa-sha256; cv=none; b=mOWCa4L/ceRcQ5KMLmZOrO20nmivQnGUOoWY5JxmRTk07xbsQGqr1khfBpYaXDtF0SSXBL qFR0c8Ha6l15Liinw0UbkJvgZwUFp0DcT03JqPXcWFm5303dXS+1DCoaPxZLwACZqpg+5o idxYOxmi942BpVQXtlQzdXO3zXw8WsA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=P3CrLiBS; spf=pass (imf06.hostedemail.com: domain of audra@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=audra@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697223853; 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; bh=LSa8RIfB8HUiukXJoFl/RC9egsbX37Hy7RQHH6IxQsg=; b=P3CrLiBSZKNP5B32lBoKwDGC/wN0CdnZCJwg3lubKqE5jqStHJMe/knWV1gwbwdw8CsI0i NKr5fVAU0GBkeVRip3OnkHJ/fjKsutPD/3eRsh9C613qCrtXyHBfA3hGMOYcpL/oFi/rsS w5wGe+PQ3vzXZHG6fnLf+aAvozREaTk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-459-iJ50zH8INLqQ5QE5w3DiAA-1; Fri, 13 Oct 2023 15:04:06 -0400 X-MC-Unique: iJ50zH8INLqQ5QE5w3DiAA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3114801E62; Fri, 13 Oct 2023 19:04:05 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.33.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FA522157F5A; Fri, 13 Oct 2023 19:04:05 +0000 (UTC) From: Audra Mitchell To: linux-mm@kvack.org Cc: raquini@redhat.com, akpm@linux-foundation.org, djakov@kernel.org, vbabka@suse.cz, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] Fix page_owner's use of free timestamps Date: Fri, 13 Oct 2023 15:03:44 -0400 Message-ID: <20231013190350.579407-1-audra@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspamd-Queue-Id: 59BAD180003 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: b7gz1ptqrrkmr3j18jj9741mnxabha3b X-HE-Tag: 1697223854-624215 X-HE-Meta: U2FsdGVkX18e2h4wPuFdKDPv4dXtJcp/GVC+7OfzR5iszkY7uU9cvA/Ity9MXzfFZNq0ljgkzyNW+FfSgFWFAvhjgcqfm2+DELhaTjNqSfTD2b6QLS54z+J3r1kjWLi0mgylQE8mUExtIL9l4vqeY7I1aG+6kqRn7lC5bACrjIKCD+sUwNVd/fqDnQ4bbPzfZU3RO3aXaoL1lUKBCW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vack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: While page ower output is used to investigate memory utilization, typically the allocation pathway, the introduction of timestamps to the page owner records caused each record to become unique due to the granularity of the nanosecond timestamp (for example): Page allocated via order 0 ... ts 5206196026 ns, free_ts 5187156703 ns Page allocated via order 0 ... ts 5206198540 ns, free_ts 5187162702 ns Furthermore, the page_owner output only dumps the currently allocated records, so having the free timestamps is nonsensical for the typical use case. In addition, the introduction of timestamps was not properly handled in the page_owner_sort tool causing most use cases to be broken. This series is meant to remove the free timestamps from the page_owner output and fix the page_owner_sort tool so proper collation can occur. Audra Mitchell (5): mm/page_owner: Remove free_ts from page_owner output tools/mm: Remove references to free_ts from page_owner_sort tools/mm: Filter out timestamps for correct collation tools/mm: Fix the default case for page_owner_sort tools/mm: Update the usage output to be more organized mm/page_owner.c | 4 +- tools/mm/page_owner_sort.c | 212 +++++++++++++++++-------------------- 2 files changed, 100 insertions(+), 116 deletions(-) Acked-by: Rafael Aquini