From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 30 May 2001 17:27:41 -0300 (BRT) From: Marcelo Tosatti Subject: Re: http://ds9a.nl/cacheinfo project - please comment & improve In-Reply-To: <20010530234806.C8629@home.ds9a.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: bert hubert Cc: linux-mm@kvack.org List-ID: On Wed, 30 May 2001, bert hubert wrote: > On Wed, May 30, 2001 at 04:54:12PM -0300, Marcelo Tosatti wrote: > > > You're using the "address_space->dirty_pages" list to calculate the number > > of dirty pages. > > I was wondering about that. In limited testing I've never seen a non-0 > content of the dirty list. I ran: > > dd if=/dev/zero of=test count=100000 & > while true ; do ./cinfo test; done > > And saw no dirty pages. Oops. You will see no dirty pages here anyway --- data written through write() is commited to the buffer cache directly. You can loop in each page into the clean_list and check their "page->buffers" pointer. If there are dirty buffer_head's there, you can count the page as dirty. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/