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 2725BC433FE for ; Fri, 21 Oct 2022 17:02:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B07F28E0002; Fri, 21 Oct 2022 13:02:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A91018E0001; Fri, 21 Oct 2022 13:02:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90AB38E0002; Fri, 21 Oct 2022 13:02:44 -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 7E9348E0001 for ; Fri, 21 Oct 2022 13:02:44 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4D9D81C6E0A for ; Fri, 21 Oct 2022 17:02:44 +0000 (UTC) X-FDA: 80045575848.19.110E389 Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by imf14.hostedemail.com (Postfix) with ESMTP id A3C4010002B for ; Fri, 21 Oct 2022 17:02:42 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id l145so4123496ybl.0 for ; Fri, 21 Oct 2022 10:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UE0GQ1KPoluhkzNihpqKRt236ZCdBB8QJMFWTklYcAc=; b=gbQE2uDhO5zP5u80+Z2lfK/fdNh9OsBSEYw87Jv064yBUn8sNBUCeDj/PtXYnI4fcX xLjyEO2KiuhZBFNav/hj94Ms3E8hAYEIpQFdzBe8sTJjYkQo3Gf9rjGIhggvahPEbJyN r4U+PHo4V/SnTOCjEpUaCyj2mmsIqDc12H9Koxu3k64bkYiJExC7rbz44BX1FBpB1Ugc TAROYI/G3c7Rvj9GtP1kIksj7m0rZXACLimOze7p/q/8XlbuGzpcrZVhXR76t4QKW0Ou w130UjToG6+S3f1hcXbw9rVHezG3Q+/mj2/A1sq7vXxiAf4fgxw3q/kt1KbVhGOcZexX hcyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UE0GQ1KPoluhkzNihpqKRt236ZCdBB8QJMFWTklYcAc=; b=pLFZTovNcEwppZC4lgj1E6xzNl4IYyXIeYl9iPQnu5+3+AU1qJjzE0MXsceSm6RQSV Hx26Fw64VIg9LmTakhaHubcZHUD7twKTr+ktOFJePDkAmj9shSgK+uG3la0YJ2LgAXd0 7g694ty1hKzMEUzJDCaLUE9Ub7qJj2d0wNNvT/01Fpt0+5UV4qVrfGFdxh7YVoOKg+ab xpof0lHOVXnVTyW+AiPJEE4uT9xuyCxfXOHKWhTpEW6+r4aCus0Ypg1NROCW1qCwnwtN 7808IMkHbYBmVDzlnNXPn0z+esVnO03x9Spwc26kmoe1Cs9iCldzA8Dhbkrdm7+kpuzW 4O3A== X-Gm-Message-State: ACrzQf0wGkQnzprgC4XQABgckivlDsHHah7dAH8Ix27lprBBH3js3d36 Q5G70sFnPX9jLLFAFwvHiwEtPmaDlItHQR5bHTJGtQ== X-Google-Smtp-Source: AMsMyM73sOI1OWjAVZEqWyjspHJbV/gYeitszNDcGlF1RpIpAA/sJAuiw1UnoB2YPrE0a0NTzwmoL1l6VUrhRbDbuL0= X-Received: by 2002:a25:a088:0:b0:6ca:33ff:5b30 with SMTP id y8-20020a25a088000000b006ca33ff5b30mr9002381ybh.242.1666371761519; Fri, 21 Oct 2022 10:02:41 -0700 (PDT) MIME-Version: 1.0 References: <20220915150417.722975-19-glider@google.com> <20221019173620.10167-1-youling257@gmail.com> In-Reply-To: From: Alexander Potapenko Date: Fri, 21 Oct 2022 10:02:05 -0700 Message-ID: Subject: Re: [PATCH v7 18/43] instrumented.h: add KMSAN support To: youling 257 Cc: Marco Elver , Alexander Viro , Alexei Starovoitov , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Biggers , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Stephen Rothwell , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/alternative; boundary="000000000000e934c005eb8e68d0" ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=gbQE2uDh; spf=pass (imf14.hostedemail.com: domain of glider@google.com designates 209.85.219.173 as permitted sender) smtp.mailfrom=glider@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666371762; a=rsa-sha256; cv=none; b=hPk4JmyDClEVxeblm/SJnJlbiU7h1RM+q2z/ArCwqNVww//iWF4B/IOeVGXiG4kadSbANj qFyzCslk9Ay5sL0PWgYiMF2d8Ua4U2XiYU1SQ2pDEBP0pv8eFwed58mlNurp2lJumtrmzk NJtXJtLESGf+bepv4Qnhr22qgjwTfes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666371762; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UE0GQ1KPoluhkzNihpqKRt236ZCdBB8QJMFWTklYcAc=; b=JcBCUWfwpcTz4s3ApUDo2QFMv/ut7WZRtfvXWVHzjUkWlmLzjh1sZU7z6CKRBNQWmODSbJ W3MxXeZr5FUbcfZTrHGY6pwWHpO/Y6dNU2eIWSJ3pjhuFqUMqTEFSh4EwdM8VbDYrcu2QQ ywJZWXoi+dhaOOau55MUFwJRp2rjX44= X-Stat-Signature: 3xrous9ejjauh8mbipc8qpmgeqybhdsf X-Rspamd-Queue-Id: A3C4010002B X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=gbQE2uDh; spf=pass (imf14.hostedemail.com: domain of glider@google.com designates 209.85.219.173 as permitted sender) smtp.mailfrom=glider@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam06 X-HE-Tag: 1666371762-731293 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: --000000000000e934c005eb8e68d0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2022 at 8:19 AM youling 257 wrote: > CONFIG_DEBUG_INFO=3Dy > CONFIG_AS_HAS_NON_CONST_LEB128=3Dy > # CONFIG_DEBUG_INFO_NONE is not set > CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy > # CONFIG_DEBUG_INFO_DWARF4 is not set > # CONFIG_DEBUG_INFO_DWARF5 is not set > # CONFIG_DEBUG_INFO_REDUCED is not set > # CONFIG_DEBUG_INFO_COMPRESSED is not set > # CONFIG_DEBUG_INFO_SPLIT is not set > # CONFIG_DEBUG_INFO_BTF is not set > # CONFIG_GDB_SCRIPTS is not set > > perf top still no function name. > Will it help if you disable CONFIG_RANDOMIZE_BASE? (if it doesn't show the symbols, at least we'll be able to figure out the offending function by running nm) > > 12.90% [kernel] [k] 0xffffffff833dfa64 > 3.78% [kernel] [k] 0xffffffff8285b439 > 3.61% [kernel] [k] 0xffffffff83370254 > 2.32% [kernel] [k] 0xffffffff8337025b > 1.88% bluetooth.default.so [.] 0x000000000000d09d > > 2022-10-21 15:37 GMT+08:00, Marco Elver : > > On Thu, 20 Oct 2022 at 23:39, youling 257 wrote: > >> > >> PerfTop: 8253 irqs/sec kernel:75.3% exact: 100.0% lost: 0/0 drop: > >> 0/17899 [4000Hz cycles], (all, 8 CPUs) > >> > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ----------------------------------------------------------- > >> > >> 14.87% [kernel] [k] 0xffffffff941d1f37 > >> 6.71% [kernel] [k] 0xffffffff942016cf > >> > >> what is 0xffffffff941d1f37? > > > > You need to build with debug symbols: > > CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy > > > > Then it'll show function names. > > > >> 2022-10-21 14:16 GMT+08:00, Marco Elver : > >> > On Thu, 20 Oct 2022 at 22:55, youling 257 > wrote: > >> >> > >> >> How to use perf tool? > >> > > >> > The simplest would be to try just "perf top" - and see which kernel > >> > functions consume most CPU cycles. I would suggest you compare both > >> > kernels, and see if you can spot a function which uses more cycles% = in > >> > the problematic kernel. > >> > > > > --=20 Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Stra=C3=9Fe, 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg --000000000000e934c005eb8e68d0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Oct 21, 2022 at 8:19 AM youli= ng 257 <youling257@gmail.com= > wrote:
CONF= IG_DEBUG_INFO=3Dy
CONFIG_AS_HAS_NON_CONST_LEB128=3Dy
# CONFIG_DEBUG_INFO_NONE is not set
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_BTF is not set
# CONFIG_GDB_SCRIPTS is not set

perf top still no function name.
Will it help if you d= isable CONFIG_RANDOMIZE_BASE?
(if it doesn't show the symbols= , at least we'll be able to figure out the offending function by runnin= g nm)
=C2=A0

12.90%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [k] 0= xffffffff833dfa64
=C2=A0 =C2=A0 =C2=A03.78%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 [k] 0xffffffff8285b439
=C2=A0 =C2=A0 =C2=A03.61%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 [k] 0xffffffff83370254
=C2=A0 =C2=A0 =C2=A02.32%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 [k] 0xffffffff8337025b
=C2=A0 =C2=A0 =C2=A01.88%=C2=A0 bluetooth.default.so=C2=A0 [.] 0x0000= 00000000d09d

2022-10-21 15:37 GMT+08:00, Marco Elver <elver@google.com>:
> On Thu, 20 Oct 2022 at 23:39, youling 257 <youling257@gmail.com> wrote:
>>
>> PerfTop:=C2=A0 =C2=A0 8253 irqs/sec=C2=A0 kernel:75.3%=C2=A0 exact= : 100.0% lost: 0/0 drop:
>> 0/17899 [4000Hz cycles],=C2=A0 (all, 8 CPUs)
>> ------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------------------------------------------
>>
>>=C2=A0 =C2=A0 =C2=A014.87%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 [k] 0xffffffff941d1f37
>>=C2=A0 =C2=A0 =C2=A0 6.71%=C2=A0 [kernel]=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 [k] 0xffffffff942016cf
>>
>> what is 0xffffffff941d1f37?
>
> You need to build with debug symbols:
> CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy
>
> Then it'll show function names.
>
>> 2022-10-21 14:16 GMT+08:00, Marco Elver <elver@google.com>:
>> > On Thu, 20 Oct 2022 at 22:55, youling 257 <youling257@gmail.com> wro= te:
>> >>
>> >> How to use perf tool?
>> >
>> > The simplest would be to try just "perf top" - and = see which kernel
>> > functions consume most CPU cycles. I would suggest you compar= e both
>> > kernels, and see if you can spot a function which uses more c= ycles% in
>> > the problematic kernel.
>> >
>


--
Alexander Potapenko
Software= Engineer

Google Germany GmbH
Erika-Mann-Stra=C3=9Fe, 33
80636= M=C3=BCnchen

Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebasti= an
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellsch= aft: Hamburg
--000000000000e934c005eb8e68d0--