From patchwork Mon Oct 17 16:02:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13009009 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 D8417C43217 for ; Mon, 17 Oct 2022 16:02:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B9C08E0002; Mon, 17 Oct 2022 12:02:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81B4B8E0001; Mon, 17 Oct 2022 12:02:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A9508E0002; Mon, 17 Oct 2022 12:02:44 -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 4BB458E0001 for ; Mon, 17 Oct 2022 12:02:44 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 28CB9140FB2 for ; Mon, 17 Oct 2022 16:02:44 +0000 (UTC) X-FDA: 80030909448.28.36AA2AC Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf12.hostedemail.com (Postfix) with ESMTP id 7D7134004C for ; Mon, 17 Oct 2022 16:02:43 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id m16so16749166edc.4 for ; Mon, 17 Oct 2022 09:02:43 -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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=PuSyLUliSWcCdVU4u7qHBbywoFiv8OcPvJLS/1g7R6MQWRqgwi9ab6h3UNMAdzJ3r2 LE2uVd4tU/Ubdl3myCXCO7PeGNs0vZnHReXivgvRK4Bze4KVRzOvfA4IOQeK3rrfgt5D BhZZPORrFgoF7oDSHAYM4kvWeAMUBuIE+njxY7T2eKBV5QjqdSWPU6xjQMAcWilw4HNE XUcV9qbf13+VHz9QpAEi8xk9Rd7hA1twg3bjLCnisbFN1Gk9+o5TNA3+jq20D4ikP/W0 5loQEp4hEFdhDBNpIjn7WEtAFSZD2gDZlrfK4iHK+ND1y29bST762akZlqLlK6Zjd8v2 gFZA== 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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=YB5xJPgM9X0HVfXVs/eOKM2MxiiskN8VQD916KArDj4EybYYiugXl7jAUpYQpjS7Mm TwWHYD8VQaE0F6KEuT/QEy94i0E3d5JWf6Nyfjml1rENrxNzksnunnrxaUr9TZeTAoQL tU1znyUTAdz+wfcg35UR2iJ7Vl+8s+SvDp6FNt5GMDpitwtTWFHy+rkLQwCW6LM24Su8 /XTgzOZ8X4o4r1ydgOGSG2IuYb4jL28eZgD9lVrXBQdFrcVE031r3cQMF9i/KnSUB8pL eRX63T3ebFQWncm8dlPcWIKW9lvutPFjV9W7fWF4476bOL5lTs/+JpnfabegzBhroj5c 1u4A== X-Gm-Message-State: ACrzQf1zMED6ZlmqCA1gdx6XseonKC2DxKpZibjbBuCNGW6r9sOJrwit /uf8vj0fVNsr6UQYWWJWEGA= X-Google-Smtp-Source: AMsMyM5J6EvtgyhKOpb9oGBdRpl3SDQY9wi4qJB+ZFoj5u0QAiVRfFyH462ZJNpLtpsrBwVY0Rj1CQ== X-Received: by 2002:a05:6402:35d6:b0:45d:a52f:2d30 with SMTP id z22-20020a05640235d600b0045da52f2d30mr3601725edc.4.1666022562308; Mon, 17 Oct 2022 09:02:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:02:41 -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 3/7] mm: vmap: Add free_vmap_area_noflush trace event Date: Mon, 17 Oct 2022 18:02:29 +0200 Message-Id: <20221017160233.16582-6-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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666022563; 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=V8PGF12HowaED9GsfrGSUOr+T+BR5MJRz00gwWuwNBY=; b=qaG6tUm/hf7q20zh7etpd2+kAiom1lx0iKsvyTP1H070pvPfbZ8tsGZ/gg0hwWTiqq3ksZ 87nGkH2rnnCAaI9UZ9cp6Uc0T8J2tPgEqLI8FH4y7Y9sBJj5iIdHJHE1v+MadX6zV2srvy tWrrFkw5EqrLaLjpMjBHlpLfpJwjdLk= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PuSyLUli; spf=pass (imf12.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666022563; a=rsa-sha256; cv=none; b=gAAtJYljb9VIEK8MFfGQ2aIqJFCobWXID2VwGpCWx7mGK5hPyaPHX+NtF2hNRN9dWaAfJ8 p8BWyBYdgEnY7m+0+V6AbxN2AX3XiOlVANBkoWWSNCqFViNGiC/kS4Dj/eg15EXeX+fo1h jiE30V2g2XywSbYYIpFIHq5lPKfkzyA= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7D7134004C X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PuSyLUli; spf=pass (imf12.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: 5jcnyk1a4c5m7gdgexqqtck1ipjfa1xj X-HE-Tag: 1666022563-999551 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: This event is used in order to validate/debug a start address of freed VA, number of currently outstanding and maximum allowed areas. To: Steven Rostedt Signed-off-by: Uladzislau Rezki (Sony) --- include/trace/events/vmap.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/trace/events/vmap.h b/include/trace/events/vmap.h index 2af2b84c6eb7..5ba9bf58772a 100644 --- a/include/trace/events/vmap.h +++ b/include/trace/events/vmap.h @@ -83,6 +83,40 @@ TRACE_EVENT(purge_vmap_area_lazy, __entry->start, __entry->end, __entry->npurged) ); +/** + * free_vmap_area_noflush - called when a vmap area is freed + * @va_start: a start address of VA + * @nr_lazy: number of current lazy pages + * @nr_lazy_max: number of maximum lazy pages + * + * This event is used for a debug purpose. It gives some + * indication about a VA that is released, number of current + * outstanding areas and a maximum allowed threshold before + * dropping all of them. + */ +TRACE_EVENT(free_vmap_area_noflush, + + TP_PROTO(unsigned long va_start, unsigned long nr_lazy, + unsigned long nr_lazy_max), + + TP_ARGS(va_start, nr_lazy, nr_lazy_max), + + TP_STRUCT__entry( + __field(unsigned long, va_start) + __field(unsigned long, nr_lazy) + __field(unsigned long, nr_lazy_max) + ), + + TP_fast_assign( + __entry->va_start = va_start; + __entry->nr_lazy = nr_lazy; + __entry->nr_lazy_max = nr_lazy_max; + ), + + TP_printk("va_start=0x%lx nr_lazy=%lu nr_lazy_max=%lu", + __entry->va_start, __entry->nr_lazy, __entry->nr_lazy_max) +); + #endif /* _TRACE_VMAP_H */ /* This part must be outside protection */