All of lore.kernel.org
 help / color / mirror / Atom feed
* [Lustre-devel] [PATCH] Fix task IO accounting on reads
@ 2011-04-26 16:06 Mark Hills
  2011-04-26 16:38 ` Andreas Dilger
  2011-07-19 14:31 ` Richard Henwood
  0 siblings, 2 replies; 13+ messages in thread
From: Mark Hills @ 2011-04-26 16:06 UTC (permalink / raw)
  To: lustre-devel

We've often found it inconvenient that reads from Lustre mounts do not 
correctly increment IO counts (/proc/<pid>/io).

Below is a patch which aims to fix this functionality.

The symptom is that writes are accounted for, but not reads. It seems that 
the accounting it normally done in the kernels page writeback and 
readahead functionality. Therefore as Lustre implements its own readahead, 
it must also maintain its own accounting on reads (but not writes).

Is anyone able to confirm this rationale for the location of this 
particular call, and consider the following patch? Thanks.

-- 
Mark

---
 lustre/llite/rw.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c
index ccd6a42..c7a84b7 100644
--- a/lustre/llite/rw.c
+++ b/lustre/llite/rw.c
@@ -58,6 +58,7 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
+#include <linux/task_io_accounting_ops.h>
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
@@ -1311,6 +1312,8 @@ static int ll_issue_page_read(struct obd_export *exp,
         if (rc) {
                 LL_CDEBUG_PAGE(D_ERROR, page, "read queue failed: rc %d\n", rc);
                 page_cache_release(page);
+        } else {
+                task_io_account_read(CFS_PAGE_SIZE);
         }
         RETURN(rc);
 }
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-07-19 17:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 16:06 [Lustre-devel] [PATCH] Fix task IO accounting on reads Mark Hills
2011-04-26 16:38 ` Andreas Dilger
2011-04-27 11:23   ` Mark Hills
2011-04-27 15:56     ` Peter Kjellström
2011-04-27 16:43     ` Andreas Dilger
2011-04-27 17:14       ` Mark Hills
2011-04-27 21:15         ` Andreas Dilger
2011-04-27 21:19           ` Peter Jones
2011-07-19 10:41           ` Mark Hills
2011-07-19 12:34             ` Peter Jones
2011-07-19 14:31 ` Richard Henwood
2011-07-19 16:08   ` Mark Hills
2011-07-19 17:03     ` Richard Henwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.