From: Jan Kara <jack@suse.cz>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] mm: Place "not" inside of unlikely() statement in wb_domain_writeout_inc()
Date: Tue, 7 Feb 2017 12:04:19 +0100 [thread overview]
Message-ID: <20170207110419.GA13524@quack2.suse.cz> (raw)
In-Reply-To: <20170206120035.3c2e2b91@gandalf.local.home>
On Mon 06-02-17 12:00:35, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> The likely/unlikely profiler noticed that the unlikely statement in
> wb_domain_writeout_inc() is constantly wrong. This is due to the "not" (!)
> being outside the unlikely statement. It is likely that dom->period_time
> will be set, but unlikely that it wont be. Move the not into the unlikely
> statement.
>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Yeah, good catch. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Andrew, will you merge this patch please? Thanks!
Honza
> ---
> mm/page-writeback.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 290e8b7..94102c7 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -580,7 +580,7 @@ static void wb_domain_writeout_inc(struct wb_domain *dom,
> __fprop_inc_percpu_max(&dom->completions, completions,
> max_prop_frac);
> /* First event after period switching was turned off? */
> - if (!unlikely(dom->period_time)) {
> + if (unlikely(!dom->period_time)) {
> /*
> * We can race with other __bdi_writeout_inc calls here but
> * it does not cause any harm since the resulting time when
> --
> 2.9.3
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2017-02-07 14:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 17:00 Steven Rostedt
2017-02-07 11:04 ` Jan Kara [this message]
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=20170207110419.GA13524@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®