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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8BD4C433F5 for ; Thu, 4 Nov 2021 18:31:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6164D61212 for ; Thu, 4 Nov 2021 18:31:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6164D61212 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D43AE6B006C; Thu, 4 Nov 2021 14:31:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF3866B0072; Thu, 4 Nov 2021 14:31:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBC77940007; Thu, 4 Nov 2021 14:31:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id ACDC36B006C for ; Thu, 4 Nov 2021 14:31:08 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 65E1F18565654 for ; Thu, 4 Nov 2021 18:31:08 +0000 (UTC) X-FDA: 78772089816.06.CB5B38C Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by imf15.hostedemail.com (Postfix) with ESMTP id 6D0F8D0000A1 for ; Thu, 4 Nov 2021 18:30:57 +0000 (UTC) Received: by mail-pl1-f179.google.com with SMTP id u11so8707677plf.3 for ; Thu, 04 Nov 2021 11:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f85JW5pt6Qz9pr/Y3L35LCrXfJUyA3K/DlCOsw7K5Qk=; b=r0gWCv/bHT94LUPq4Pw4L5h+2putv9XYp5CByHEiuRA91qF9FPUMax9pGzwXWLfSHQ MCCJYctBMCMpe3dmW+9hPfyk+qQAxoLshyazHHYJp60TLCxxKfPUJR27belJUI9923sK 5CpH+38NSDq4zt4LKc4oFJ4eW7MFcjRiFXWP070tyhzSqO8DZlZXLdOH4IR283adfPjZ ur1Nt40if+z7QOiEZG6kVbqdfL/NgXy3uGdAYuNob1o+w1WW1CCPYSarDnYy2EIIxLVX r4t3c5Bc/wC4pkmIYrH8j4fUtQBOKVM9QEM/q7qsjPZdMTF4Rju6m+b0LmwSvpikDfej mgug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f85JW5pt6Qz9pr/Y3L35LCrXfJUyA3K/DlCOsw7K5Qk=; b=X/fTSIZhAbRXZ4pCnL3KxwImkjtjsO19PbLFWzoBDST/SoiaVto1pdcDMriIV2WH4g 12sJQ7aMm3ZXX8QDiXuEprfea9ko1rk+7UBWtixa2RK+hKUJKj3F+VBDv02f5xM1PdaF DSd0YEpTUKXLORojy3lJLySiwc5z+0SEw42lzSesUTQzrrt79jd2aJwXKb9VMJegabyu terN/nDAO1WlyTQ/mZlcozjb+sfshfglyxGF0ICeU3Y+nzuxy/RjT3K1CHTkcMS1vDCy 8Vuuaoo71ruwFTGyBfh8kKsPCr5qzpvLR1g8VwWsKlvzvp4V6VLRQP7oWUcTCnc5NKkn U/6w== X-Gm-Message-State: AOAM531PvjnToVgCkxRDfT1Q3jTB7pJoMeLkL6l/EMjVx1dKEHk+FtZs pAFUzpJD0Q5aXI2KCwXjHHycQBlU46/mfH4cURV8nA== X-Google-Smtp-Source: ABdhPJzJHQ8Gok/TrpJ63n9QqD5sdCX3JDsm6RT7mmUvZoSmZ6ekkKTYOhXQY/PQJd0r5wKDUg3VzI7bMnSm92TGxxk= X-Received: by 2002:a17:90a:df01:: with SMTP id gp1mr24126014pjb.28.1636050666566; Thu, 04 Nov 2021 11:31:06 -0700 (PDT) MIME-Version: 1.0 References: <20211103184708.1778294-1-jimmyshiu@google.com> <20211104091654.GV3891@suse.de> In-Reply-To: <20211104091654.GV3891@suse.de> From: Jimmy Shiu Date: Fri, 5 Nov 2021 02:30:55 +0800 Message-ID: Subject: Re: [PATCH] SCHED: attribute page lock and waitqueue functions as sched To: Mel Gorman Cc: mingo@redhat.com, joaodias@google.com, wvw@google.com, Minchan Kim , Will McVicker , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Andrew Morton , "Matthew Wilcox (Oracle)" , David Howells , Vlastimil Babka , William Kucharski , "Kirill A. Shutemov" , Andreas Gruenbacher , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: multipart/alternative; boundary="000000000000d1697005cffabab6" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 6D0F8D0000A1 X-Stat-Signature: 9rho6pjjn4dcdaom1uznb7xqcmcrpbpm Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="r0gWCv/b"; spf=pass (imf15.hostedemail.com: domain of jimmyshiu@google.com designates 209.85.214.179 as permitted sender) smtp.mailfrom=jimmyshiu@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1636050657-614208 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: --000000000000d1697005cffabab6 Content-Type: text/plain; charset="UTF-8" On Thu, Nov 4, 2021 at 5:17 PM Mel Gorman wrote: > On Thu, Nov 04, 2021 at 02:47:03AM +0800, Jimmy Shiu wrote: > > trace_sched_blocked_trace in CFS is really useful for debugging via > > trace because it tell where the process was stuck on callstack. > > > > For example, > > <...>-6143 ( 6136) [005] d..2 50.278987: > sched_blocked_reason: pid=6136 iowait=0 caller=SyS_mprotect+0x88/0x208 > > <...>-6136 ( 6136) [005] d..2 50.278990: > sched_blocked_reason: pid=6142 iowait=0 caller=do_page_fault+0x1f4/0x3b0 > > <...>-6142 ( 6136) [006] d..2 50.278996: > sched_blocked_reason: pid=6144 iowait=0 caller=SyS_prctl+0x52c/0xb58 > > <...>-6144 ( 6136) [006] d..2 50.279007: > sched_blocked_reason: pid=6136 iowait=0 caller=vm_mmap_pgoff+0x74/0x104 > > > > However, sometime it gives pointless information like this. > > RenderThread-2322 ( 1805) [006] d.s3 50.319046: > sched_blocked_reason: pid=6136 iowait=1 > caller=__lock_page_killable+0x17c/0x220 > > logd.writer-594 ( 587) [002] d.s3 50.334011: > sched_blocked_reason: pid=6126 iowait=1 caller=wait_on_page_bit+0x194/0x208 > > kworker/u16:13-333 ( 333) [007] d.s4 50.343161: > sched_blocked_reason: pid=6136 iowait=1 > caller=__lock_page_killable+0x17c/0x220 > > > > /me peers at coffee > > Maybe I'm blind but aside from Matthew's concerns, this > appears to rely on an Android patch that is not upstream > > https://android.googlesource.com/kernel/msm/+/c9f00aa0e25e397533c198a0fcf6246715f99a7b%5E!/ Yes, Mel. The main purpose is to help get_wchan() to get the meaningful information of the schedule() caller and can also benefit to Android sched_blocked_reason trace. Maybe I should edit the commit message and remove the Android specific logs. Would that be OK? > > > -- > Mel Gorman > SUSE Labs > --000000000000d1697005cffabab6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Nov 4, 2021 at 5:17 PM Mel Go= rman <mgorman@suse.de> wrote:<= br>
On Thu, Nov 04, = 2021 at 02:47:03AM +0800, Jimmy Shiu wrote:
> trace_sched_blocked_trace in CFS is really useful for debugging via > trace because it tell where the process was stuck on callstack.
>
> For example,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <...>-6143=C2=A0 ( 6136= ) [005] d..2=C2=A0 =C2=A0 50.278987: sched_blocked_reason: pid=3D6136 iowai= t=3D0 caller=3DSyS_mprotect+0x88/0x208
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <...>-6136=C2=A0 ( 6136= ) [005] d..2=C2=A0 =C2=A0 50.278990: sched_blocked_reason: pid=3D6142 iowai= t=3D0 caller=3Ddo_page_fault+0x1f4/0x3b0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <...>-6142=C2=A0 ( 6136= ) [006] d..2=C2=A0 =C2=A0 50.278996: sched_blocked_reason: pid=3D6144 iowai= t=3D0 caller=3DSyS_prctl+0x52c/0xb58
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <...>-6144=C2=A0 ( 6136= ) [006] d..2=C2=A0 =C2=A0 50.279007: sched_blocked_reason: pid=3D6136 iowai= t=3D0 caller=3Dvm_mmap_pgoff+0x74/0x104
>
> However, sometime it gives pointless information like this.
>=C2=A0 =C2=A0 =C2=A0RenderThread-2322=C2=A0 ( 1805) [006] d.s3=C2=A0 = =C2=A0 50.319046: sched_blocked_reason: pid=3D6136 iowait=3D1 caller=3D__lo= ck_page_killable+0x17c/0x220
>=C2=A0 =C2=A0 =C2=A0 logd.writer-594=C2=A0 =C2=A0(=C2=A0 587) [002] d.s= 3=C2=A0 =C2=A0 50.334011: sched_blocked_reason: pid=3D6126 iowait=3D1 calle= r=3Dwait_on_page_bit+0x194/0x208
>=C2=A0 =C2=A0kworker/u16:13-333=C2=A0 =C2=A0(=C2=A0 333) [007] d.s4=C2= =A0 =C2=A0 50.343161: sched_blocked_reason: pid=3D6136 iowait=3D1 caller=3D= __lock_page_killable+0x17c/0x220
>

/me peers at coffee

Maybe I'm blind but aside from Matthew's concerns, this
appears to rely on an Android patch that is not upstream
https://a= ndroid.googlesource.com/kernel/msm/+/c9f00aa0e25e397533c198a0fcf6246715f99a= 7b%5E!/
Yes, Mel.=C2=A0
The main purpose is to = help get_wchan() to get the meaningful information of the schedule() caller= and can also benefit to Android sched_blocked_reason trace.
May= be I should edit the commit message and remove the Android specific logs.
Would that be OK?
=C2=A0


--
Mel Gorman
SUSE Labs
--000000000000d1697005cffabab6--