+ kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.patch added to -mm tree

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

 



Subject: + kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.patch added to -mm tree
To: gang.chen@xxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 17 Sep 2013 15:37:16 -0700


The patch titled
     Subject: kernel/delayacct.c: remove redundant checking in __delayacct_add_tsk()
has been added to the -mm tree.  Its filename is
     kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.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: Chen Gang <gang.chen@xxxxxxxxxxx>
Subject: kernel/delayacct.c: remove redundant checking in __delayacct_add_tsk()

The wrapper function delayacct_add_tsk() already checked 'tsk->delays',
and __delayacct_add_tsk() has no another direct callers, so can remove the
redundancy checking code.

And the label 'done' is also useless, so remove it, too.

Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/delayacct.c |    7 -------
 1 file changed, 7 deletions(-)

diff -puN kernel/delayacct.c~kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk kernel/delayacct.c
--- a/kernel/delayacct.c~kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk
+++ a/kernel/delayacct.c
@@ -108,12 +108,6 @@ int __delayacct_add_tsk(struct taskstats
 	struct timespec ts;
 	cputime_t utime, stime, stimescaled, utimescaled;
 
-	/* Though tsk->delays accessed later, early exit avoids
-	 * unnecessary returning of other data
-	 */
-	if (!tsk->delays)
-		goto done;
-
 	tmp = (s64)d->cpu_run_real_total;
 	task_cputime(tsk, &utime, &stime);
 	cputime_to_timespec(utime + stime, &ts);
@@ -158,7 +152,6 @@ int __delayacct_add_tsk(struct taskstats
 	d->freepages_count += tsk->delays->freepages_count;
 	spin_unlock_irqrestore(&tsk->delays->lock, flags);
 
-done:
 	return 0;
 }
 
_

Patches currently in -mm which might be from gang.chen@xxxxxxxxxxx are

sh64-kernel-use-usp-instead-of-fn.patch
sh64-kernel-remove-useless-variable-regs.patch
kernel-delayacctc-remove-redundant-checking-in-__delayacct_add_tsk.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 Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux