From patchwork Mon Oct 17 16:02:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13009007 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 495AFC43219 for ; Mon, 17 Oct 2022 16:02:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F9A76B007B; Mon, 17 Oct 2022 12:02:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5338C6B007D; Mon, 17 Oct 2022 12:02:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AE856B007E; Mon, 17 Oct 2022 12:02:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2D3836B007B for ; Mon, 17 Oct 2022 12:02:42 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0D16F1A0F02 for ; Mon, 17 Oct 2022 16:02:42 +0000 (UTC) X-FDA: 80030909364.14.8443418 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by imf14.hostedemail.com (Postfix) with ESMTP id 78B96100022 for ; Mon, 17 Oct 2022 16:02:41 +0000 (UTC) Received: by mail-ej1-f47.google.com with SMTP id sc25so25943928ejc.12 for ; Mon, 17 Oct 2022 09:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P/1RiMr1eJ0x+wK6LRLfk+CIs20GXMv9Cr5BUn6E+1A=; b=qxhJaPRp0C1CnLCFp02667sEh3nTRwKHTgeeTplt+G+mCrIlcs4hRfjfzFmtSMKS5B Ru4N2JJro5y1V+RBQElu0oUEWVc/iuDrkjsfJALvC3mui2/wFwWSeLu7KvUBCfH/QVbg e+8R4DsIoDD8jTjBvGL5JrrxB3mBMXM44W9pyDU+0ZKXgZs+Nqf/IlXKv5FNtW10hkJU LfLfrVSmU/MYA7xHhsFVYKKxpYoZ1y/v3S42Cpf0ciYRKHx9ghv8mTY1vcrxcBtXwOAx FqKtwhN3Jb5kDDN/U2PNa8GEdiND3I3a3Z/2TiJGEaIYyTMIhX8Su0Jvy6wC2TQ8XPdd SFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P/1RiMr1eJ0x+wK6LRLfk+CIs20GXMv9Cr5BUn6E+1A=; b=YbQ0Z5NRPxwUawBQ703d9h5TUQ0A5E2/MH3+u/8q9Nzb0WH4fe4c4qubO32Yvcc4t3 63/3q6epAMRiGcX7uBplAVxJe5HpgkOkDQu+jntZDJvyiYXtRFnNgQcuVizHj2pZVRpb +oGO7IOboOSHtnpBAeFJKP/setQK4ZHd2bHNvyvxaxxfjrAasf8+v+ND+1bl7oHjxoiC McKcls6CG/Zm7mRePuOCfECgqDpOu32PHvXLsQHHj1goHdrya3iaXKo3uXPNQlOAltSU CEVp7vij6ofopXOE19+Ubrph3tgvpy2O8gvt+5u4MSPlVvpPjBzgBxxS0NKM3jcroYGU 4oPg== X-Gm-Message-State: ACrzQf1smCeFdd90hUSPCcOHH4h25oyahvt6waeZJ4IAmU2PDEO2vtUI /F83U5C36olDgissXR6weAU= X-Google-Smtp-Source: AMsMyM5oF/D+J68qyYf7OpinzoVRIca5njlKZiVt120+6mGZCZeIlXSoEubnaQQ/aKTMqvFacsOwCw== X-Received: by 2002:a17:906:ef8f:b0:78e:28e7:6c64 with SMTP id ze15-20020a170906ef8f00b0078e28e76c64mr9497023ejb.165.1666022560203; Mon, 17 Oct 2022 09:02:40 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id g16-20020a170906539000b0073d5948855asm6389629ejo.1.2022.10.17.09.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:02:39 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH 2/7] mm: vmap: Add purge_vmap_area_lazy trace event Date: Mon, 17 Oct 2022 18:02:27 +0200 Message-Id: <20221017160233.16582-4-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221017160233.16582-1-urezki@gmail.com> References: <20221017160233.16582-1-urezki@gmail.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666022561; a=rsa-sha256; cv=none; b=oH9Wfa9JHRAscFRr7QCx2BWskGPthcu6K91u2QJt2ZigpybfiivS9RRrFlN/WryDftraEE Z2w1NMe7v9yoBNDswfyaU0SVB+IZffffsExA21R8g9dwZLMOlHquVFUCzroregbr+Cn82L TLyE96GG7Xxd2bFLaCUIFAr5U8JFac4= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qxhJaPRp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=urezki@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666022561; 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:in-reply-to:references:references:dkim-signature; bh=P/1RiMr1eJ0x+wK6LRLfk+CIs20GXMv9Cr5BUn6E+1A=; b=jNmXPsCcxOoa0mq/IUFJEhxatHP90UylU3f5I/dFVk5+Xlb1JJuiB3iIo/rX6JAe77BnKv P8wHtQ1W/3b7GcKFha4dLNZfzq2rCk1yzWu9mgR5k19ZrYKt1OU9WsPdOQ13JFPR3UIkmO ixMSka0uQNvdYSFjbOlrJyPoKWGwFc4= X-Stat-Signature: tn977wfp6t137dihddni9seijqxzd648 X-Rspamd-Queue-Id: 78B96100022 X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qxhJaPRp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=urezki@gmail.com X-Rspamd-Server: rspam11 X-HE-Tag: 1666022561-134670 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: It is for debug purpose to track number of freed vmaps including a range it occurs on. To: Steven Rostedt Signed-off-by: Uladzislau Rezki (Sony) --- include/trace/events/vmap.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/trace/events/vmap.h b/include/trace/events/vmap.h index 504870d95a4e..2af2b84c6eb7 100644 --- a/include/trace/events/vmap.h +++ b/include/trace/events/vmap.h @@ -50,6 +50,39 @@ TRACE_EVENT(alloc_vmap_area, __entry->vstart, __entry->vend, __entry->failed) ); +/** + * purge_vmap_area_lazy - called when vmap areas were lazily freed + * @start: purging start address + * @end: purging end address + * @npurged: numbed of purged vmap areas + * + * This event is used for a debug purpose. It gives some + * indication about start:end range and how many objects + * are released. + */ +TRACE_EVENT(purge_vmap_area_lazy, + + TP_PROTO(unsigned long start, unsigned long end, + unsigned int npurged), + + TP_ARGS(start, end, npurged), + + TP_STRUCT__entry( + __field(unsigned long, start) + __field(unsigned long, end) + __field(unsigned int, npurged) + ), + + TP_fast_assign( + __entry->start = start; + __entry->end = end; + __entry->npurged = npurged; + ), + + TP_printk("start=0x%lx end=0x%lx num_purged=%u", + __entry->start, __entry->end, __entry->npurged) +); + #endif /* _TRACE_VMAP_H */ /* This part must be outside protection */