From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 2/2 v2] writeback: Add writeback stats for pages written Date: Mon, 15 Aug 2011 21:48:46 +0800 Message-ID: <20110815134846.GB13534@localhost> References: <1313189245-7197-1-git-send-email-curtw@google.com> <1313189245-7197-2-git-send-email-curtw@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Jan Kara , Andrew Morton , Dave Chinner , Michael Rubin , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" To: Curt Wohlgemuth Return-path: Received: from mga03.intel.com ([143.182.124.21]:63984 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720Ab1HONsw (ORCPT ); Mon, 15 Aug 2011 09:48:52 -0400 Content-Disposition: inline In-Reply-To: <1313189245-7197-2-git-send-email-curtw@google.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Curt, Some thoughts about the interface..before dipping into the code. On Sat, Aug 13, 2011 at 06:47:25AM +0800, Curt Wohlgemuth wrote: > Add a new file, /proc/writeback/stats, which displays That's creating a new top directory in /proc. Do you have plans for adding more files under it? > machine global data for how many pages were cleaned for > which reasons. It also displays some additional counts for > various writeback events. > > These data are also available for each BDI, in > /sys/block//bdi/writeback_stats . > Sample output: > > page: balance_dirty_pages 2561544 > page: background_writeout 5153 > page: try_to_free_pages 0 > page: sync 0 > page: kupdate 102723 > page: fdatawrite 1228779 > page: laptop_periodic 0 > page: free_more_memory 0 > page: fs_free_space 0 > periodic writeback 377 > single inode wait 0 > writeback_wb wait 1 That's already useful data, and could be further extended (in future patches) to answer questions like "what's the writeback efficiency in terms of effective chunk size?" So in future there could be lines like pages: balance_dirty_pages 2561544 chunks: balance_dirty_pages XXXXXXX works: balance_dirty_pages XXXXXXX or even derived lines like pages_per_chunk: balance_dirty_pages XXXXXXX pages_per_work: balance_dirty_pages XXXXXXX Another question is, how can the display format be script friendly? The current form looks not easily parse-able at least for "cut".. Thanks, Fengguang