- add-all-thread-stats-for-taskstats_cmd_attr_tgid.patch removed from -mm tree

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

 



The patch titled
     Add all thread stats for TASKSTATS_CMD_ATTR_TGID
has been removed from the -mm tree.  Its filename was
     add-all-thread-stats-for-taskstats_cmd_attr_tgid.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: Add all thread stats for TASKSTATS_CMD_ATTR_TGID
From: "Guillaume Chazarain" <guichaz@xxxxxxxx>

Add all thread accounting stats for the global tgid stats.  As a shameless
plug, this fixes iotop -P (http://guichaz.free.fr/misc/iotop.py).

Signed-off-by: Guillaume Chazarain <guichaz@xxxxxxxx>
Cc: Shailabh Nagar <nagar@xxxxxxxxxxxxxx>
Cc: Balbir Singh <balbir@xxxxxxxxxx>
Cc: Jay Lan <jlan@xxxxxxxxxxxx>
Cc: Jonathan Lim <jlim@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/taskstats.c |    2 ++
 kernel/tsacct.c    |   22 +++++++++-------------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff -puN kernel/taskstats.c~add-all-thread-stats-for-taskstats_cmd_attr_tgid kernel/taskstats.c
--- a/kernel/taskstats.c~add-all-thread-stats-for-taskstats_cmd_attr_tgid
+++ a/kernel/taskstats.c
@@ -232,6 +232,7 @@ static int fill_tgid(pid_t tgid, struct 
 		memset(stats, 0, sizeof(*stats));
 
 	tsk = first;
+	bacct_add_tsk(stats, first);
 	do {
 		if (tsk->exit_state)
 			continue;
@@ -245,6 +246,7 @@ static int fill_tgid(pid_t tgid, struct 
 
 		stats->nvcsw += tsk->nvcsw;
 		stats->nivcsw += tsk->nivcsw;
+		xacct_add_tsk(stats, tsk);
 	} while_each_thread(first, tsk);
 
 	unlock_task_sighand(first, &flags);
diff -puN kernel/tsacct.c~add-all-thread-stats-for-taskstats_cmd_attr_tgid kernel/tsacct.c
--- a/kernel/tsacct.c~add-all-thread-stats-for-taskstats_cmd_attr_tgid
+++ a/kernel/tsacct.c
@@ -81,8 +81,8 @@ void xacct_add_tsk(struct taskstats *sta
 	struct mm_struct *mm;
 
 	/* convert pages-jiffies to Mbyte-usec */
-	stats->coremem = jiffies_to_usecs(p->acct_rss_mem1) * PAGE_SIZE / MB;
-	stats->virtmem = jiffies_to_usecs(p->acct_vm_mem1) * PAGE_SIZE / MB;
+	stats->coremem += jiffies_to_usecs(p->acct_rss_mem1) * PAGE_SIZE / MB;
+	stats->virtmem += jiffies_to_usecs(p->acct_vm_mem1) * PAGE_SIZE / MB;
 	mm = get_task_mm(p);
 	if (mm) {
 		/* adjust to KB unit */
@@ -90,18 +90,14 @@ void xacct_add_tsk(struct taskstats *sta
 		stats->hiwater_vm    = mm->hiwater_vm * PAGE_SIZE / KB;
 		mmput(mm);
 	}
-	stats->read_char	= p->rchar;
-	stats->write_char	= p->wchar;
-	stats->read_syscalls	= p->syscr;
-	stats->write_syscalls	= p->syscw;
+	stats->read_char	+= p->rchar;
+	stats->write_char	+= p->wchar;
+	stats->read_syscalls	+= p->syscr;
+	stats->write_syscalls	+= p->syscw;
 #ifdef CONFIG_TASK_IO_ACCOUNTING
-	stats->read_bytes	= p->ioac.read_bytes;
-	stats->write_bytes	= p->ioac.write_bytes;
-	stats->cancelled_write_bytes = p->ioac.cancelled_write_bytes;
-#else
-	stats->read_bytes	= 0;
-	stats->write_bytes	= 0;
-	stats->cancelled_write_bytes = 0;
+	stats->read_bytes	+= p->ioac.read_bytes;
+	stats->write_bytes	+= p->ioac.write_bytes;
+	stats->cancelled_write_bytes += p->ioac.cancelled_write_bytes;
 #endif
 }
 #undef KB
_

Patches currently in -mm which might be from guichaz@xxxxxxxx are

taskstats-add-all-thread-stats-for-taskstats_cmd_attr_tgid.patch
add-all-thread-stats-for-taskstats_cmd_attr_tgid.patch
sync_sb_inodes-propagate-errors.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