+ mm-place-not-inside-of-unlikely-statement-in-wb_domain_writeout_inc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxx
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxxxx 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

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux