From mboxrd@z Thu Jan 1 00:00:00 1970 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 3926AC54E64 for ; Mon, 25 Mar 2024 18:20:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7AAA66B007B; Mon, 25 Mar 2024 14:20:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 75AD66B0082; Mon, 25 Mar 2024 14:20:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D63A6B0083; Mon, 25 Mar 2024 14:20:22 -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 4E2EB6B007B for ; Mon, 25 Mar 2024 14:20:22 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id D968B14036A for ; Mon, 25 Mar 2024 18:20:21 +0000 (UTC) X-FDA: 81936376242.03.767BED3 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf26.hostedemail.com (Postfix) with ESMTP id 8390E14000D for ; Mon, 25 Mar 2024 18:20:19 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XEkb4FbW; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711390820; a=rsa-sha256; cv=none; b=hIALt3cXZutC2Wafvf+HSklKyaUkGgNVeFJapeutnnx+06CQV+tIUsWdpWerPvSCGRXAc1 dSRUi9ZW0vOxX1lsm2ab0pQFMr0kRJ9MU82x5axEIZe2Tog5ldTpa/rxypmsrMdX69csQG iHPUyq1qTCGG7iCZiJWxrtF/q31mjY8= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XEkb4FbW; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711390820; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jw/Fh/RYsoUgVlZSPyEBwAC6yZDivQ6KkMRDm0qnHDE=; b=G+zWj9+bYujeGa+P8PeG7cXj3aRtRIHmYpu0qTsvFIJ//f+F0Ntmn1MxsRrFGFK1WrwBqW wO7dZi4Y0oEL5ZQBlOlk4PxTgPnWoTXCsq6nqUOYJTIQ82rGypLEg06LW156DPFMeku/pf 55VgT5FO3VIcJYV5fxxDQN8EePYiA/I= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 40FAACE0B4C; Mon, 25 Mar 2024 18:20:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55A0CC433F1; Mon, 25 Mar 2024 18:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711390814; bh=Z9fYLG7lM7QRd2z1J6VDOsa2mnKl/0CwjKf7s97CFbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEkb4FbWOn67uvoG4OVtv6eeAU5F3GTqMnsnd6vPKrCjkAKU2Fa2ZY15zDyx6e0Qt Aj5NNS8ijJOk6L1H5Iivvs3F2JB4/v5GWKD8R3RbddWydHUHUxjff5crBS4mHSIAU1 7QuXHPDFEbPyddq7eScELmxnvylfgwSjlxBxWIfuYxnpBgRoyVeXaGV2sUCsWFm3F8 HpNF55tk7Q3aUQHyV0NkKzspllvZsRloFZQVN2ngZVwXevH4uWn66roa2ABgA8HFKi EpkMG8QuSsPcKgcz/EWGIQIxt9sYlmspKP0eS2DCcj8W8pz8ie2DwPgILuJnVQVq8z MD1BHbcKXCaLQ== From: SeongJae Park To: Suren Baghdasaryan Cc: SeongJae Park , vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v6 30/37] mm: vmalloc: Enable memory allocation profiling Date: Mon, 25 Mar 2024 11:20:07 -0700 Message-Id: <20240325182007.233780-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8390E14000D X-Stat-Signature: 873i1mcj8ntgypeuab9siguxyf8dwwb9 X-HE-Tag: 1711390819-185688 X-HE-Meta: U2FsdGVkX193voEcCo+5IK7Ajvbmk9Dk9dHYgW4xHY9sPhw9cKaJQemH+Gzs+hzNglM5neH9eO+tEsR9d6AAG06FxYVHbbCcUe10BGUMZJa8jQF7S2ZALEtH91Nt7Vx2SuY+oMwjK1guJK3qj7vnG4UrOIBbGzRiYrikUM44PQpjMxYUxo5iqItzOjTPRVubAjqM8diVBYXLvwazQ4npfAYor/Ckk1BP2UGtGo1FBAhOU0FRtNuSshrtu0JMZEZ3UJcKWD4Tzk3CHSk0+kayaQ8DbM+Z/WoFFt1oaaI8C+pdHuNRWjoku2TTBBUwuV/kRLE/y8v7XtPAlsjjHbWRdI1APnQspQdoeqZraX0gHkhM5Y8C9544vpkF55Ho8bQDYrT49n5jxSwH8WxYQcx7k7unmdA2tQ1Gw7jOCHemdyI0NZ1iz07hSo+UqLqy2Z3pv77iv5quRKrGL+Tqri0uS7D0f7thVphzTAGsR0bgNfzPzqgZa/KN/nqJMlkkHxQ1c7iQk/9OtV/EVWWqzpHObVN8FMwlHQg19QeBj0DzzjJsUylfD5zAK30O3O6UVV3HYIX7oEsstdWRGWmmJWBPvwTbXsQW0rvL9T1J2CKIbvD6HI6dIk6cXg9oRr59qfmSVp5HA3SAne68WM58zhzhzKNok9GUUMqCrMlhBF8EC602t9qNwDnjcqVlgYz5clNCiZiOpYJ4JAWX2HWLwrjH97Bg28jJZx56qBd5Yn1JmOyGwFBMiGhqj1w/75jN2lwFRJ2u583Ky3lHI/n25pj+OmpnRplyA19PYMOm73e4f+7p4WU1ot4RiCmcwmw9VFJVHEEFbqkk5OjoWR0fvPL3P5iRrZ5zGb4aIPb9EmxAMQJEXYrscmDPB4aEpWPSnuL9w4xpG3AXP21xOXjPe972XAV+J05WqHGeimHr4DkKNhA5yfkGS+EWMZhzf/dbjlgHVLlKwzU4B7ngBVgjTu5 tm3qwbd2 TY1EromY0Yn/IDxa++lKp3Ho/YxRVwfGTHuYOeh5ic7YN8MGgDgUZl49MhOtm8Ij+FCMEAomYfSM/pfi4wV9D4YJwBdAaJ7a2Gn43DhI46KhDMMc+AyKpFP5NBtofsuMbqo1vZxbOFOcGOlUDTqNEgk7vPpf+mFIJTfo0KmbiOgtLVR+YXVYOCBtGjjjrV06S7BK6/ZugYaGwRG5extxhLcIokL9v5PEGoGQQaqwyUXyMbS7ZJ9NplHvcm1OoRqcYVsn3sxdeqxj00Kf/y3KLwI37hI0qXFj38jeUKTdfjq8eVE2HkHS5eBAsl7dPm0xZ9D6FVJSXbzuvZ7z9DKHAlKg/VYb7k/CVLIzCf61c8l8dLTMES3MNTwVlPg== 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: List-Subscribe: List-Unsubscribe: On Mon, 25 Mar 2024 10:59:01 -0700 Suren Baghdasaryan wrote: > On Mon, Mar 25, 2024 at 10:49 AM SeongJae Park wrote: > > > > On Mon, 25 Mar 2024 14:56:01 +0000 Suren Baghdasaryan wrote: > > > > > On Sat, Mar 23, 2024 at 6:05 PM SeongJae Park wrote: > > > > > > > > Hi Suren and Kent, > > > > > > > > On Thu, 21 Mar 2024 09:36:52 -0700 Suren Baghdasaryan wrote: > > > > > > > > > From: Kent Overstreet > > > > > > > > > > This wrapps all external vmalloc allocation functions with the > > > > > alloc_hooks() wrapper, and switches internal allocations to _noprof > > > > > variants where appropriate, for the new memory allocation profiling > > > > > feature. > > > > > > > > I just noticed latest mm-unstable fails running kunit on my machine as below. > > > > 'git-bisect' says this is the first commit of the failure. > > > > > > > > $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/ > > > > [10:59:53] Configuring KUnit Kernel ... > > > > [10:59:53] Building KUnit Kernel ... > > > > Populating config with: > > > > $ make ARCH=um O=../kunit.out/ olddefconfig > > > > Building with: > > > > $ make ARCH=um O=../kunit.out/ --jobs=36 > > > > ERROR:root:/usr/bin/ld: arch/um/os-Linux/main.o: in function `__wrap_malloc': > > > > main.c:(.text+0x10b): undefined reference to `vmalloc' > > > > collect2: error: ld returned 1 exit status > > > > > > > > Haven't looked into the code yet, but reporting first. May I ask your idea? > > > > > > Hi SeongJae, > > > Looks like we missed adding "#include " inside > > > arch/um/os-Linux/main.c in this patch: > > > https://lore.kernel.org/all/20240321163705.3067592-2-surenb@google.com/. > > > I'll be posing fixes for all 0-day issues found over the weekend and > > > will include a fix for this. In the meantime, to work around it you > > > can add that include yourself. Please let me know if the issue still > > > persists after doing that. > > > > Thank you, Suren. The change made the error message disappears. However, it > > introduced another one. > > Ok, let me investigate and I'll try to get a fix for it today evening. Thank you for this kind reply. Nonetheless, this is not blocking some real thing from me. So, no rush. Plese take your time :) Thanks, SJ > Thanks, > Suren. > > > > > $ git diff > > diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c > > index c8a42ecbd7a2..8fe274e9f3a4 100644 > > --- a/arch/um/os-Linux/main.c > > +++ b/arch/um/os-Linux/main.c > > @@ -16,6 +16,7 @@ > > #include > > #include > > #include > > +#include > > > > #define PGD_BOUND (4 * 1024 * 1024) > > #define STACKSIZE (8 * 1024 * 1024) > > $ > > $ ./tools/testing/kunit/kunit.py run --build_dir ../kunit.out/ > > [10:43:13] Configuring KUnit Kernel ... > > [10:43:13] Building KUnit Kernel ... > > Populating config with: > > $ make ARCH=um O=../kunit.out/ olddefconfig > > Building with: > > $ make ARCH=um O=../kunit.out/ --jobs=36 > > ERROR:root:In file included from .../arch/um/kernel/asm-offsets.c:1: > > .../arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes] > > 9 | void foo(void) > > | ^~~ > > In file included from .../include/linux/alloc_tag.h:8, > > from .../include/linux/vmalloc.h:5, > > from .../arch/um/os-Linux/main.c:19: > > .../include/linux/bug.h:5:10: fatal error: asm/bug.h: No such file or directory > > 5 | #include > > | ^~~~~~~~~~~ > > compilation terminated. > > > > > > Thanks, > > SJ > > > > [...] >