From patchwork Tue Oct 18 18:10:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010874 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 1F54FC4332F for ; Tue, 18 Oct 2022 18:11:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AAA056B0075; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A33306B0078; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FB066B007B; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 790CB6B0075 for ; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3CFF9160806 for ; Tue, 18 Oct 2022 18:10:59 +0000 (UTC) X-FDA: 80034861438.19.CE07492 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf13.hostedemail.com (Postfix) with ESMTP id DB20720043 for ; Tue, 18 Oct 2022 18:10:58 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id q19so21712120edd.10 for ; Tue, 18 Oct 2022 11:10:58 -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=se3AV6vebDZ5YP2shntPND551GMkzS6L+QPXNqXiQ7o=; b=EiH1XPctTsH40jJoCVZZQ2IWCv/qUknaMjZUF6TgNR1NyiiSgP1FKDRwgS3YgvgusO KAuH+P3qhGPDvn9cHgJYQ3UTGZGWiJlnO/BPHA/hsY8Ri9HPyj/YX5Tr7/BV7dnuoHlQ AtOfDu0kXX/3QfwsV1hlmwVz9X+MeAL0TpbJIQ2awoBkxBa+iQkwbt4U+XoHEetoQ3J5 SnhRrjXJuyZiyawCxpUsB/X1SVmr2DP4dlXgGt39dKrXXpQnovJNwgHhtrEYxPAF9Yp5 zigl8L0Dn6HAeQDpPGtOBDWQmEvL6nC2ySfy50CgtLQmONHTErp3JDAE9H2hq5yQ3prC 3mvg== 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=se3AV6vebDZ5YP2shntPND551GMkzS6L+QPXNqXiQ7o=; b=WuHMfRIO6Zkf9fdukidnrt6j4AwFmWDTgeT49N9vLWzusMxyMIOTaAnYmXoWZcZjW/ W1JMO8NwZ18Ez+3uEtha3EuhpD0zkVUBA9x+xliIK++RQE6dtF4axrS2+Mt2lf9rokjm Yki9VgzgjEJ3BIaFU4XLlYVSRuLKcEXEiBbRLzA9FQuM6IUF4jhgkRW17277BJWD9Ci/ j5IcXdhCeezjqCskqVdcWxbF6nA7zgwk/Iwqzij0/bisZHDgjIZJqoEbXsTaiH4LPSS9 KwWAAN+pWsD1ptYpjmSHIntCbJKFNDoAZYySESRbQuOrJAU3THPYyP9671pMMMNYiIDh vJiQ== X-Gm-Message-State: ACrzQf3AAGDQZKsYrDbV+BB6qyI09GRkY5QLGJafIjPc9GJVq/5Unw4d J4gUlzkCp2qs98eHIeD7vt0= X-Google-Smtp-Source: AMsMyM555IpSQr3xQVjxZqzGIi4S+lkctx+n6jalt6F4k/WIUgkQUw6UHLeQ3jOaPacFX26PYZk0HA== X-Received: by 2002:a05:6402:5193:b0:45c:e2c6:6f0e with SMTP id q19-20020a056402519300b0045ce2c66f0emr3820266edd.29.1666116657449; Tue, 18 Oct 2022 11:10:57 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:10:56 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 1/7] mm: vmalloc: Add alloc_vmap_area trace event Date: Tue, 18 Oct 2022 20:10:47 +0200 Message-Id: <20221018181053.434508-2-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-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=1666116658; 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=se3AV6vebDZ5YP2shntPND551GMkzS6L+QPXNqXiQ7o=; b=gbP/M/3zlubH+ZkNdfW0ywqQ0Vvg1XMneiflAGTopfSEVY6K+XjDwpaSRc2eeqNmuVN2Ls 3gMJ/E/c5hTGQHcz/90oHQIkdq4qTJV3seOraqSaJgdlCWi0N7NtsNI0HUalik+RV/Y8Ta 1vZrMarKqu4jWKGgRompCarWVeKn4kU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=EiH1XPct; spf=pass (imf13.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=1666116659; a=rsa-sha256; cv=none; b=yaitxMYDWnis8AbbJCrSsEWZUaPORlzL0nYkfKVLCraJrWQHYOeOgXLfacHaWutsFWJSay D39W1Ndle478AohXyotoxcB++u1vj1crR9zLaQzGYO0KdlWZIjado/us4Dyp101kLiFxpB jazRcK6sC5FfVur+yj4E8R4iP5tHRDg= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: DB20720043 X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=EiH1XPct; spf=pass (imf13.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: ogy1jd6n7j15snx73bmho8sarnxt6yps X-HE-Tag: 1666116658-170616 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 a debug purpose and for validation of passed parameters. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- include/trace/events/vmalloc.h | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/trace/events/vmalloc.h diff --git a/include/trace/events/vmalloc.h b/include/trace/events/vmalloc.h new file mode 100644 index 000000000000..39fbd77c91e7 --- /dev/null +++ b/include/trace/events/vmalloc.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM vmalloc + +#if !defined(_TRACE_VMALLOC_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_VMALLOC_H + +#include + +/** + * alloc_vmap_area - called when a new vmap allocation occurs + * @addr: an allocated address + * @size: a requested size + * @align: a requested alignment + * @vstart: a requested start range + * @vend: a requested end range + * @failed: an allocation failed or not + * + * This event is used for a debug purpose, it can give an extra + * information for a developer about how often it occurs and which + * parameters are passed for further validation. + */ +TRACE_EVENT(alloc_vmap_area, + + TP_PROTO(unsigned long addr, unsigned long size, unsigned long align, + unsigned long vstart, unsigned long vend, int failed), + + TP_ARGS(addr, size, align, vstart, vend, failed), + + TP_STRUCT__entry( + __field(unsigned long, addr) + __field(unsigned long, size) + __field(unsigned long, align) + __field(unsigned long, vstart) + __field(unsigned long, vend) + __field(int, failed) + ), + + TP_fast_assign( + __entry->addr = addr; + __entry->size = size; + __entry->align = align; + __entry->vstart = vstart; + __entry->vend = vend; + __entry->failed = failed; + ), + + TP_printk("va_start: %lu size=%lu align=%lu vstart=0x%lx vend=0x%lx failed=%d", + __entry->addr, __entry->size, __entry->align, + __entry->vstart, __entry->vend, __entry->failed) +); + +#endif /* _TRACE_VMALLOC_H */ + +/* This part must be outside protection */ +#include From patchwork Tue Oct 18 18:10:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010875 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 3C3B3C43219 for ; Tue, 18 Oct 2022 18:11:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F192A6B0078; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC77B6B007B; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8FE56B007D; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C6DC76B007B for ; Tue, 18 Oct 2022 14:10:59 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 850D9AB7F6 for ; Tue, 18 Oct 2022 18:10:59 +0000 (UTC) X-FDA: 80034861438.12.2CAB76B Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by imf19.hostedemail.com (Postfix) with ESMTP id 273051A002F for ; Tue, 18 Oct 2022 18:10:58 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id y14so34240107ejd.9 for ; Tue, 18 Oct 2022 11:10:58 -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=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=YKVioc1cJrhW8j2q33izuLomY4JfzAqH6+8bDDXIqMvE4+VgTl1+DWt9X0JvJa96dS bjWwF2UlwQLI14UU085xpm9npwWQbW4iK3Sw30+tefJYDNaUP06vzKyETch6tOA7s2Yd F/KUA26JImniA6eEzt0bjQJpH9fNxjeIpw0qyvleGFF+p+lWtXc6UbwyirQn8qCbwUMe kirJf4P99BF4BV0Sr1O9g+L44sDFNkW71NnO7pDKFvrceM7QzalCKzDHyiuiz6U9WYML HoagkIuOoJwwxsMTZouT8vD0rRQNwMlVMjzNwyx2Wv3v6p+RV9btb5h605iO1R6WG655 p70A== 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=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=yvo6K6HuX8x3fuecKSmFCOBe1wlaoucXf3Ql72bFDxy9jSPGF0+U4T7cpc+yjWxr3/ 61D4AkSe6NZqjM/rh0O0cLvuS4mL/CG+61PYuT5jPzGI0hzNpJBKSOxDtmQHO5tOZLH2 ov04Pzt0v8I5M+pnXO/rBThAcxTFpEifSf6eBK42RyRndVy3np+3kRw0llvz9ifm5pFS 3YEZksZZj/LI/RsIpUdJxUwL1dYrv0ajagnyFZSnJWY4qXENnjUFaeDyCqd4So8PEMZ9 ZhWZQPTkPTIcLUJ+HmP8gap3I2r/4Hvm7TaWecs7CTArD+iZyXLQIZGgtb85U9pMya6D GRXA== X-Gm-Message-State: ACrzQf27ghTF77O2TwJ3rp30o46w46xLn8nQVgYchonFNTcP/lEgvdMt heiQBj2CQzabhGHWa0T47wY= X-Google-Smtp-Source: AMsMyM507Q8XFIA9G1zyTC/2DkCVGHsJGqQ6bAsF53Q9yeXxoWcJRJz+Sb3DI7QS6UGEGgXc4qL7vw== X-Received: by 2002:a17:907:97c2:b0:78d:accc:c0a9 with SMTP id js2-20020a17090797c200b0078dacccc0a9mr3400841ejc.312.1666116658572; Tue, 18 Oct 2022 11:10:58 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:10:58 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 2/7] mm: vmalloc: Add purge_vmap_area_lazy trace event Date: Tue, 18 Oct 2022 20:10:48 +0200 Message-Id: <20221018181053.434508-3-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-1-urezki@gmail.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666116659; a=rsa-sha256; cv=none; b=Rr6H6WOlVYIS0tTqkkDN0tUI6h85/2c/BOE6l3piDF9WnegJ5l49rGmaNybI/JLAunDHeH 1TACp+N0WWu70UfZ3+NPvxwTWaB+culcnLlMTv3MpMEde21mPifU+gKcXdT3sitILLZLpO qQfIolk6f/9QNBIZLdF4r4a7ovH6jds= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.50 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=1666116659; 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=9FJEHOoMkjVGRlOZfU33xcjvk8gVc0gJkKWOVMhT1hk=; b=Ld5bht3CLltQNaMDrrqoxWPHMzmVhTEGMXVheBnFopiUMaeaIjFKYPwLwg6xpxQSo1Mza9 3tiJeAIgJ2GH0t0vlOvceTfGCG8puTFM3eWNGuGUt+w9J+GwH4wlMKnvZH8kIGR3SR+25L tg7Co0NFFp2EQ4MWyH/AKeMlpJBAe/k= X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YKVioc1c; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.50 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: x9fd6p5z9nchjhk5iw854y3nhngnto7x X-Rspamd-Queue-Id: 273051A002F X-Rspamd-Server: rspam10 X-HE-Tag: 1666116658-882229 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 vmap areas including a range it occurs on. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- include/trace/events/vmalloc.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/trace/events/vmalloc.h b/include/trace/events/vmalloc.h index 39fbd77c91e7..afeb8003a0f2 100644 --- a/include/trace/events/vmalloc.h +++ b/include/trace/events/vmalloc.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_VMALLOC_H */ /* This part must be outside protection */ From patchwork Tue Oct 18 18:10:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010876 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 EC069C43217 for ; Tue, 18 Oct 2022 18:11:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 85FE06B007B; Tue, 18 Oct 2022 14:11:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C5056B007D; Tue, 18 Oct 2022 14:11:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B1986B007E; Tue, 18 Oct 2022 14:11:02 -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 5D7F06B007B for ; Tue, 18 Oct 2022 14:11:02 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 36A0041147 for ; Tue, 18 Oct 2022 18:11:02 +0000 (UTC) X-FDA: 80034861564.16.8DA1D37 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by imf04.hostedemail.com (Postfix) with ESMTP id D2E024002D for ; Tue, 18 Oct 2022 18:11:01 +0000 (UTC) Received: by mail-ej1-f49.google.com with SMTP id 13so34206937ejn.3 for ; Tue, 18 Oct 2022 11:11:01 -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=EAJWBA/OARebIHwOWWIUrI8OsApEiB0+kqbjGVUJums=; b=HvkyVCyohI92aQ42AIyvAmRtEfrXjp3pdtcMqXO4f1kiXF3JRKo6/+ClnJLEJc1Q2j K7WRrHtKlCnYcQgAQY1/2RMQ4v13NmnVELOdn28A4n6N7QTDJP/7yOG85liAJgGQdGg/ O+Ve4jEHCwMyPOWikF0Sw9vsqnh3Ulsi7gfS5owk+S6P902sb28WHA+7IP60laDr6cOn j9JdxHesbeQt4mS+XVtD0VCZEiuDGk64otVXpr3u1cYUDewim+CyLnSDJdAUZ73WQIKg x5bjSJchsWWNoqqH2RFIatAQkN5dBhRtuHJOkSPQKQeyOfdMqZPeHVcpCYju4pGP+Hy+ niow== 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=EAJWBA/OARebIHwOWWIUrI8OsApEiB0+kqbjGVUJums=; b=YNRFIQAylaQ4OXxBPZx4qmDo+MuCdMMGg186Js7voo0gYhShDaFc6AkJbGh0tt3uJX A6AA3FqYoDp2pzSfc+LhLEB0pGMJbHVBXFYWnS+naU8rlY55+2+ruScYd4zd4hY68iud zKsinBp2N5aZ8KfjmkVBvHkPXEMosfaT0qmQX3TRPzuPO3P9IuSa2t0BCi+0doGjc7g5 vrE+FnBwseEIcgJQquFMZock4yHqrNll5qsMVsTZ+WUe/rWpyy9Yl0GDrGzZqCn/CRlt DBPEykjkMYF5j7z7c8cbFcjc8HcvU5GkExEg9PHzZpqP/sNFlg3XfvCC1S7BHuLR7xZU gDsg== X-Gm-Message-State: ACrzQf3ooX64KeSBffIJ4nr/ptqrT0iFDdV1W1Xjfqm9lRlJjqN9TMIL /phHvF06WW1/SqgZ/HXN3yM= X-Google-Smtp-Source: AMsMyM6m69A/S4DEPbsi+ZnkiCQ3JicwD+7InxxliYmIyXlzonVAsFkR6XtzF1+gbfMOqzFtQptv9g== X-Received: by 2002:a17:906:328c:b0:780:7574:ced2 with SMTP id 12-20020a170906328c00b007807574ced2mr3541108ejw.634.1666116660657; Tue, 18 Oct 2022 11:11:00 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:11:00 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 4/7] mm: vmalloc: Use trace_alloc_vmap_area event Date: Tue, 18 Oct 2022 20:10:50 +0200 Message-Id: <20221018181053.434508-5-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-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=1666116661; 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=EAJWBA/OARebIHwOWWIUrI8OsApEiB0+kqbjGVUJums=; b=z+ShM7/CKls16gd704gl8NHFYaCetq6MkEJZtI3ppHs0NV+wOsUiyt0tumkG0hzLnW0ypV sp0moX20hvRHi9DaHfc51AE/FrXtrdXVMTZ9hkaBfkQ1ooKMcgmyvxYE2j+NOO/UJcQmqd g+6j0iTX0NeHKIlGiDldYhwKXhP0BUE= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HvkyVCyo; spf=pass (imf04.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.49 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=1666116661; a=rsa-sha256; cv=none; b=pNET+/FNTBaACg/fl5Cbwr4tg4paO9Z1gZmuQeixRems5+pdzFq4Z57MJ1XDqm9KO3o1sa 8TMDIIqfK0bZloytFjiHXURfXV5My4zsj69kpsdxjn4zjQ8vZIaW4C6ngHwqdj68Z0bMYi V4FNt18xxE9ja4+qciMTCcaqO8+5WFM= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: D2E024002D X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HvkyVCyo; spf=pass (imf04.hostedemail.com: domain of urezki@gmail.com designates 209.85.218.49 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: 44ph5dj4s3hqqkd9fnrsi4jsgo7ji1bc X-HE-Tag: 1666116661-107639 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 is for debug purpose and is called when an allocation attempt occurs. This event gives some information about: - a start address of allocated area; - a size that is requested; - an align that is required; - vstart/vend restriction; - if an allocation fails. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- mm/vmalloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 83b54beb12fa..aa86f21bfad0 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -43,6 +43,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include "internal.h" #include "pgalloc-track.h" @@ -1621,6 +1624,8 @@ static struct vmap_area *alloc_vmap_area(unsigned long size, size, align, vstart, vend); spin_unlock(&free_vmap_area_lock); + trace_alloc_vmap_area(addr, size, align, vstart, vend, addr == vend); + /* * If an allocation fails, the "vend" address is * returned. Therefore trigger the overflow path. From patchwork Tue Oct 18 18:10:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010877 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 8D453C4332F for ; Tue, 18 Oct 2022 18:11:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 182C26B007D; Tue, 18 Oct 2022 14:11:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0BFC76B007E; Tue, 18 Oct 2022 14:11:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E78756B0080; Tue, 18 Oct 2022 14:11:02 -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 DC2496B007D for ; Tue, 18 Oct 2022 14:11:02 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B0C9C1A069D for ; Tue, 18 Oct 2022 18:11:02 +0000 (UTC) X-FDA: 80034861564.12.345F251 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf13.hostedemail.com (Postfix) with ESMTP id 4AC9820045 for ; Tue, 18 Oct 2022 18:11:02 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id q19so21712415edd.10 for ; Tue, 18 Oct 2022 11:11:02 -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=n8kMXp9BQAd3vgxARQi9NOKOPWDC+b4eB+IRpUUVrl4=; b=WfSPJEGUoF2C9KAvUYS570nptYgLA/TuWUM/Ysm9180aXj8gEJL6TR3123vRXv72s7 XFX+/7g1IMk6mf/h5jeA+hPg0nl725MnZQc7Q38P9jvAXr75fkC63/p0h5UmM5KUegTY D2z9K80d7tlDUECwTADSfkpPpF9Dk4ZY74npnitOV4oqWqarha84ZLQLT3Xz04BFACCB 8PwzK8coREdFHo8Pb8ZxRj4TRiqxAxYTK5AbtLBq81L/WTL8EF+6MFdsPxvosGw0b3DG dZSKqSkKwHzfCv+UALd5/k+1QbABrGTotVu4KWiVPzobmZURCQdTLLx2WkGmS1A3adcB T3Qg== 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=n8kMXp9BQAd3vgxARQi9NOKOPWDC+b4eB+IRpUUVrl4=; b=6oKnk7UamsQDsCbJU/biOGin20OUCqrbsEkr8IH2uS1bXsnRcvGh/HjePtF4GXDYuo bQurFqXAQ08FeldPUCftc34DT3TanaHfEXOoGP8OyFRGWUKk8Eyz9TDm4YWNDfB0Ogqy dVnZSgWjpXgkvmkafUYPv+/DbzAvQJlcbAnQTGz/UOiFHr5UP6kk4W59m/FdwynoDZ3o ua1dIExwGkjb6ZyvWRaz/ZkFz08BlIzm8KTqOIcyx+dpzx7ka6awYGbN15o3PQjsUnOM gTRFtgtTOZyoUD7i4i0iZ2jIEaErOTEEYaxwGUm4rIbgoMgnWBiF1ZVcHvGDJU9qv2RY Zzmg== X-Gm-Message-State: ACrzQf236/duRA4z6iz9mJW1f7hjqjNDTF/olYOxYJFeXPO+AeGYPh/g gF4+WjMKA4dbUsq/IlRz2dM= X-Google-Smtp-Source: AMsMyM7ijjHus1bRUjHQvJYBGDCBkNK0BwtjzEw9/bAky47EzLnOn5lKf4DXyLK+rkXid4XZJwz9xA== X-Received: by 2002:a05:6402:f96:b0:459:4180:6cf4 with SMTP id eh22-20020a0564020f9600b0045941806cf4mr3805343edb.64.1666116661749; Tue, 18 Oct 2022 11:11:01 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:11:01 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 5/7] mm: vmalloc: Use trace_purge_vmap_area_lazy event Date: Tue, 18 Oct 2022 20:10:51 +0200 Message-Id: <20221018181053.434508-6-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-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=1666116662; 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=n8kMXp9BQAd3vgxARQi9NOKOPWDC+b4eB+IRpUUVrl4=; b=dTv6g+AIbY1bMT40Tp4xslvQoxVpw101wPqAAz9doYI2Ysd9MDIz1CTXKfU3zL4LZdcIH9 /eKiW6fRE5o2C+PrpuGl703z91/vUbYwCKIufTKH71QmTumElZxh+w+BreQYu8rVENdtMO +9xZaWHqISoYB+a2AH6U5tutvVWV/y0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WfSPJEGU; spf=pass (imf13.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=1666116662; a=rsa-sha256; cv=none; b=MwuLM5T/0n6evF1o4nMZ3PKgUOodVVtD1kH2xbYiR4U4O3WvZlwKmMbvuTm0C1hxPy2z0x jEjM93gtYPSRwrgWxM7upr/M4l/YTFx/NgXqQ0b+JqYfMMQusMM2CS9Tm6/USZFZcPa6QL mK6kEfQ73zU4L84XVFNUeCIvKPrerkM= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 4AC9820045 X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WfSPJEGU; spf=pass (imf13.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: a7ox33tihgi4ehbzkmh1chswk8bexfnx X-HE-Tag: 1666116662-698367 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 is for debug purpose and is called when all outstanding areas are removed back to the vmap space. It gives some extra information about: - a start:end range where set of vmap ares were freed; - a number of purged areas which were backed off. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- mm/vmalloc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index aa86f21bfad0..4292f44ae670 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1731,6 +1731,7 @@ static void purge_fragmented_blocks_allcpus(void); static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end) { unsigned long resched_threshold; + unsigned int num_purged_areas = 0; struct list_head local_purge_list; struct vmap_area *va, *n_va; @@ -1742,7 +1743,7 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end) spin_unlock(&purge_vmap_area_lock); if (unlikely(list_empty(&local_purge_list))) - return false; + goto out; start = min(start, list_first_entry(&local_purge_list, @@ -1777,12 +1778,16 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end) va->va_start, va->va_end); atomic_long_sub(nr, &vmap_lazy_nr); + num_purged_areas++; if (atomic_long_read(&vmap_lazy_nr) < resched_threshold) cond_resched_lock(&free_vmap_area_lock); } spin_unlock(&free_vmap_area_lock); - return true; + +out: + trace_purge_vmap_area_lazy(start, end, num_purged_areas); + return num_purged_areas > 0 ? true:false; } /* From patchwork Tue Oct 18 18:10:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010878 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 B8754C43217 for ; Tue, 18 Oct 2022 18:11:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 26C466B0080; Tue, 18 Oct 2022 14:11:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 21F136B0081; Tue, 18 Oct 2022 14:11:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 070A26B0082; Tue, 18 Oct 2022 14:11:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DE2C46B0080 for ; Tue, 18 Oct 2022 14:11:04 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 7A4F8160BB0 for ; Tue, 18 Oct 2022 18:11:04 +0000 (UTC) X-FDA: 80034861648.25.7B71747 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf08.hostedemail.com (Postfix) with ESMTP id 052F3160036 for ; Tue, 18 Oct 2022 18:11:03 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id m16so21757213edc.4 for ; Tue, 18 Oct 2022 11:11:03 -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=Pi0tjzbLmXgGsglusGmrSt3nKwzpPKhOzNGgAFj4deM=; b=J35hy3hbYScd9cIdMAW/EhRXhuMHkMIbXqlAvSSnIY27KTlIg7uboTgd1AXcX9OjBP LgOnwf6MOgzur7qqpFElJ+91KdHC0ymafDroc/4r9m9fvtrFxMQNj/P4JPFSO7KMJ2yF 7CRJPh6bVA4+3AI3/mB5yiwzHi04YCVk4opiXmufUS3us8kpBR0bh+xpivtbT8raOFG/ 8BJHX4mlM1kUnQnOCnPGnh6I3hGjOSCIqsE8kppaSzYHBhFVY2ATiB6PRNpt4zm1yImZ LLRwpgnP/nA/8JUwlPgFQ8y8u27DXDnSOTZfG5AGSwsGR9d51XvYbm41HFGhdvz3fwYp plzQ== 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=Pi0tjzbLmXgGsglusGmrSt3nKwzpPKhOzNGgAFj4deM=; b=5wSMIUncMqk7yalONGSxlPmZFNLA3+Yb/rXpBBnDJ1fmXPmV7MWwGESBsryh9YSz6+ gCr0/jG7jQBXec+Wp5FmcTb/IRP1dSYrDxOK6C3kliIVTfz/dBRxTTyqT3XzsYqwv681 YXluOXMON4OI/9N8TiQF7MuzuUc/kqjq1MxRfi2VxPGlU4tKdfuTbMgAwE472LFyk+tC QJ/uMDADmk26sjhQebvy6V6K4BBGd+/PpSV5dHQHnsNZI7dUHupZIj2pLiJbrJCK6sMq NPTNpj4pyFhNfvAwmSY0m/HwdFRBEatw6d7CE7sVcQFweUNqj7JQU+5YxpEcwSIfuoh8 92Iw== X-Gm-Message-State: ACrzQf24Osn93TsjKorjcQ1efZJtXlfyV2DssU7vrpdvhiZQEc2wOtgU bTjgpv8+l9JxElbuioSqMDI= X-Google-Smtp-Source: AMsMyM5Zl8vwJg/6ezF7ChkqFZClQkn3o+MqhrKUy+U0XHnl5bkuEf36aH9F8/4DjW9zC42HhN7ebg== X-Received: by 2002:a05:6402:1d53:b0:45e:ec87:686e with SMTP id dz19-20020a0564021d5300b0045eec87686emr2362032edb.380.1666116662826; Tue, 18 Oct 2022 11:11:02 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:11:02 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 6/7] mm: vmalloc: Use trace_free_vmap_area_noflush event Date: Tue, 18 Oct 2022 20:10:52 +0200 Message-Id: <20221018181053.434508-7-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-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=1666116664; 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=Pi0tjzbLmXgGsglusGmrSt3nKwzpPKhOzNGgAFj4deM=; b=BsWlK5S31HKLmTtOVWzggRittX1QqpQ2kGYg4JQV1+RMOPlk8uU61sFnpyth1ytcQHKSGb 6JsvbyBXl0ayVax4OyZ7HpZOGQHNrbvM0sz0WSbwQt3/w6YtYQN3eolT6BJxl3O5c+gyo3 MWBIk7wPKo/9lxzt9V8PKPmIOelAhfs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=J35hy3hb; spf=pass (imf08.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.45 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=1666116664; a=rsa-sha256; cv=none; b=6b0MbN+A4XQ6mXcqAlkMG2d9nluCE4nMbytZAKqAHH9WhwlTBirXUfb7CAgrPH8lSAjMMJ bt5OvjfHd3yqAzTAQbfQfgOUD1NOYOSgLZTyCWMvxFZ5xVp726bdMolymWztISivoYkv5g nL4OeQqY5cnIiumUnBvyHFbn6mVjRC4= Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=J35hy3hb; spf=pass (imf08.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: k6zdkaif17tidoboh5e97d56btgbrkuj X-Rspamd-Queue-Id: 052F3160036 X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1666116663-223731 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 a debug purpose and is called when a vmap area gets freed. This event gives some indication about: - a start address of released area; - a current number of outstanding pages; - a maximum number of allowed outstanding pages. Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig --- mm/vmalloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 4292f44ae670..bd56f68bedf0 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1822,6 +1822,8 @@ static void drain_vmap_area_work(struct work_struct *work) */ static void free_vmap_area_noflush(struct vmap_area *va) { + unsigned long nr_lazy_max = lazy_max_pages(); + unsigned long va_start = va->va_start; unsigned long nr_lazy; spin_lock(&vmap_area_lock); @@ -1839,8 +1841,10 @@ static void free_vmap_area_noflush(struct vmap_area *va) &purge_vmap_area_root, &purge_vmap_area_list); spin_unlock(&purge_vmap_area_lock); + trace_free_vmap_area_noflush(va_start, nr_lazy, nr_lazy_max); + /* After this point, we may free va at any time */ - if (unlikely(nr_lazy > lazy_max_pages())) + if (unlikely(nr_lazy > nr_lazy_max)) schedule_work(&drain_vmap_work); } From patchwork Tue Oct 18 18:10:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13010879 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 C4BC7C4332F for ; Tue, 18 Oct 2022 18:11:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 616446B0081; Tue, 18 Oct 2022 14:11:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C7906B0082; Tue, 18 Oct 2022 14:11:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F18B6B0083; Tue, 18 Oct 2022 14:11:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2D8836B0081 for ; Tue, 18 Oct 2022 14:11:07 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id EE285C04EB for ; Tue, 18 Oct 2022 18:11:06 +0000 (UTC) X-FDA: 80034861732.01.1E9A13F Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf09.hostedemail.com (Postfix) with ESMTP id 46C04140030 for ; Tue, 18 Oct 2022 18:11:04 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id t16so2481793edd.2 for ; Tue, 18 Oct 2022 11:11:04 -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=HLk9zy0zXNxz51W/qZOGlz34Dfvx1m3EHjUzRbqLkUc=; b=cnOL00ZxpL2eR1fpnbcgRcD2qEPWYqApygWXQI/5C/ttv4yqAkPLNJyu4viRI2xIpE 522AGEOxhtm226m2ZJH123YqtZCoNQb9gOU3PfWrLuipdlc7z81rGSxJV5H5/gtdFnUt gE/SoWwohWXa41E12xqtCczlA2vzUZhkhCL7YULnJmA+jQGv3RP6DF9Iwuis19vQWzcr iJ/seWUt35qtQH5stUC/nnm48hBPJx33rIvj2mT1vAUdKxUlFAhvaBeAO9sUBMYRomIF Wa3CiXXkQ4+jNTKxkS91jdIm/4thKjLsBzetiBYAAe0EUeJ6p1VW3oDHFmSQgPP6nMZb xovw== 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=HLk9zy0zXNxz51W/qZOGlz34Dfvx1m3EHjUzRbqLkUc=; b=Hf5jCtkdM0nxkqu6PoTP1/erVe7+teIkPL63/jeaSnJhXfujrakBE46xZ9Y63QEaGE vGzaevRRjFU70d77ooLSY17ozKo/Wla17wNbw7lyNAZHaZ+2k8d4KPIzLt4p1kaBhjpK pAThyKA4bCFCgOYmDASavxSYkuBEzvbivK/lAaFe8srBTVpBtu8WJx8j5duOmBGVKC04 bQUxMXK2MEC15vbdEQ5XdkKMBPXAJr5LbNJlQYjj5lsTNpTiDS/DbQ7VlGfYsS9Qa78U zwDLcBKbAbPtjujdJU17rkXLvKilAnW2bV9AStXUWYU4vca2o3pZf93mdqWJ7CGHcRMh k00A== X-Gm-Message-State: ACrzQf3OVm9zLxd2Su/eqByeTIAsbzXwO9f/q8p8MjFssXzuxTkMuRXN 2HtNgg/FoNxzPY3s91M2yb/BiXWbrcY= X-Google-Smtp-Source: AMsMyM5oOTHLewDw93tTiPYxeZZtHzrQBJV2t3B+0mQMGf0y716r863fZhSTKXrmzLvPkvqGzpxQwA== X-Received: by 2002:a05:6402:27c9:b0:45d:4539:b462 with SMTP id c9-20020a05640227c900b0045d4539b462mr3790716ede.226.1666116663867; Tue, 18 Oct 2022 11:11:03 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b007877ad05b32sm7739302ejf.208.2022.10.18.11.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:11:03 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Christoph Hellwig , Matthew Wilcox , Nicholas Piggin , Steven Rostedt , Uladzislau Rezki , Oleksiy Avramchenko Subject: [PATCH v2 7/7] vmalloc: Add reviewers for vmalloc code Date: Tue, 18 Oct 2022 20:10:53 +0200 Message-Id: <20221018181053.434508-8-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018181053.434508-1-urezki@gmail.com> References: <20221018181053.434508-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=1666116665; 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=HLk9zy0zXNxz51W/qZOGlz34Dfvx1m3EHjUzRbqLkUc=; b=aeGQ7K2TCn6kYnSsxpe7E1Woph9vHZD+SwK5iM2PqUNhTUhxsj6DJMphrMNgC1qqNN9FJI uieW3MM71mdXvFqFlbcnS8rizMeX80tNFm5+7Io79G867w3MrfVZ5hugzjhrfscPbTwByL u7mRO1MZoRJ40RkfayovBRgUj/3/rTc= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cnOL00Zx; spf=pass (imf09.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.50 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=1666116665; a=rsa-sha256; cv=none; b=Eq/z/ToDQKT+enEhIH6ZnJZWSFIGJi0YRPJ1XF3UYz2NqOIX55APjhsE7Ixp8FMig6NyFz cNear1EULy5x/kunEgLCc94AiS7Ydr6YH9yHM+KNTD0dZEXio7iHNT5/hnmZp4h4Pl5NQU Vx70Ur9ZBsM9fuE6yF6moip4kTyud2U= Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cnOL00Zx; spf=pass (imf09.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.50 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: 85jb1fnan1j1e6xcxfbmymurxciq3dzt X-Rspamd-Queue-Id: 46C04140030 X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1666116664-437392 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: Add myself and Christoph Hellwig as reviewers for vmalloc. Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Christoph Hellwig --- MAINTAINERS | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 568ad7c5eeb6..a6f4e11755e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13289,10 +13289,20 @@ F: include/linux/memory_hotplug.h F: include/linux/mm.h F: include/linux/mmzone.h F: include/linux/pagewalk.h -F: include/linux/vmalloc.h F: mm/ F: tools/testing/selftests/vm/ +VMALLOC +M: Andrew Morton +R: Uladzislau Rezki +R: Christoph Hellwig +L: linux-mm@kvack.org +S: Maintained +W: http://www.linux-mm.org +T: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm +F: mm/vmalloc.c +F: include/linux/vmalloc.h + MEMORY HOT(UN)PLUG M: David Hildenbrand M: Oscar Salvador