From patchwork Mon Oct 17 16:02:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13009006 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 B88B0C433FE for ; Mon, 17 Oct 2022 16:02:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B76BE6B0078; Mon, 17 Oct 2022 12:02:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFFC66B007B; Mon, 17 Oct 2022 12:02:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 953FD6B007D; Mon, 17 Oct 2022 12:02:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7F4E16B0078 for ; Mon, 17 Oct 2022 12:02:41 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 291FF120DAF for ; Mon, 17 Oct 2022 16:02:41 +0000 (UTC) X-FDA: 80030909322.28.1E798A1 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by imf25.hostedemail.com (Postfix) with ESMTP id 65357A0035 for ; Mon, 17 Oct 2022 16:02:40 +0000 (UTC) Received: by mail-ed1-f42.google.com with SMTP id s30so16747178eds.1 for ; Mon, 17 Oct 2022 09:02:39 -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=DLer6Af9yKSB5ehlJqsvjiavXklY9gP8YgB5+o0/x2C9g/bsjaDsVai9moAt1vqXpR gmwM1KoesEPNSUP55KIbw3TmwNkAO8zKzomWb6tfPyWGKUobzY7e3nTOjwhoCx46FPci T8q4RRP3HnXnk4gAgnJdu7gpX/NPRbk544624yw1zuJVNv61ZMumR2OFiWQsLqhAtljB juk/mi7Jiy9pn87anP15eEoDF2FWJOZZyLayMzxOciaDv2tiFNl6b4uBkbFj5KJnqOmr vVpAriTMlwiQyT1AqQe5Lfx2bggjR+L+0OlXbujEaP3SXIT21QBYWmL9+YGPAyOqU+90 zzlA== 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=aojCNMEppzTW8vV1UfYQ9vZ/DmluZ/+TSXF365EmrRHjJjepkukQeKIlmFg5nLzrkK smM2TXeOqINv6Xz9rWC3bV0uId3OzwtkIUH8PO7kH0YR5WVs92lWLt0LnfM6RcfjGWCj 2IjOzAieL8GxG9shSDkfpYE7+zgeiyaatSH7bOXwslVecr0VwiANyUFjliSq2mC0uZyL 44JMWe1Bvbc5HGOK16I4wptuGskGXZbJ7/PMUU/cbN4WQB/krvvXiRObr3F8atmvu7H8 dmjC1XSZLokmZjDJ3stgt5yrjic7GwTxnA6t9D1X1FOg+bW4P+SPKrgMzA3aENg6WpFd bdWA== X-Gm-Message-State: ACrzQf3q9rEwBL+6OMJMLG++7QOfmMAF/zHR1xGzijs6S2pTDcrNqC6S J0aacEDS+ZQ8DSkaWU6YzD0= X-Google-Smtp-Source: AMsMyM7j6l6EW5hrjHaMWS0m06ylnM0/tLTszR1u9HVA9Id5jZFLJTLjoArgj3EMPX3y0vr6F9NWzg== X-Received: by 2002:aa7:dd45:0:b0:458:7474:1fbe with SMTP id o5-20020aa7dd45000000b0045874741fbemr10980661edw.334.1666022558782; Mon, 17 Oct 2022 09:02:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:02:38 -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 a purge_vmap_area_lazy trace event Date: Mon, 17 Oct 2022 18:02:26 +0200 Message-Id: <20221017160233.16582-3-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=1666022560; a=rsa-sha256; cv=none; b=Ea36k4AYQgof5op5XT1GcKMuTZIBl5K7JrbxGqWcI1WZL6UrDNI1+LLY1ftKyeDHh2yp14 CbhK8FGkioIT0/K+BvbLcofXuWfUVHxtrYZ8aGHXh3BHC9i7st9h4YU4RD1+h9PVnn5aWh zoPLtvPVl/bJuAF/TgoHf+nZ7HIOciU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DLer6Af9; spf=pass (imf25.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.42 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666022560; 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=eE4uvPVmoVMGX8JOJe1CxcsyFhfiAgujuxv2ZADuUSxxTgaJ+TdTtgcVULly1Oh2HGr60i Mq57sC7SR0ExEp1+9qA9s+hGegWYQ6Mom/ZSericjmjkeBTyvmjqi85c9iKRLI8gtRjvQE 9q3K/BHhSXNVxWigfsTQRr4SAz+gkaU= X-Rspam-User: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DLer6Af9; spf=pass (imf25.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.42 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: cy9hpd8zr3dsygzmg5e38z9ajeup1kej X-Rspamd-Queue-Id: 65357A0035 X-Rspamd-Server: rspam10 X-HE-Tag: 1666022560-507523 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 */