linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>, Michal Hocko <mhocko@suse.com>,
	Linux MM <linux-mm@kvack.org>,
	 shaoyafang@didiglobal.com
Subject: Re: [PATCH] mm/page-writeback: introduce tracepoint for wait_on_page_writeback
Date: Sat, 27 Apr 2019 08:31:42 +0800	[thread overview]
Message-ID: <CALOAHbDek6g7D+gK79_T-saTvT6gdbtd-ksb13BX3YqvV9TP5Q@mail.gmail.com> (raw)
In-Reply-To: <20190426112542.bf1cd9fe8e9ed7a659642643@linux-foundation.org>

On Sat, Apr 27, 2019 at 2:25 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 26 Apr 2019 18:26:42 +0800 Yafang Shao <laoar.shao@gmail.com> wrote:
>
> > Recently there're some hungtasks on our server due to
> > wait_on_page_writeback, and we want to know the details of this
> > PG_writeback, i.e. this page is writing back to which device.
> > But it is not so convenient to get the details.
> >
> > I think it would be better to introduce a tracepoint for diagnosing
> > the writeback details.
>
> Fair enough, I guess.
>
> > --- a/include/linux/pagemap.h
> > +++ b/include/linux/pagemap.h
> > @@ -537,15 +537,7 @@ static inline int wait_on_page_locked_killable(struct page *page)
> >
> >  extern void put_and_wait_on_page_locked(struct page *page);
> >
> > -/*
> > - * Wait for a page to complete writeback
> > - */
> > -static inline void wait_on_page_writeback(struct page *page)
> > -{
> > -     if (PageWriteback(page))
> > -             wait_on_page_bit(page, PG_writeback);
> > -}
> > -
> > +void wait_on_page_writeback(struct page *page);
> >  extern void end_page_writeback(struct page *page);
> >  void wait_for_stable_page(struct page *page);
> >
> > ...
> >
> > +/*
> > + * Wait for a page to complete writeback
> > + */
> > +void wait_on_page_writeback(struct page *page)
> > +{
> > +     if (PageWriteback(page)) {
> > +             trace_wait_on_page_writeback(page, page_mapping(page));
> > +             wait_on_page_bit(page, PG_writeback);
> > +     }
> > +}
> > +EXPORT_SYMBOL_GPL(wait_on_page_writeback);
>
> But this is a stealth change to the wait_on_page_writeback() licensing.
> I will get sad emails from developers of accidentally-broken
> out-of-tree filesystems.
>
> We can discuss changing the licensing, but this isn't the way to do it!
>

Got it.
Thanks for your explatation.

Thanks
Yafang


  reply	other threads:[~2019-04-27  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 10:26 Yafang Shao
2019-04-26 18:25 ` Andrew Morton
2019-04-27  0:31   ` Yafang Shao [this message]
2019-04-28 21:05   ` Michal Hocko
2019-05-11 23:28     ` Andrew Morton

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=CALOAHbDek6g7D+gK79_T-saTvT6gdbtd-ksb13BX3YqvV9TP5Q@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shaoyafang@didiglobal.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