diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-02-24 17:59:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-24 20:46:56 -0500 |
commit | 517663edd6b5d2a822469885994f34e092e2cf9f (patch) | |
tree | f7c566f5810e5580084977a21cab72833aaed5ed /mm | |
parent | c137a2757b88658ce61c74b25ff650ecda7f09d8 (diff) |
mm/page-writeback.c: place "not" inside of unlikely() statement in wb_domain_writeout_inc()
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.
Link: http://lkml.kernel.org/r/20170206120035.3c2e2b91@gandalf.local.home
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 216449825859..ae6e601f0a58 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, | |||
580 | __fprop_inc_percpu_max(&dom->completions, completions, | 580 | __fprop_inc_percpu_max(&dom->completions, completions, |
581 | max_prop_frac); | 581 | max_prop_frac); |
582 | /* First event after period switching was turned off? */ | 582 | /* First event after period switching was turned off? */ |
583 | if (!unlikely(dom->period_time)) { | 583 | if (unlikely(!dom->period_time)) { |
584 | /* | 584 | /* |
585 | * We can race with other __bdi_writeout_inc calls here but | 585 | * We can race with other __bdi_writeout_inc calls here but |
586 | * it does not cause any harm since the resulting time when | 586 | * it does not cause any harm since the resulting time when |