From: Jimmy Shiu <jimmyshiu@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: mingo@redhat.com, joaodias@google.com, wvw@google.com,
Minchan Kim <minchan@google.com>,
Will McVicker <willmcvicker@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>,
William Kucharski <william.kucharski@oracle.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andreas Gruenbacher <agruenba@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] SCHED: attribute page lock and waitqueue functions as sched
Date: Fri, 5 Nov 2021 02:10:25 +0800 [thread overview]
Message-ID: <CAOnVMEFssDFWonoxELH6XAbUuXUuZbLEFTfmUdGAWewJufTNxA@mail.gmail.com> (raw)
In-Reply-To: <YYLerEPg02MpQFWs@casper.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
On Thu, Nov 4, 2021 at 3:12 AM Matthew Wilcox <willy@infradead.org> wrote:
> On Thu, Nov 04, 2021 at 02:47:03AM +0800, Jimmy Shiu wrote:
> > +++ b/mm/filemap.c
> > @@ -1271,7 +1271,7 @@ static inline bool folio_trylock_flag(struct folio
> *folio, int bit_nr,
> > /* How many times do we accept lock stealing from under a waiter? */
> > int sysctl_page_lock_unfairness = 5;
> >
> > -static inline int folio_wait_bit_common(struct folio *folio, int bit_nr,
> > +static inline __sched int folio_wait_bit_common(struct folio *folio,
> int bit_nr,
>
> It's not clear to me whether folio_wait_bit_common() needs to be marked
> as __sched or whether marking its callers is sufficient, but I'm pretty
> sure you forgot to mark put_and_wait_on_page_locked() as __sched, which
> is an important one as it's now where we wait for readahead to finish
> when reading a file.
>
I checked the implementation of arch/x86/kernel/process.c # get_wchan() .
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/process.c#n972
Looks like it unwind the stack and find the 1st non-sched function.
I think we should mark both folio_wait_bit_common() and
put_and_wait_on_page_locked()
[-- Attachment #2: Type: text/html, Size: 2728 bytes --]
next prev parent reply other threads:[~2021-11-04 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 18:47 Jimmy Shiu
2021-11-03 18:58 ` Matthew Wilcox
2021-11-04 18:01 ` Jimmy Shiu
2021-11-03 19:10 ` Matthew Wilcox
2021-11-04 18:10 ` Jimmy Shiu [this message]
2021-11-04 9:16 ` Mel Gorman
2021-11-04 18:30 ` Jimmy Shiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOnVMEFssDFWonoxELH6XAbUuXUuZbLEFTfmUdGAWewJufTNxA@mail.gmail.com \
--to=jimmyshiu@google.com \
--cc=agruenba@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dhowells@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=joaodias@google.com \
--cc=juri.lelli@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@google.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vbabka@suse.cz \
--cc=vincent.guittot@linaro.org \
--cc=william.kucharski@oracle.com \
--cc=willmcvicker@google.com \
--cc=willy@infradead.org \
--cc=wvw@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox