mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch added to -mm tree
@ 2017-02-06 23:25 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-02-06 23:25 UTC (permalink / raw)
  To: rostedt, mm-commits


The patch titled
     Subject: mm/page-writeback.c: place "not" inside of unlikely() statement in wb_domain_writeout_inc()
has been added to the -mm tree.  Its filename is
     mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page-writeback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/page-writeback.c~mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc mm/page-writeback.c
--- a/mm/page-writeback.c~mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc
+++ a/mm/page-writeback.c
@@ -580,7 +580,7 @@ static void wb_domain_writeout_inc(struc
 	__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
_

Patches currently in -mm which might be from rostedt@goodmis.org are

mm-page_alloc-swap-likely-to-unlikely-as-code-logic-is-different-for-next_zones_zonelist.patch
shm-fix-unlikely-test-of-info-seals-to-test-only-for-write-and-grow.patch
mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-06 23:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 23:25 + mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).